diff --git a/src/Entity/BcPropertiesTrait.php b/src/Entity/BcPropertiesTrait.php index a70fbbd..9b01ce1 100644 --- a/src/Entity/BcPropertiesTrait.php +++ b/src/Entity/BcPropertiesTrait.php @@ -4,7 +4,10 @@ trait BcPropertiesTrait { - public function __get($name) + /** + * @return mixed + */ + public function __get(string $name) { // Check for BC properties if (in_array($name, array_keys(self::BC_PROPERTIES), true)) { diff --git a/test/unit/BC/BcTestUtils.php b/test/unit/BC/BcTestUtils.php index ff09f2f..357f833 100644 --- a/test/unit/BC/BcTestUtils.php +++ b/test/unit/BC/BcTestUtils.php @@ -15,7 +15,7 @@ public static function checkBcProperty(object $entity, string $bcProperty): void // TODO: How to check if PHP Deprecated has been raised (https://github.com/sebastianbergmann/phpunit/issues/5062#issuecomment-1420379762)? - $docComment = (new \ReflectionClass($entity))->getDocComment(); + $docComment = (new \ReflectionClass($entity))->getDocComment() ?: 'no comment'; TestCase::assertMatchesRegularExpression( sprintf('/@property .* \$%s/', $bcProperty), $docComment, diff --git a/test/unit/BC/TeamBcTest.php b/test/unit/BC/TeamBcTest.php index 9152089..9f72a7a 100644 --- a/test/unit/BC/TeamBcTest.php +++ b/test/unit/BC/TeamBcTest.php @@ -41,6 +41,9 @@ protected function setUp(): void $this->team = $teamSerializer->serialize($teamJson)[0]; } + /** + * @return array + */ public static function provideBcProperties(): array { return [