Skip to content

Commit e45cf33

Browse files
committed
composer update and fixes
1 parent b860042 commit e45cf33

File tree

6 files changed

+17
-25
lines changed

6 files changed

+17
-25
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.idea
2-
.php_cs.cache
2+
.php-cs-fixer.cache
33
.phpunit.result.cache
44
build
55
composer.lock
File renamed without changes.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"phayes/geophp": "^1.2"
1717
},
1818
"require-dev": {
19-
"friendsofphp/php-cs-fixer": "^2.17",
20-
"matt-allan/laravel-code-style": "^0.6.0",
19+
"friendsofphp/php-cs-fixer": "^3.0.0",
20+
"matt-allan/laravel-code-style": "dev-main",
2121
"nunomaduro/larastan": "^0.7.0",
2222
"nunomaduro/phpinsights": "dev-master",
2323
"orchestra/testbench": "^6.0",

phpinsights.php

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44

55
use NunoMaduro\PhpInsights\Domain\Insights\CyclomaticComplexityIsHigh;
66
use NunoMaduro\PhpInsights\Domain\Insights\ForbiddenNormalClasses;
7-
use ObjectCalisthenics\Sniffs\Files\ClassTraitAndInterfaceLengthSniff;
8-
use ObjectCalisthenics\Sniffs\Files\FunctionLengthSniff;
9-
use ObjectCalisthenics\Sniffs\Metrics\MaxNestingLevelSniff;
10-
use ObjectCalisthenics\Sniffs\Metrics\MethodPerClassLimitSniff;
117
use PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\UselessOverridingMethodSniff;
128
use PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff;
9+
use SlevomatCodingStandard\Sniffs\Classes\ForbiddenPublicPropertySniff;
1310
use SlevomatCodingStandard\Sniffs\Classes\SuperfluousExceptionNamingSniff;
1411
use SlevomatCodingStandard\Sniffs\Commenting\InlineDocCommentDeclarationSniff;
12+
use SlevomatCodingStandard\Sniffs\Functions\FunctionLengthSniff;
1513
use SlevomatCodingStandard\Sniffs\Functions\UnusedParameterSniff;
1614
use SlevomatCodingStandard\Sniffs\TypeHints\DisallowMixedTypeHintSniff;
1715
use SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSniff;
@@ -90,9 +88,9 @@
9088
'absoluteLineLimit' => 150,
9189
'ignoreComments' => false,
9290
],
93-
MaxNestingLevelSniff::class => [
94-
'maxNestingLevel' => 3,
95-
],
91+
// MaxNestingLevelSniff::class => [
92+
// 'maxNestingLevel' => 3,
93+
// ],
9694
InlineDocCommentDeclarationSniff::class => [
9795
'exclude' => [
9896
'src/Factory.php',
@@ -105,21 +103,14 @@
105103
'src/GeometryCast.php',
106104
],
107105
],
108-
MethodPerClassLimitSniff::class => [
109-
'exclude' => [
110-
'src/SpatialBuilder.php',
111-
'src/Objects/Geometry.php',
112-
'src/Objects/GeometryCollection.php',
113-
],
114-
],
115-
ClassTraitAndInterfaceLengthSniff::class => [
106+
FunctionLengthSniff::class => [
116107
'exclude' => [
117-
'src/SpatialBuilder.php',
108+
'src/Factory.php',
118109
],
119110
],
120-
FunctionLengthSniff::class => [
111+
ForbiddenPublicPropertySniff::class => [
121112
'exclude' => [
122-
'src/Factory.php',
113+
'src/Objects/Point.php',
123114
],
124115
],
125116
CyclomaticComplexityIsHigh::class => [

phpstan.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ parameters:
77
level: max
88
ignoreErrors:
99
- '#Method MatanYadaev\\EloquentSpatial\\Objects\\(Geometry|GeometryCollection)::(toJson|toFeatureCollectionJson)\(\) should return string but returns string\|false\.#'
10+
-
11+
message: '#Call to private method .+\(\) of parent class Illuminate\\Database\\Eloquent\\Builder\<Illuminate\\Database\\Eloquent\\Model\>.#'
12+
path: ./src/SpatialBuilder.php
1013
excludePaths:
1114
- ./src/Factory.php
1215
checkMissingIterableValueType: true

tests/GeometryCastTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,8 @@ public function it_throws_exception_when_deserializing_invalid_geometry_object()
5454
{
5555
$this->expectException(InvalidArgumentException::class);
5656

57-
TestPlace::insert([
58-
array_merge(TestPlace::factory()->definition(), [
59-
'point_with_line_string_cast' => DB::raw('POINT(0, 180)'),
60-
]),
57+
TestPlace::factory()->create([
58+
'point_with_line_string_cast' => DB::raw('POINT(0, 180)'),
6159
]);
6260

6361
/** @var TestPlace $testPlace */

0 commit comments

Comments
 (0)