diff --git a/composer.json b/composer.json index fd4a01b5..630d6c07 100644 --- a/composer.json +++ b/composer.json @@ -36,11 +36,11 @@ "marc-mabe/php-enum": "~3.0", "mockery/mockery": "~1.2", "phpstan/extension-installer": "1.1.0", - "phpstan/phpstan": "0.12.94", + "phpstan/phpstan": "0.12.96", "phpstan/phpstan-deprecation-rules": "0.12.6", "phpstan/phpstan-nette": "0.12.21", "phpstan/phpstan-mockery": "0.12.14", - "phpstan/phpstan-strict-rules": "0.12.10", + "phpstan/phpstan-strict-rules": "0.12.11", "nextras/orm-phpstan": "dev-master", "marc-mabe/php-enum-phpstan": "dev-master", "tracy/tracy": "~2.3" diff --git a/src/Model/MetadataStorage.php b/src/Model/MetadataStorage.php index 47105673..8e0bd9c2 100644 --- a/src/Model/MetadataStorage.php +++ b/src/Model/MetadataStorage.php @@ -24,13 +24,13 @@ class MetadataStorage public static function get(string $className): EntityMetadata { - if (!isset(static::$metadata[$className])) { - if (static::$metadata === []) { + if (!isset(self::$metadata[$className])) { + if (self::$metadata === []) { throw new InvalidStateException("MetadataStorage::get() called too early. You have to instantiate your model first."); } throw new InvalidArgumentException("Entity metadata for '{$className}' does not exist."); } - return static::$metadata[$className]; + return self::$metadata[$className]; } @@ -85,6 +85,6 @@ function (&$dp) use ($entityClassesMap, $metadataParserFactory, $repositoryLoade } } - static::$metadata += $metadata; + self::$metadata += $metadata; } } diff --git a/src/Repository/RemovalHelper.php b/src/Repository/RemovalHelper.php index 478cb243..cf0d70b1 100644 --- a/src/Repository/RemovalHelper.php +++ b/src/Repository/RemovalHelper.php @@ -41,7 +41,7 @@ public static function getCascadeQueueAndSetNulls( [$pre, $post, $nulls] = static::getRelationships($entity); $prePersist = []; - static::setNulls($entity, $nulls, $model, $prePersist, $queueRemove); + self::setNulls($entity, $nulls, $model, $prePersist, $queueRemove); if (!$withCascade) { $queueRemove[$entityHash] = $entity;