From a45436caa69423d8a7baa5579c2a48ff543de54d Mon Sep 17 00:00:00 2001 From: mscherer Date: Mon, 4 Dec 2023 02:30:57 +0100 Subject: [PATCH] Fix up PHPStan --- phpstan.neon | 1 - src/Annotator/ModelAnnotator.php | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 524ee182..efb6acd8 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -11,7 +11,6 @@ parameters: bootstrapFiles: - tests/bootstrap.php - tests/shim.php - checkGenericClassInNonGenericObjectType: false ignoreErrors: - '#Unsafe usage of new static\(\).+#' - '#Parameter \#1 \$object of function get_class expects object, object\|string given.#' diff --git a/src/Annotator/ModelAnnotator.php b/src/Annotator/ModelAnnotator.php index 2424face..566adcd5 100644 --- a/src/Annotator/ModelAnnotator.php +++ b/src/Annotator/ModelAnnotator.php @@ -283,7 +283,7 @@ protected function getAssociations(AssociationCollection $tableAssociations): ar continue; } - /** @var \Cake\ORM\Association\BelongsToMany $association */ + /** @var \Cake\ORM\Association\BelongsToMany<\Cake\ORM\Table> $association */ $through = $this->throughAlias($association); if (!$through) { continue; @@ -306,7 +306,7 @@ protected function getAssociations(AssociationCollection $tableAssociations): ar } /** - * @param \Cake\ORM\Association\BelongsToMany $association + * @param \Cake\ORM\Association\BelongsToMany<\Cake\ORM\Table> $association * @return string */ protected function throughAlias(BelongsToMany $association): string { @@ -328,7 +328,7 @@ protected function throughAlias(BelongsToMany $association): string { /** * @uses \Cake\ORM\Association\BelongsToMany::_junctionTableName() * - * @param \Cake\ORM\Association\BelongsToMany $association + * @param \Cake\ORM\Association\BelongsToMany<\Cake\ORM\Table> $association * @return string */ protected function junctionTableName(BelongsToMany $association): string {