Skip to content

Commit

Permalink
Make PhpStan happy
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Oct 24, 2024
1 parent 0845626 commit b89f67b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/helpers/SparkHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use craft\helpers\UrlHelper;
use putyourlightson\spark\models\ConfigModel;
use ReflectionClass;
use ReflectionNamedType;
use ReflectionProperty;
use Twig\Error\SyntaxError;

Expand Down Expand Up @@ -114,6 +115,10 @@ private static function getClassPropertyValues(string $class): array
private static function getPropertyValue(ReflectionProperty $property, mixed $defaultValue): mixed
{
$type = $property->getType();
if (!($type instanceof ReflectionNamedType)) {
return $defaultValue;
}

if ($type->isBuiltin()) {
return $defaultValue;
}
Expand Down

0 comments on commit b89f67b

Please sign in to comment.