diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 9f2e0407..7b8caea0 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -12,6 +12,12 @@ parameters: count: 1 path: src/Auth/Models/Group.php + - + message: '#^Method Winter\\Storm\\Auth\\Models\\Preferences\:\:findRecord\(\) should return Winter\\Storm\\Auth\\Models\\Preferences\|null but returns stdClass\|null\.$#' + identifier: return.type + count: 1 + path: src/Auth/Models/Preferences.php + - message: '#^Call to an undefined method \$this\(Winter\\Storm\\Auth\\Models\\Role\)\:\:getOriginalEncryptableValues\(\)\.$#' identifier: method.notFound @@ -30,24 +36,6 @@ parameters: count: 1 path: src/Auth/Models/User.php - - - message: '#^Call to function method_exists\(\) with \$this\(Winter\\Storm\\Auth\\Models\\User\) and ''getHashableAttribut…'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: src/Auth/Models/User.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Winter\\Storm\\Auth\\Models\\User\) and ''attributeNames'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: src/Auth/Models/User.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Winter\\Storm\\Auth\\Models\\User\) and ''customMessages'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: src/Auth/Models/User.php - - message: '#^PHPDoc type array\ of property Winter\\Storm\\Auth\\Models\\User\:\:\$hidden is not covariant with PHPDoc type list\ of overridden property Illuminate\\Database\\Eloquent\\Model\:\:\$hidden\.$#' identifier: property.phpDocType @@ -186,6 +174,54 @@ parameters: count: 1 path: src/Database/Model.php + - + message: '#^Parameter \#1 \$query of class Winter\\Storm\\Database\\Relations\\BelongsTo constructor expects Illuminate\\Database\\Eloquent\\Builder\, Illuminate\\Database\\Eloquent\\Builder\ given\.$#' + identifier: argument.type + count: 1 + path: src/Database/Model.php + + - + message: '#^Parameter \#1 \$query of class Winter\\Storm\\Database\\Relations\\BelongsToMany constructor expects Illuminate\\Database\\Eloquent\\Builder\, Illuminate\\Database\\Eloquent\\Builder\ given\.$#' + identifier: argument.type + count: 1 + path: src/Database/Model.php + + - + message: '#^Parameter \#1 \$query of class Winter\\Storm\\Database\\Relations\\HasMany constructor expects Illuminate\\Database\\Eloquent\\Builder\, Illuminate\\Database\\Eloquent\\Builder\ given\.$#' + identifier: argument.type + count: 1 + path: src/Database/Model.php + + - + message: '#^Parameter \#1 \$query of class Winter\\Storm\\Database\\Relations\\HasManyThrough constructor expects Illuminate\\Database\\Eloquent\\Builder\, Illuminate\\Database\\Eloquent\\Builder\ given\.$#' + identifier: argument.type + count: 1 + path: src/Database/Model.php + + - + message: '#^Parameter \#1 \$query of class Winter\\Storm\\Database\\Relations\\HasOne constructor expects Illuminate\\Database\\Eloquent\\Builder\, Illuminate\\Database\\Eloquent\\Builder\ given\.$#' + identifier: argument.type + count: 1 + path: src/Database/Model.php + + - + message: '#^Parameter \#1 \$query of class Winter\\Storm\\Database\\Relations\\HasOneThrough constructor expects Illuminate\\Database\\Eloquent\\Builder\, Illuminate\\Database\\Eloquent\\Builder\ given\.$#' + identifier: argument.type + count: 1 + path: src/Database/Model.php + + - + message: '#^Parameter \#1 \$query of class Winter\\Storm\\Database\\Relations\\MorphTo constructor expects Illuminate\\Database\\Eloquent\\Builder\, Illuminate\\Database\\Eloquent\\Builder\ given\.$#' + identifier: argument.type + count: 1 + path: src/Database/Model.php + + - + message: '#^Parameter \#1 \$query of class Winter\\Storm\\Database\\Relations\\MorphToMany constructor expects Illuminate\\Database\\Eloquent\\Builder\, Illuminate\\Database\\Eloquent\\Builder\ given\.$#' + identifier: argument.type + count: 1 + path: src/Database/Model.php + - message: '#^Return type \(Winter\\Storm\\Database\\Collection\) of method Winter\\Storm\\Database\\Model\:\:newCollection\(\) should be compatible with return type \(Illuminate\\Database\\Eloquent\\Collection\<\(int\|string\), static\(Illuminate\\Database\\Eloquent\\Model\)\>\) of method Illuminate\\Database\\Eloquent\\Model\:\:newCollection\(\)$#' identifier: method.childReturnType @@ -642,12 +678,6 @@ parameters: count: 1 path: src/Database/Relations/HasOneThrough.php - - - message: '#^Instanceof between \*NEVER\* and Winter\\Storm\\Database\\Relations\\HasManyThrough will always evaluate to false\.$#' - identifier: instanceof.alwaysFalse - count: 4 - path: src/Database/Relations/HasOneThrough.php - - message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\Relation\:\:withDefault\(\)\.$#' identifier: method.notFound @@ -960,6 +990,12 @@ parameters: count: 1 path: src/Database/TreeCollection.php + - + message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: src/Events/Dispatcher.php + - message: '#^Call to an undefined method Illuminate\\Routing\\Router\:\:after\(\)\.$#' identifier: method.notFound diff --git a/src/Filesystem/FilesystemServiceProvider.php b/src/Filesystem/FilesystemServiceProvider.php index 40a10328..5a238fa0 100644 --- a/src/Filesystem/FilesystemServiceProvider.php +++ b/src/Filesystem/FilesystemServiceProvider.php @@ -26,11 +26,9 @@ public function register() protected function extendFilesystemAdapter() { FilesystemAdapter::macro('getPathPrefix', function () { - /** @phpstan-ignore-next-line */ return $this->prefixer->prefixPath(''); }); FilesystemAdapter::macro('setPathPrefix', function (string $prefix) { - /** @phpstan-ignore-next-line */ $this->prefixer = new PathPrefixer($prefix, $this->config['directory_separator'] ?? DIRECTORY_SEPARATOR); }); } diff --git a/tests/Parse/Assetic/LessCompilerTest.php b/tests/Parse/Assetic/LessCompilerTest.php index 292ef3c9..14f0f6ff 100644 --- a/tests/Parse/Assetic/LessCompilerTest.php +++ b/tests/Parse/Assetic/LessCompilerTest.php @@ -110,5 +110,4 @@ protected function compile(string $sourceFile, ?LessCompiler $compiler = null): $compiler->filterLoad($asset); return $asset->getContent(); } - }