diff --git a/src/Methods/HigherOrderTapProxyExtension.php b/src/Methods/HigherOrderTapProxyExtension.php index 92cad4cb1f..4593585c4b 100644 --- a/src/Methods/HigherOrderTapProxyExtension.php +++ b/src/Methods/HigherOrderTapProxyExtension.php @@ -24,7 +24,7 @@ public function hasMethod(ClassReflection $classReflection, string $methodName): $templateType = $templateTypeMap->getType('TClass'); - if (!$templateType instanceof TypeWithClassName) { + if (! $templateType instanceof TypeWithClassName) { return false; } diff --git a/src/ReturnTypes/BuilderModelFindExtension.php b/src/ReturnTypes/BuilderModelFindExtension.php index 782e5c81d2..f1fa4d6500 100644 --- a/src/ReturnTypes/BuilderModelFindExtension.php +++ b/src/ReturnTypes/BuilderModelFindExtension.php @@ -62,7 +62,7 @@ public function isMethodSupported(MethodReflection $methodReflection): bool $model = $methodReflection->getDeclaringClass()->getActiveTemplateTypeMap()->getType('TModelClass'); - if (!$model instanceof TypeWithClassName) { + if (! $model instanceof TypeWithClassName) { return false; } diff --git a/src/ReturnTypes/CollectionGenericStaticMethodDynamicMethodReturnTypeExtension.php b/src/ReturnTypes/CollectionGenericStaticMethodDynamicMethodReturnTypeExtension.php index 9fdbf89520..8c125e90a4 100644 --- a/src/ReturnTypes/CollectionGenericStaticMethodDynamicMethodReturnTypeExtension.php +++ b/src/ReturnTypes/CollectionGenericStaticMethodDynamicMethodReturnTypeExtension.php @@ -63,7 +63,7 @@ public function getTypeFromMethodCall( $calledOnType = $scope->getType($methodCall->var); - if (!$calledOnType instanceof TypeWithClassName) { + if (! $calledOnType instanceof TypeWithClassName) { return $returnType; } diff --git a/src/ReturnTypes/EloquentBuilderExtension.php b/src/ReturnTypes/EloquentBuilderExtension.php index 2138b12851..4da89792d9 100644 --- a/src/ReturnTypes/EloquentBuilderExtension.php +++ b/src/ReturnTypes/EloquentBuilderExtension.php @@ -59,7 +59,7 @@ public function isMethodSupported(MethodReflection $methodReflection): bool $templateTypeMap = $methodReflection->getDeclaringClass()->getActiveTemplateTypeMap(); - if (!$templateTypeMap->getType('TModelClass') instanceof TypeWithClassName) { + if (! $templateTypeMap->getType('TModelClass') instanceof TypeWithClassName) { return false; } diff --git a/src/ReturnTypes/RelationCollectionExtension.php b/src/ReturnTypes/RelationCollectionExtension.php index 6154e524f4..6a05c8f16e 100644 --- a/src/ReturnTypes/RelationCollectionExtension.php +++ b/src/ReturnTypes/RelationCollectionExtension.php @@ -51,7 +51,7 @@ public function isMethodSupported(MethodReflection $methodReflection): bool $modelType = $methodReflection->getDeclaringClass()->getActiveTemplateTypeMap()->getType('TRelatedModel'); - if (!$modelType instanceof TypeWithClassName) { + if (! $modelType instanceof TypeWithClassName) { return false; } diff --git a/src/ReturnTypes/RelationFindExtension.php b/src/ReturnTypes/RelationFindExtension.php index 2449582104..a62dc58974 100644 --- a/src/ReturnTypes/RelationFindExtension.php +++ b/src/ReturnTypes/RelationFindExtension.php @@ -60,7 +60,7 @@ public function isMethodSupported(MethodReflection $methodReflection): bool $modelType = $methodReflection->getDeclaringClass()->getActiveTemplateTypeMap()->getType('TRelatedModel'); - if (!$modelType instanceof TypeWithClassName) { + if (! $modelType instanceof TypeWithClassName) { return false; } diff --git a/src/Rules/ModelProperties/ModelPropertiesRuleHelper.php b/src/Rules/ModelProperties/ModelPropertiesRuleHelper.php index 14c55436eb..42e8fc1b78 100644 --- a/src/Rules/ModelProperties/ModelPropertiesRuleHelper.php +++ b/src/Rules/ModelProperties/ModelPropertiesRuleHelper.php @@ -14,8 +14,6 @@ use PHPStan\Reflection\MethodReflection; use PHPStan\Reflection\ParametersAcceptorSelector; use PHPStan\ShouldNotHappenException; -use PHPStan\Type\ArrayType; -use PHPStan\Type\Constant\ConstantArrayType; use PHPStan\Type\GeneralizePrecision; use PHPStan\Type\ObjectType; use PHPStan\Type\Type; diff --git a/src/Rules/ModelProperties/ModelPropertyStaticCallRule.php b/src/Rules/ModelProperties/ModelPropertyStaticCallRule.php index 3f7e015868..a8a738cb2d 100644 --- a/src/Rules/ModelProperties/ModelPropertyStaticCallRule.php +++ b/src/Rules/ModelProperties/ModelPropertyStaticCallRule.php @@ -13,7 +13,6 @@ use PHPStan\Reflection\ReflectionProvider; use PHPStan\Rules\Rule; use PHPStan\Rules\RuleLevelHelper; -use PHPStan\Type\Constant\ConstantStringType; use PHPStan\Type\ErrorType; use PHPStan\Type\Type; use PHPStan\Type\TypeUtils; diff --git a/src/Rules/ModelRuleHelper.php b/src/Rules/ModelRuleHelper.php index cbc4d41d9d..19e2384c42 100644 --- a/src/Rules/ModelRuleHelper.php +++ b/src/Rules/ModelRuleHelper.php @@ -40,7 +40,7 @@ public function findModelReflectionFromType(Type $type): ?ClassReflection $modelType = TypeCombinator::removeNull($modelType); - if (!$modelType instanceof TypeWithClassName) { + if (! $modelType instanceof TypeWithClassName) { return null; } diff --git a/src/Rules/OctaneCompatibilityRule.php b/src/Rules/OctaneCompatibilityRule.php index 6542dfc528..0438eb1508 100644 --- a/src/Rules/OctaneCompatibilityRule.php +++ b/src/Rules/OctaneCompatibilityRule.php @@ -44,7 +44,7 @@ public function processNode(Node $node, Scope $scope): array $calledOnType = $scope->getType($node->var); - if (!$calledOnType instanceof TypeWithClassName) { + if (! $calledOnType instanceof TypeWithClassName) { return []; } diff --git a/src/Types/ModelProperty/GenericModelPropertyType.php b/src/Types/ModelProperty/GenericModelPropertyType.php index a517628372..b797f3855d 100644 --- a/src/Types/ModelProperty/GenericModelPropertyType.php +++ b/src/Types/ModelProperty/GenericModelPropertyType.php @@ -5,7 +5,6 @@ namespace NunoMaduro\Larastan\Types\ModelProperty; use PHPStan\TrinaryLogic; -use PHPStan\Type\ClassStringType; use PHPStan\Type\CompoundType; use PHPStan\Type\Constant\ConstantStringType; use PHPStan\Type\Generic\TemplateType; diff --git a/src/Types/ModelRelationsDynamicMethodReturnTypeExtension.php b/src/Types/ModelRelationsDynamicMethodReturnTypeExtension.php index 3700762a61..ece93a0c69 100644 --- a/src/Types/ModelRelationsDynamicMethodReturnTypeExtension.php +++ b/src/Types/ModelRelationsDynamicMethodReturnTypeExtension.php @@ -42,7 +42,7 @@ public function isMethodSupported(MethodReflection $methodReflection): bool $returnType = $variants->getReturnType(); - if (!$returnType instanceof TypeWithClassName) { + if (! $returnType instanceof TypeWithClassName) { return false; } diff --git a/src/Types/RelationDynamicMethodReturnTypeExtension.php b/src/Types/RelationDynamicMethodReturnTypeExtension.php index b3a1595cf3..cab354eaa4 100644 --- a/src/Types/RelationDynamicMethodReturnTypeExtension.php +++ b/src/Types/RelationDynamicMethodReturnTypeExtension.php @@ -57,7 +57,7 @@ public function getTypeFromMethodCall( $functionVariant = ParametersAcceptorSelector::selectSingle($methodReflection->getVariants()); $returnType = $functionVariant->getReturnType(); - if (!$returnType instanceof TypeWithClassName) { + if (! $returnType instanceof TypeWithClassName) { return $returnType; } diff --git a/src/Types/RelationParserHelper.php b/src/Types/RelationParserHelper.php index 39a6c60bb4..ff071a6160 100644 --- a/src/Types/RelationParserHelper.php +++ b/src/Types/RelationParserHelper.php @@ -12,7 +12,6 @@ use PHPStan\Parser\Parser; use PHPStan\Reflection\MethodReflection; use PHPStan\Reflection\ReflectionProvider; -use PHPStan\Type\Constant\ConstantStringType; use PHPStan\Type\Generic\GenericClassStringType; use PHPStan\Type\Generic\TemplateTypeMap; use PHPStan\Type\TypeUtils; @@ -97,7 +96,7 @@ public function findRelatedModelInRelationMethod( if ($argType instanceof GenericClassStringType) { $modelType = $argType->getGenericType(); - if (!$modelType instanceof TypeWithClassName) { + if (! $modelType instanceof TypeWithClassName) { return null; }