From ead6bda52ffe4ba17aaac35a1935b072dbf9fabd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 29 Mar 2022 20:05:47 +0200 Subject: [PATCH] Code style --- phpstan.neon | 4 ++++ src/Meta/Meta.php | 5 ++++- src/Meta/MetaProperty.php | 4 +++- src/Meta/Reflection.php | 8 ++++---- src/Metadata.php | 2 ++ 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 5b8dfd1..84e6bde 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -11,6 +11,10 @@ parameters: - Illuminate\Routing\Route ignoreErrors: + - '#Access to an undefined static property static\(ArchTech\\Enums\\Meta\\MetaProperty\)\:\:\$method#' + - '#invalid typehint type ArchTech\\Enums\\Metadata#' + - '#invalid typehint type Enum#' + - '#on an unknown class Enum#' # - # message: '#Offset (.*?) does not exist on array\|null#' # paths: diff --git a/src/Meta/Meta.php b/src/Meta/Meta.php index 11b7a1b..ce88f76 100644 --- a/src/Meta/Meta.php +++ b/src/Meta/Meta.php @@ -1,5 +1,7 @@ value = $this->transform($value); diff --git a/src/Meta/Reflection.php b/src/Meta/Reflection.php index 4fb52af..02aa405 100644 --- a/src/Meta/Reflection.php +++ b/src/Meta/Reflection.php @@ -1,5 +1,7 @@ > */ public static function metaProperties(mixed $enum): array @@ -34,9 +36,7 @@ class Reflection /** * Get the value of a meta property on the provided enum. * - * @param \class-string $property - * @param Enum $enum - * @return mixed + * @param \Enum $enum */ public static function metaValue(string $metaProperty, mixed $enum): mixed { diff --git a/src/Metadata.php b/src/Metadata.php index 29f7a4e..9232e94 100644 --- a/src/Metadata.php +++ b/src/Metadata.php @@ -1,5 +1,7 @@