mirror of
https://github.com/archtechx/enums.git
synced 2025-12-12 17:14:04 +00:00
Fix code style (php-cs-fixer)
This commit is contained in:
parent
7b0871db00
commit
cf9926c8e3
4 changed files with 10 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ArchTech\Enums\Meta;
|
||||
|
||||
use Attribute;
|
||||
|
|
@ -10,7 +12,8 @@ class Meta
|
|||
/** @var MetaProperty[] */
|
||||
public array $metaProperties;
|
||||
|
||||
public function __construct(array|string ...$metaProperties) {
|
||||
public function __construct(array|string ...$metaProperties)
|
||||
{
|
||||
// When an array is passed, it'll be wrapped in an outer array due to the ...variadic parameter
|
||||
if (isset($metaProperties[0]) && is_array($metaProperties[0])) {
|
||||
// Extract the inner array
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ArchTech\Enums\Meta;
|
||||
|
||||
abstract class MetaProperty
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ArchTech\Enums\Meta;
|
||||
|
||||
use ReflectionAttribute;
|
||||
|
|
@ -34,9 +36,7 @@ class Reflection
|
|||
/**
|
||||
* Get the value of a meta property on the provided enum.
|
||||
*
|
||||
* @param \class-string<MetaProperty> $property
|
||||
* @param Enum $enum
|
||||
* @return mixed
|
||||
*/
|
||||
public static function metaValue(string $metaProperty, mixed $enum): mixed
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ArchTech\Enums;
|
||||
|
||||
use ArchTech\Enums\Meta\MetaProperty;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue