@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $aFiles = scandir($this->sCacheDir); |
| 46 | 46 | foreach ($aFiles as $sFile) |
| 47 | 47 | { |
| 48 | - if($sFile !== '.' && $sFile !== '..') |
|
| 48 | + if ($sFile !== '.' && $sFile !== '..') |
|
| 49 | 49 | { |
| 50 | 50 | @unlink($this->sCacheDir . DIRECTORY_SEPARATOR . $sFile); |
| 51 | 51 | } |
@@ -18,157 +18,157 @@ |
||
| 18 | 18 | |
| 19 | 19 | class ComponentTest extends TestCase |
| 20 | 20 | { |
| 21 | - use AnnotationTrait; |
|
| 21 | +use AnnotationTrait; |
|
| 22 | 22 | |
| 23 | - /** |
|
| 23 | +/** |
|
| 24 | 24 | * @var string |
| 25 | 25 | */ |
| 26 | - private $sCacheDir; |
|
| 26 | +private $sCacheDir; |
|
| 27 | 27 | |
| 28 | - /** |
|
| 28 | +/** |
|
| 29 | 29 | * @throws SetupException |
| 30 | 30 | */ |
| 31 | - public function setUp(): void |
|
| 32 | - { |
|
| 33 | - $this->sCacheDir = __DIR__ . '/../tmp'; |
|
| 34 | - @mkdir($this->sCacheDir); |
|
| 31 | +public function setUp(): void |
|
| 32 | +{ |
|
| 33 | +$this->sCacheDir = __DIR__ . '/../tmp'; |
|
| 34 | +@mkdir($this->sCacheDir); |
|
| 35 | 35 | |
| 36 | - jaxon()->di()->getPluginManager()->registerPlugins(); |
|
| 37 | - _register(); |
|
| 36 | +jaxon()->di()->getPluginManager()->registerPlugins(); |
|
| 37 | +_register(); |
|
| 38 | 38 | |
| 39 | - jaxon()->di()->val('jaxon_annotations_cache_dir', $this->sCacheDir); |
|
| 40 | - } |
|
| 39 | +jaxon()->di()->val('jaxon_annotations_cache_dir', $this->sCacheDir); |
|
| 40 | +} |
|
| 41 | 41 | |
| 42 | - /** |
|
| 42 | +/** |
|
| 43 | 43 | * @throws SetupException |
| 44 | 44 | */ |
| 45 | - public function tearDown(): void |
|
| 46 | - { |
|
| 47 | - jaxon()->reset(); |
|
| 48 | - parent::tearDown(); |
|
| 49 | - |
|
| 50 | - // Delete the temp dir and all its content |
|
| 51 | - $aFiles = scandir($this->sCacheDir); |
|
| 52 | - foreach ($aFiles as $sFile) |
|
| 53 | - { |
|
| 54 | - if($sFile !== '.' && $sFile !== '..') |
|
| 55 | - { |
|
| 56 | - @unlink($this->sCacheDir . DIRECTORY_SEPARATOR . $sFile); |
|
| 57 | - } |
|
| 58 | - } |
|
| 59 | - @rmdir($this->sCacheDir); |
|
| 60 | - } |
|
| 61 | - |
|
| 62 | - /** |
|
| 45 | +public function tearDown(): void |
|
| 46 | +{ |
|
| 47 | +jaxon()->reset(); |
|
| 48 | +parent::tearDown(); |
|
| 49 | + |
|
| 50 | +// Delete the temp dir and all its content |
|
| 51 | +$aFiles = scandir($this->sCacheDir); |
|
| 52 | +foreach ($aFiles as $sFile) |
|
| 53 | +{ |
|
| 54 | +if($sFile !== '.' && $sFile !== '..') |
|
| 55 | +{ |
|
| 56 | + @unlink($this->sCacheDir . DIRECTORY_SEPARATOR . $sFile); |
|
| 57 | +} |
|
| 58 | +} |
|
| 59 | +@rmdir($this->sCacheDir); |
|
| 60 | +} |
|
| 61 | + |
|
| 62 | +/** |
|
| 63 | 63 | * @throws SetupException |
| 64 | 64 | */ |
| 65 | - public function testNodeComponentExportMethods() |
|
| 66 | - { |
|
| 67 | - $xMetadata = $this->getAttributes(NodeComponent::class, |
|
| 68 | - ['item', 'html', 'render', 'clear', 'visible'], []); |
|
| 69 | - $bExcluded = $xMetadata->isExcluded(); |
|
| 70 | - $aExcluded = $xMetadata->getExceptMethods(); |
|
| 71 | - $aBaseMethods = $xMetadata->getExportBaseMethods(); |
|
| 72 | - $aOnlyMethods = $xMetadata->getExportOnlyMethods(); |
|
| 73 | - |
|
| 74 | - $this->assertFalse($bExcluded); |
|
| 75 | - $this->assertCount(0, $aExcluded); |
|
| 76 | - $this->assertCount(0, $aBaseMethods); |
|
| 77 | - $this->assertCount(0, $aOnlyMethods); |
|
| 78 | - } |
|
| 79 | - |
|
| 80 | - /** |
|
| 65 | +public function testNodeComponentExportMethods() |
|
| 66 | +{ |
|
| 67 | +$xMetadata = $this->getAttributes(NodeComponent::class, |
|
| 68 | +['item', 'html', 'render', 'clear', 'visible'], []); |
|
| 69 | +$bExcluded = $xMetadata->isExcluded(); |
|
| 70 | +$aExcluded = $xMetadata->getExceptMethods(); |
|
| 71 | +$aBaseMethods = $xMetadata->getExportBaseMethods(); |
|
| 72 | +$aOnlyMethods = $xMetadata->getExportOnlyMethods(); |
|
| 73 | + |
|
| 74 | +$this->assertFalse($bExcluded); |
|
| 75 | +$this->assertCount(0, $aExcluded); |
|
| 76 | +$this->assertCount(0, $aBaseMethods); |
|
| 77 | +$this->assertCount(0, $aOnlyMethods); |
|
| 78 | +} |
|
| 79 | + |
|
| 80 | +/** |
|
| 81 | 81 | * @throws SetupException |
| 82 | 82 | */ |
| 83 | - public function testPageComponentExportMethods() |
|
| 84 | - { |
|
| 85 | - $xMetadata = $this->getAttributes(PageComponent::class, |
|
| 86 | - ['item', 'html', 'render', 'clear', 'visible'], []); |
|
| 87 | - $bExcluded = $xMetadata->isExcluded(); |
|
| 88 | - $aExcluded = $xMetadata->getExceptMethods(); |
|
| 89 | - $aBaseMethods = $xMetadata->getExportBaseMethods(); |
|
| 90 | - $aOnlyMethods = $xMetadata->getExportOnlyMethods(); |
|
| 91 | - |
|
| 92 | - $this->assertFalse($bExcluded); |
|
| 93 | - $this->assertCount(0, $aExcluded); |
|
| 94 | - $this->assertCount(0, $aBaseMethods); |
|
| 95 | - $this->assertCount(0, $aOnlyMethods); |
|
| 96 | - } |
|
| 97 | - |
|
| 98 | - /** |
|
| 83 | +public function testPageComponentExportMethods() |
|
| 84 | +{ |
|
| 85 | +$xMetadata = $this->getAttributes(PageComponent::class, |
|
| 86 | +['item', 'html', 'render', 'clear', 'visible'], []); |
|
| 87 | +$bExcluded = $xMetadata->isExcluded(); |
|
| 88 | +$aExcluded = $xMetadata->getExceptMethods(); |
|
| 89 | +$aBaseMethods = $xMetadata->getExportBaseMethods(); |
|
| 90 | +$aOnlyMethods = $xMetadata->getExportOnlyMethods(); |
|
| 91 | + |
|
| 92 | +$this->assertFalse($bExcluded); |
|
| 93 | +$this->assertCount(0, $aExcluded); |
|
| 94 | +$this->assertCount(0, $aBaseMethods); |
|
| 95 | +$this->assertCount(0, $aOnlyMethods); |
|
| 96 | +} |
|
| 97 | + |
|
| 98 | +/** |
|
| 99 | 99 | * @throws SetupException |
| 100 | 100 | */ |
| 101 | - public function testFuncComponentExportMethods() |
|
| 102 | - { |
|
| 103 | - $xMetadata = $this->getAttributes(FuncComponent::class, |
|
| 104 | - ['paginator'], []); |
|
| 105 | - $bExcluded = $xMetadata->isExcluded(); |
|
| 106 | - $aExcluded = $xMetadata->getExceptMethods(); |
|
| 107 | - $aBaseMethods = $xMetadata->getExportBaseMethods(); |
|
| 108 | - $aOnlyMethods = $xMetadata->getExportOnlyMethods(); |
|
| 109 | - |
|
| 110 | - $this->assertFalse($bExcluded); |
|
| 111 | - $this->assertCount(0, $aExcluded); |
|
| 112 | - $this->assertCount(0, $aBaseMethods); |
|
| 113 | - $this->assertCount(0, $aOnlyMethods); |
|
| 114 | - } |
|
| 115 | - |
|
| 116 | - /** |
|
| 101 | +public function testFuncComponentExportMethods() |
|
| 102 | +{ |
|
| 103 | +$xMetadata = $this->getAttributes(FuncComponent::class, |
|
| 104 | +['paginator'], []); |
|
| 105 | +$bExcluded = $xMetadata->isExcluded(); |
|
| 106 | +$aExcluded = $xMetadata->getExceptMethods(); |
|
| 107 | +$aBaseMethods = $xMetadata->getExportBaseMethods(); |
|
| 108 | +$aOnlyMethods = $xMetadata->getExportOnlyMethods(); |
|
| 109 | + |
|
| 110 | +$this->assertFalse($bExcluded); |
|
| 111 | +$this->assertCount(0, $aExcluded); |
|
| 112 | +$this->assertCount(0, $aBaseMethods); |
|
| 113 | +$this->assertCount(0, $aOnlyMethods); |
|
| 114 | +} |
|
| 115 | + |
|
| 116 | +/** |
|
| 117 | 117 | * @throws SetupException |
| 118 | 118 | */ |
| 119 | - public function testNodeComponentExportBaseMethods() |
|
| 120 | - { |
|
| 121 | - // The attribute exports the 'html' and 'render' methods, |
|
| 122 | - // but only the 'render' method shall be exported. |
|
| 123 | - $xClass = new ReflectionClass(NodeBaseComponent::class); |
|
| 124 | - $aMethods = ['item', 'html', 'render', 'clear', 'visible']; |
|
| 125 | - $xMetadata = $this->getAttributes($xClass, $aMethods, []); |
|
| 126 | - $aBaseMethods = $xMetadata->getExportBaseMethods(); |
|
| 127 | - |
|
| 128 | - // The 'html' and 'render' methods are returned. |
|
| 129 | - $this->assertCount(2, $aBaseMethods); |
|
| 130 | - |
|
| 131 | - $xOptions = $this->getOptions($xClass); |
|
| 132 | - $aPublicMethods = $xOptions->getPublicMethods(); |
|
| 133 | - |
|
| 134 | - // Only the 'render' method is returned. |
|
| 135 | - $this->assertCount(1, $aPublicMethods); |
|
| 136 | - $this->assertEquals('render', $aPublicMethods[0]); |
|
| 137 | - } |
|
| 138 | - |
|
| 139 | - /** |
|
| 119 | +public function testNodeComponentExportBaseMethods() |
|
| 120 | +{ |
|
| 121 | +// The attribute exports the 'html' and 'render' methods, |
|
| 122 | +// but only the 'render' method shall be exported. |
|
| 123 | +$xClass = new ReflectionClass(NodeBaseComponent::class); |
|
| 124 | +$aMethods = ['item', 'html', 'render', 'clear', 'visible']; |
|
| 125 | +$xMetadata = $this->getAttributes($xClass, $aMethods, []); |
|
| 126 | +$aBaseMethods = $xMetadata->getExportBaseMethods(); |
|
| 127 | + |
|
| 128 | +// The 'html' and 'render' methods are returned. |
|
| 129 | +$this->assertCount(2, $aBaseMethods); |
|
| 130 | + |
|
| 131 | +$xOptions = $this->getOptions($xClass); |
|
| 132 | +$aPublicMethods = $xOptions->getPublicMethods(); |
|
| 133 | + |
|
| 134 | +// Only the 'render' method is returned. |
|
| 135 | +$this->assertCount(1, $aPublicMethods); |
|
| 136 | +$this->assertEquals('render', $aPublicMethods[0]); |
|
| 137 | +} |
|
| 138 | + |
|
| 139 | +/** |
|
| 140 | 140 | * @throws SetupException |
| 141 | 141 | */ |
| 142 | - public function testDocBockNodeComponentExportBaseMethods() |
|
| 143 | - { |
|
| 144 | - // The attribute exports the 'html' and 'render' methods, |
|
| 145 | - // but only the 'render' method shall be exported. |
|
| 146 | - $xClass = new ReflectionClass(DocBlockNodeBaseComponent::class); |
|
| 147 | - $aMethods = ['item', 'html', 'render', 'clear', 'visible']; |
|
| 148 | - $xMetadata = $this->getAttributes($xClass, $aMethods, []); |
|
| 149 | - $aBaseMethods = $xMetadata->getExportBaseMethods(); |
|
| 150 | - |
|
| 151 | - // The 'html' and 'render' methods are returned. |
|
| 152 | - $this->assertCount(2, $aBaseMethods); |
|
| 153 | - |
|
| 154 | - $xOptions = $this->getOptions($xClass); |
|
| 155 | - $aPublicMethods = $xOptions->getPublicMethods(); |
|
| 156 | - |
|
| 157 | - // Only the 'render' method is returned. |
|
| 158 | - $this->assertCount(1, $aPublicMethods); |
|
| 159 | - $this->assertEquals('render', $aPublicMethods[0]); |
|
| 160 | - } |
|
| 161 | - |
|
| 162 | - public function testAttributeExportError() |
|
| 163 | - { |
|
| 164 | - $this->expectException(SetupException::class); |
|
| 165 | - $xClass = new ReflectionClass(ExportErrorComponent::class); |
|
| 166 | - $this->getOptions($xClass); |
|
| 167 | - } |
|
| 168 | - |
|
| 169 | - // public function testContainerAttributeErrorDiClass() |
|
| 170 | - // { |
|
| 171 | - // $this->expectException(SetupException::class); |
|
| 172 | - // $this->getAttributes(PropertyAttribute::class, ['errorDiClass']); |
|
| 173 | - // } |
|
| 142 | +public function testDocBockNodeComponentExportBaseMethods() |
|
| 143 | +{ |
|
| 144 | +// The attribute exports the 'html' and 'render' methods, |
|
| 145 | +// but only the 'render' method shall be exported. |
|
| 146 | +$xClass = new ReflectionClass(DocBlockNodeBaseComponent::class); |
|
| 147 | +$aMethods = ['item', 'html', 'render', 'clear', 'visible']; |
|
| 148 | +$xMetadata = $this->getAttributes($xClass, $aMethods, []); |
|
| 149 | +$aBaseMethods = $xMetadata->getExportBaseMethods(); |
|
| 150 | + |
|
| 151 | +// The 'html' and 'render' methods are returned. |
|
| 152 | +$this->assertCount(2, $aBaseMethods); |
|
| 153 | + |
|
| 154 | +$xOptions = $this->getOptions($xClass); |
|
| 155 | +$aPublicMethods = $xOptions->getPublicMethods(); |
|
| 156 | + |
|
| 157 | +// Only the 'render' method is returned. |
|
| 158 | +$this->assertCount(1, $aPublicMethods); |
|
| 159 | +$this->assertEquals('render', $aPublicMethods[0]); |
|
| 160 | +} |
|
| 161 | + |
|
| 162 | +public function testAttributeExportError() |
|
| 163 | +{ |
|
| 164 | +$this->expectException(SetupException::class); |
|
| 165 | +$xClass = new ReflectionClass(ExportErrorComponent::class); |
|
| 166 | +$this->getOptions($xClass); |
|
| 167 | +} |
|
| 168 | + |
|
| 169 | +// public function testContainerAttributeErrorDiClass() |
|
| 170 | +// { |
|
| 171 | +// $this->expectException(SetupException::class); |
|
| 172 | +// $this->getAttributes(PropertyAttribute::class, ['errorDiClass']); |
|
| 173 | +// } |
|
| 174 | 174 | } |
@@ -6,18 +6,18 @@ |
||
| 6 | 6 | |
| 7 | 7 | trait Annotated |
| 8 | 8 | { |
| 9 | - /** |
|
| 9 | +/** |
|
| 10 | 10 | * @var \Jaxon\Annotations\Tests\Service\ColorService |
| 11 | 11 | */ |
| 12 | - protected $colorService; |
|
| 12 | +protected $colorService; |
|
| 13 | 13 | |
| 14 | - /** |
|
| 14 | +/** |
|
| 15 | 15 | * @var TextService |
| 16 | 16 | */ |
| 17 | - protected $textService; |
|
| 17 | +protected $textService; |
|
| 18 | 18 | |
| 19 | - /** |
|
| 19 | +/** |
|
| 20 | 20 | * @var FontService |
| 21 | 21 | */ |
| 22 | - protected $fontService; |
|
| 22 | +protected $fontService; |
|
| 23 | 23 | } |
@@ -21,18 +21,18 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | class ClassAnnotated extends FuncComponent |
| 23 | 23 | { |
| 24 | - /** |
|
| 24 | +/** |
|
| 25 | 25 | * @var \Jaxon\Annotations\Tests\Service\ColorService |
| 26 | 26 | */ |
| 27 | - protected $colorService; |
|
| 27 | +protected $colorService; |
|
| 28 | 28 | |
| 29 | - /** |
|
| 29 | +/** |
|
| 30 | 30 | * @var TextService |
| 31 | 31 | */ |
| 32 | - protected $textService; |
|
| 32 | +protected $textService; |
|
| 33 | 33 | |
| 34 | - /** |
|
| 34 | +/** |
|
| 35 | 35 | * @var FontService |
| 36 | 36 | */ |
| 37 | - protected $fontService; |
|
| 37 | +protected $fontService; |
|
| 38 | 38 | } |
@@ -9,26 +9,26 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | class DocBlockClassExcluded extends FuncComponent |
| 11 | 11 | { |
| 12 | - /** |
|
| 12 | +/** |
|
| 13 | 13 | * @exclude |
| 14 | 14 | */ |
| 15 | - public function doNot() |
|
| 16 | - { |
|
| 17 | - } |
|
| 15 | +public function doNot() |
|
| 16 | +{ |
|
| 17 | +} |
|
| 18 | 18 | |
| 19 | - /** |
|
| 19 | +/** |
|
| 20 | 20 | * @databag user.name |
| 21 | 21 | * @databag page.number |
| 22 | 22 | */ |
| 23 | - public function withBags() |
|
| 24 | - { |
|
| 25 | - } |
|
| 23 | +public function withBags() |
|
| 24 | +{ |
|
| 25 | +} |
|
| 26 | 26 | |
| 27 | - /** |
|
| 27 | +/** |
|
| 28 | 28 | * @before funcBefore |
| 29 | 29 | * @after funcAfter |
| 30 | 30 | */ |
| 31 | - public function cbSingle() |
|
| 32 | - { |
|
| 33 | - } |
|
| 31 | +public function cbSingle() |
|
| 32 | +{ |
|
| 33 | +} |
|
| 34 | 34 | } |
@@ -7,176 +7,176 @@ |
||
| 7 | 7 | |
| 8 | 8 | class ExtendAnnotated extends FuncComponent |
| 9 | 9 | { |
| 10 | - /** |
|
| 10 | +/** |
|
| 11 | 11 | * @exclude |
| 12 | 12 | */ |
| 13 | - public function doNot() |
|
| 14 | - { |
|
| 15 | - } |
|
| 13 | +public function doNot() |
|
| 14 | +{ |
|
| 15 | +} |
|
| 16 | 16 | |
| 17 | - /** |
|
| 17 | +/** |
|
| 18 | 18 | * @exclude(true) |
| 19 | 19 | */ |
| 20 | - public function doNotBool() |
|
| 21 | - { |
|
| 22 | - } |
|
| 20 | +public function doNotBool() |
|
| 21 | +{ |
|
| 22 | +} |
|
| 23 | 23 | |
| 24 | - /** |
|
| 24 | +/** |
|
| 25 | 25 | * @exclude('Me') |
| 26 | 26 | */ |
| 27 | - public function doNotError() |
|
| 28 | - { |
|
| 29 | - } |
|
| 27 | +public function doNotError() |
|
| 28 | +{ |
|
| 29 | +} |
|
| 30 | 30 | |
| 31 | - /** |
|
| 31 | +/** |
|
| 32 | 32 | * @databag('name' => 'user.name') |
| 33 | 33 | * @databag('name' => 'page.number') |
| 34 | 34 | */ |
| 35 | - public function withBags() |
|
| 36 | - { |
|
| 37 | - } |
|
| 35 | +public function withBags() |
|
| 36 | +{ |
|
| 37 | +} |
|
| 38 | 38 | |
| 39 | - /** |
|
| 39 | +/** |
|
| 40 | 40 | * @databag('mane' => 'user.name') |
| 41 | 41 | * @databag('mane' => 'page.number') |
| 42 | 42 | */ |
| 43 | - public function withBagsError() |
|
| 44 | - { |
|
| 45 | - } |
|
| 43 | +public function withBagsError() |
|
| 44 | +{ |
|
| 45 | +} |
|
| 46 | 46 | |
| 47 | - /** |
|
| 47 | +/** |
|
| 48 | 48 | * @upload('field' => 'user-files') |
| 49 | 49 | */ |
| 50 | - public function saveFiles() |
|
| 51 | - { |
|
| 52 | - } |
|
| 50 | +public function saveFiles() |
|
| 51 | +{ |
|
| 52 | +} |
|
| 53 | 53 | |
| 54 | - /** |
|
| 54 | +/** |
|
| 55 | 55 | * @upload('name' => 'user-files') |
| 56 | 56 | */ |
| 57 | - public function saveFilesWrongName() |
|
| 58 | - { |
|
| 59 | - } |
|
| 57 | +public function saveFilesWrongName() |
|
| 58 | +{ |
|
| 59 | +} |
|
| 60 | 60 | |
| 61 | - /** |
|
| 61 | +/** |
|
| 62 | 62 | * @upload('field' => 'user-file1') |
| 63 | 63 | * @upload('field' => 'user-file2') |
| 64 | 64 | */ |
| 65 | - public function saveFilesMultiple() |
|
| 66 | - { |
|
| 67 | - } |
|
| 65 | +public function saveFilesMultiple() |
|
| 66 | +{ |
|
| 67 | +} |
|
| 68 | 68 | |
| 69 | - /** |
|
| 69 | +/** |
|
| 70 | 70 | * @before('call' => 'funcBefore') |
| 71 | 71 | * @after('call' => 'funcAfter') |
| 72 | 72 | */ |
| 73 | - public function cbSingle() |
|
| 74 | - { |
|
| 75 | - } |
|
| 73 | +public function cbSingle() |
|
| 74 | +{ |
|
| 75 | +} |
|
| 76 | 76 | |
| 77 | - /** |
|
| 77 | +/** |
|
| 78 | 78 | * @before('call' => 'funcBefore1') |
| 79 | 79 | * @before('call' => 'funcBefore2') |
| 80 | 80 | * @after('call' => 'funcAfter1') |
| 81 | 81 | * @after('call' => 'funcAfter2') |
| 82 | 82 | * @after('call' => 'funcAfter3') |
| 83 | 83 | */ |
| 84 | - public function cbMultiple() |
|
| 85 | - { |
|
| 86 | - } |
|
| 84 | +public function cbMultiple() |
|
| 85 | +{ |
|
| 86 | +} |
|
| 87 | 87 | |
| 88 | - /** |
|
| 88 | +/** |
|
| 89 | 89 | * @before('call' => 'funcBefore1', 'with' => ['param1']) |
| 90 | 90 | * @before('call' => 'funcBefore2', 'with' => ['param1', 'param2']) |
| 91 | 91 | * @after('call' => 'funcAfter1', 'with' => ['param1', 'param2']) |
| 92 | 92 | */ |
| 93 | - public function cbParams() |
|
| 94 | - { |
|
| 95 | - } |
|
| 93 | +public function cbParams() |
|
| 94 | +{ |
|
| 95 | +} |
|
| 96 | 96 | |
| 97 | - /** |
|
| 97 | +/** |
|
| 98 | 98 | * @di('attr' => 'colorService', 'class' => 'ColorService') |
| 99 | 99 | * @di('attr' => 'fontService', 'class' => 'FontService') |
| 100 | 100 | */ |
| 101 | - public function di1() |
|
| 102 | - { |
|
| 103 | - } |
|
| 101 | +public function di1() |
|
| 102 | +{ |
|
| 103 | +} |
|
| 104 | 104 | |
| 105 | - /** |
|
| 105 | +/** |
|
| 106 | 106 | * @di('attr' => 'colorService', 'class' => 'ColorService') |
| 107 | 107 | * @di('attr' => 'textService', 'class' => '\Jaxon\Annotations\Tests\Service\TextService') |
| 108 | 108 | */ |
| 109 | - public function di2() |
|
| 110 | - { |
|
| 111 | - } |
|
| 109 | +public function di2() |
|
| 110 | +{ |
|
| 111 | +} |
|
| 112 | 112 | |
| 113 | - /** |
|
| 113 | +/** |
|
| 114 | 114 | * @before('name' => 'funcBefore', 'with' => ['param1']) |
| 115 | 115 | */ |
| 116 | - public function cbBeforeNoCall() |
|
| 117 | - { |
|
| 118 | - } |
|
| 116 | +public function cbBeforeNoCall() |
|
| 117 | +{ |
|
| 118 | +} |
|
| 119 | 119 | |
| 120 | - /** |
|
| 120 | +/** |
|
| 121 | 121 | * @before('call' => 'funcBefore', 'params' => ['param1']) |
| 122 | 122 | */ |
| 123 | - public function cbBeforeUnknownAttr() |
|
| 124 | - { |
|
| 125 | - } |
|
| 123 | +public function cbBeforeUnknownAttr() |
|
| 124 | +{ |
|
| 125 | +} |
|
| 126 | 126 | |
| 127 | - /** |
|
| 127 | +/** |
|
| 128 | 128 | * @before('call' => 'funcBefore', 'with' => 'param1') |
| 129 | 129 | */ |
| 130 | - public function cbBeforeWrongAttrType() |
|
| 131 | - { |
|
| 132 | - } |
|
| 130 | +public function cbBeforeWrongAttrType() |
|
| 131 | +{ |
|
| 132 | +} |
|
| 133 | 133 | |
| 134 | - /** |
|
| 134 | +/** |
|
| 135 | 135 | * @after('name' => 'funcAfter', 'with' => ['param1']) |
| 136 | 136 | */ |
| 137 | - public function cbAfterNoCall() |
|
| 138 | - { |
|
| 139 | - } |
|
| 137 | +public function cbAfterNoCall() |
|
| 138 | +{ |
|
| 139 | +} |
|
| 140 | 140 | |
| 141 | - /** |
|
| 141 | +/** |
|
| 142 | 142 | * @after('call' => 'funcAfter', 'params' => ['param1']) |
| 143 | 143 | */ |
| 144 | - public function cbAfterUnknownAttr() |
|
| 145 | - { |
|
| 146 | - } |
|
| 144 | +public function cbAfterUnknownAttr() |
|
| 145 | +{ |
|
| 146 | +} |
|
| 147 | 147 | |
| 148 | - /** |
|
| 148 | +/** |
|
| 149 | 149 | * @after('call' => 'funcAfter', 'with' => true) |
| 150 | 150 | */ |
| 151 | - public function cbAfterWrongAttrType() |
|
| 152 | - { |
|
| 153 | - } |
|
| 151 | +public function cbAfterWrongAttrType() |
|
| 152 | +{ |
|
| 153 | +} |
|
| 154 | 154 | |
| 155 | - /** |
|
| 155 | +/** |
|
| 156 | 156 | * @di('attr' => 'attr', 'params' => '') |
| 157 | 157 | */ |
| 158 | - public function diUnknownAttr() |
|
| 159 | - { |
|
| 160 | - } |
|
| 158 | +public function diUnknownAttr() |
|
| 159 | +{ |
|
| 160 | +} |
|
| 161 | 161 | |
| 162 | - /** |
|
| 162 | +/** |
|
| 163 | 163 | * @di('attr' => [], 'class' => 'ClassName') |
| 164 | 164 | */ |
| 165 | - public function diWrongAttrType() |
|
| 166 | - { |
|
| 167 | - } |
|
| 165 | +public function diWrongAttrType() |
|
| 166 | +{ |
|
| 167 | +} |
|
| 168 | 168 | |
| 169 | - /** |
|
| 169 | +/** |
|
| 170 | 170 | * @di('attr' => 'attr', 'class' => true) |
| 171 | 171 | */ |
| 172 | - public function diWrongClassType() |
|
| 173 | - { |
|
| 174 | - } |
|
| 172 | +public function diWrongClassType() |
|
| 173 | +{ |
|
| 174 | +} |
|
| 175 | 175 | |
| 176 | - /** |
|
| 176 | +/** |
|
| 177 | 177 | * @di('attr' => 'attr', 'class' => 'ClassName', 'name' => 'di') |
| 178 | 178 | */ |
| 179 | - public function diWrongVarCount() |
|
| 180 | - { |
|
| 181 | - } |
|
| 179 | +public function diWrongVarCount() |
|
| 180 | +{ |
|
| 181 | +} |
|
| 182 | 182 | } |
@@ -21,18 +21,18 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | class ExtendClassAnnotated extends FuncComponent |
| 23 | 23 | { |
| 24 | - /** |
|
| 24 | +/** |
|
| 25 | 25 | * @var \Jaxon\Annotations\Tests\Service\ColorService |
| 26 | 26 | */ |
| 27 | - protected $colorService; |
|
| 27 | +protected $colorService; |
|
| 28 | 28 | |
| 29 | - /** |
|
| 29 | +/** |
|
| 30 | 30 | * @var TextService |
| 31 | 31 | */ |
| 32 | - protected $textService; |
|
| 32 | +protected $textService; |
|
| 33 | 33 | |
| 34 | - /** |
|
| 34 | +/** |
|
| 35 | 35 | * @var FontService |
| 36 | 36 | */ |
| 37 | - protected $fontService; |
|
| 37 | +protected $fontService; |
|
| 38 | 38 | } |
@@ -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 | } |