Skip to content

Commit 79bf629

Browse files
committed
check if class_exists for psalm
1 parent 65e5d1c commit 79bf629

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Console/ModelsCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,8 +670,8 @@ public function getPropertiesFromMethods($model)
670670
$comment = $this->getCommentFromDocBlock($reflection);
671671
$this->setProperty($name, null, null, true, $comment);
672672
}
673-
} elseif (class_exists(Scope::class && !empty($reflection->getAttributes(Scope::class))) || (Str::startsWith($method, 'scope') && $method !== 'scopeQuery' && $method !== 'scope' && $method !== 'scopes')) {
674-
$scopeUsingAttribute = class_exists(Scope::class && !empty($reflection->getAttributes(Scope::class);
673+
} elseif (class_exists(Scope::class) && !empty($reflection->getAttributes(Scope::class)) || (Str::startsWith($method, 'scope') && $method !== 'scopeQuery' && $method !== 'scope' && $method !== 'scopes')) {
674+
$scopeUsingAttribute = class_exists(Scope::class) && !empty($reflection->getAttributes(Scope::class));
675675

676676
//Magic scope<name>Attribute
677677
$name = $scopeUsingAttribute ? $method : Str::camel(substr($method, 5));

0 commit comments

Comments
 (0)