PHPstan fixes.

This commit is contained in:
James Cole
2023-11-05 08:15:17 +01:00
parent ff599795d3
commit c1cc71f85c
48 changed files with 101 additions and 166 deletions

View File

@@ -117,9 +117,9 @@ trait AppendsLocationData
*
* @return bool
*/
private function isValidPOST(?string $prefix): bool
private function isValidPost(?string $prefix): bool
{
app('log')->debug('Now in isValidPOST()');
app('log')->debug('Now in isValidPost()');
$longitudeKey = $this->getLocationKey($prefix, 'longitude');
$latitudeKey = $this->getLocationKey($prefix, 'latitude');
$zoomLevelKey = $this->getLocationKey($prefix, 'zoom_level');

View File

@@ -353,7 +353,7 @@ trait ConvertsDataTypes
{
$return = [];
foreach ($fields as $field => $info) {
if ($this->has($info[0])) {
if (true === $this->has($info[0])) {
$method = $info[1];
$return[$field] = $this->$method($info[0]); // @phpstan-ignore-line
}
@@ -422,7 +422,7 @@ trait ConvertsDataTypes
*/
protected function nullableInteger(string $field): ?int
{
if (!$this->has($field)) {
if (false === $this->has($field)) {
return null;
}