Skip to content

Commit ef7369e

Browse files
committed
increase phpstan level to 8
1 parent d61c38d commit ef7369e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ includes:
22
- phpstan-baseline.neon
33

44
parameters:
5-
level: 7
5+
level: 8
66
paths:
77
- src
88
tmpDir: build/phpstan

src/Schema/Blueprint.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ public function geometryCollection($column, ?int $srid = null): \Illuminate\Supp
8080
*/
8181
public function spatialIndex($columns, $name = null): \Illuminate\Support\Fluent
8282
{
83-
return $this->indexCommand('spatial', $columns, $name);
83+
return $this->indexCommand(
84+
'spatial',
85+
$columns,
86+
$name ?: $this->createIndexName('spatial', is_array($columns) ? $columns : [$columns])
87+
);
8488
}
8589

8690
/**

src/Types/Geometry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public static function fromJson(string|GeoJson $geoJson): self
115115
$geoJson = $geoJson->getGeometry();
116116
}
117117

118-
$type = '\Limenet\LaravelMysqlSpatial\Types\\'.$geoJson->getType();
118+
$type = '\Limenet\LaravelMysqlSpatial\Types\\'.$geoJson?->getType();
119119

120120
return $type::fromJson($geoJson);
121121
}

0 commit comments

Comments
 (0)