@@ -5,11 +5,11 @@ |
||
| 5 | 5 | |
| 6 | 6 | trait NodeTrait |
| 7 | 7 | { |
| 8 | - /** |
|
| 8 | +/** |
|
| 9 | 9 | * @return string |
| 10 | 10 | */ |
| 11 | - public function html(): string |
|
| 12 | - { |
|
| 13 | - return ''; |
|
| 14 | - } |
|
| 11 | +public function html(): string |
|
| 12 | +{ |
|
| 13 | +return ''; |
|
| 14 | +} |
|
| 15 | 15 | } |
@@ -7,27 +7,27 @@ |
||
| 7 | 7 | |
| 8 | 8 | class PageComponent extends BaseComponent |
| 9 | 9 | { |
| 10 | - /** |
|
| 10 | +/** |
|
| 11 | 11 | * @return int |
| 12 | 12 | */ |
| 13 | - protected function count(): int |
|
| 14 | - { |
|
| 15 | - return 0; |
|
| 16 | - } |
|
| 13 | +protected function count(): int |
|
| 14 | +{ |
|
| 15 | +return 0; |
|
| 16 | +} |
|
| 17 | 17 | |
| 18 | - /** |
|
| 18 | +/** |
|
| 19 | 19 | * @return int |
| 20 | 20 | */ |
| 21 | - protected function limit(): int |
|
| 22 | - { |
|
| 23 | - return 0; |
|
| 24 | - } |
|
| 21 | +protected function limit(): int |
|
| 22 | +{ |
|
| 23 | +return 0; |
|
| 24 | +} |
|
| 25 | 25 | |
| 26 | - /** |
|
| 26 | +/** |
|
| 27 | 27 | * @return string |
| 28 | 28 | */ |
| 29 | - public function html(): string |
|
| 30 | - { |
|
| 31 | - return ''; |
|
| 32 | - } |
|
| 29 | +public function html(): string |
|
| 30 | +{ |
|
| 31 | +return ''; |
|
| 32 | +} |
|
| 33 | 33 | } |
@@ -7,5 +7,5 @@ |
||
| 7 | 7 | |
| 8 | 8 | class NodeComponent extends BaseComponent |
| 9 | 9 | { |
| 10 | - use Traits\NodeTrait; |
|
| 10 | +use Traits\NodeTrait; |
|
| 11 | 11 | } |
@@ -10,5 +10,5 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | class NodeBaseComponent extends BaseComponent |
| 12 | 12 | { |
| 13 | - use Traits\NodeTrait; |
|
| 13 | +use Traits\NodeTrait; |
|
| 14 | 14 | } |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | trait AnnotationTrait |
| 14 | 14 | { |
| 15 | - /** |
|
| 15 | +/** |
|
| 16 | 16 | * Get the metadata from a given class |
| 17 | 17 | * |
| 18 | 18 | * @param ReflectionClass|string $xClass |
@@ -21,28 +21,28 @@ discard block |
||
| 21 | 21 | * |
| 22 | 22 | * @return Metadata|null |
| 23 | 23 | */ |
| 24 | - public function getAttributes(ReflectionClass|string $xClass, |
|
| 25 | - array $aMethods = [], array $aProperties = []): ?Metadata |
|
| 26 | - { |
|
| 27 | - $xInputData = new InputData($xClass, $aMethods, $aProperties); |
|
| 28 | - $xMetadataReader = jaxon()->di()->getMetadataReader('annotations'); |
|
| 29 | - return $xMetadataReader->getAttributes($xInputData); |
|
| 30 | - } |
|
| 24 | +public function getAttributes(ReflectionClass|string $xClass, |
|
| 25 | +array $aMethods = [], array $aProperties = []): ?Metadata |
|
| 26 | +{ |
|
| 27 | +$xInputData = new InputData($xClass, $aMethods, $aProperties); |
|
| 28 | +$xMetadataReader = jaxon()->di()->getMetadataReader('annotations'); |
|
| 29 | +return $xMetadataReader->getAttributes($xInputData); |
|
| 30 | +} |
|
| 31 | 31 | |
| 32 | - /** |
|
| 32 | +/** |
|
| 33 | 33 | * @param ReflectionClass $xClass |
| 34 | 34 | * |
| 35 | 35 | * @return ComponentOptions |
| 36 | 36 | */ |
| 37 | - public function getOptions(ReflectionClass $xClass): ComponentOptions |
|
| 38 | - { |
|
| 39 | - $xConfigSetter = new ConfigSetter(); |
|
| 40 | - $aOptions = [ |
|
| 41 | - 'separator' => '.', |
|
| 42 | - 'protected' => [], |
|
| 43 | - 'functions' => [], |
|
| 44 | - 'config' => $xConfigSetter->newConfig(['metadata' => ['format' => 'annotations']]), |
|
| 45 | - ]; |
|
| 46 | - return jaxon()->cdi()->getComponentOptions($xClass, $aOptions); |
|
| 47 | - } |
|
| 37 | +public function getOptions(ReflectionClass $xClass): ComponentOptions |
|
| 38 | +{ |
|
| 39 | +$xConfigSetter = new ConfigSetter(); |
|
| 40 | +$aOptions = [ |
|
| 41 | +'separator' => '.', |
|
| 42 | +'protected' => [], |
|
| 43 | +'functions' => [], |
|
| 44 | +'config' => $xConfigSetter->newConfig(['metadata' => ['format' => 'annotations']]), |
|
| 45 | +]; |
|
| 46 | +return jaxon()->cdi()->getComponentOptions($xClass, $aOptions); |
|
| 47 | +} |
|
| 48 | 48 | } |