|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +use Boundwize\StructArmed\Architecture; |
| 6 | +use Boundwize\StructArmed\Preset\Preset; |
| 7 | + |
| 8 | +return Architecture::define() |
| 9 | + ->withPresets(Preset::PSR4(), Preset::CODEQUALITY()) |
| 10 | + |
| 11 | + ->layer('ColorEnum', 'src/ColorEnum.php') |
| 12 | + ->layer('VisibilityEnum', 'src/VisibilityEnum.php') |
| 13 | + ->layer('Context', 'src/Context.php') |
| 14 | + ->layer('Config', 'src/Config.php') |
| 15 | + ->layer('Message', 'src/Message.php') |
| 16 | + ->layer('Maker', 'src/Maker.php') |
| 17 | + ->layer('IO', 'src/IO/') |
| 18 | + ->layer('Exception', 'src/Exception/') |
| 19 | + ->layer('BaseComponent', ['src/Component.php', 'src/Component/'], 'src/Component/Method/') |
| 20 | + ->layer('MethodComponent', 'src/Component/Method/') |
| 21 | + ->layer('FileSystem', ['src/FileSystem.php', 'src/FileSystem/']) |
| 22 | + ->layer('CommonType', 'src/Type/', [ |
| 23 | + 'src/Type/Form/', |
| 24 | + 'src/Type/Handler/', |
| 25 | + 'src/Type/Input/', |
| 26 | + 'src/Type/InputFilter/', |
| 27 | + ]) |
| 28 | + ->layer('FormType', 'src/Type/Form/') |
| 29 | + ->layer('HandlerType', 'src/Type/Handler/', 'src/Type/Handler/Api/') |
| 30 | + ->layer('ApiHandlerType', 'src/Type/Handler/Api/') |
| 31 | + ->layer('InputType', 'src/Type/Input/') |
| 32 | + ->layer('InputFilterType', 'src/Type/InputFilter/') |
| 33 | + ->ruleset([ |
| 34 | + 'ColorEnum' => [], |
| 35 | + 'VisibilityEnum' => [], |
| 36 | + 'Context' => [], |
| 37 | + 'IO' => ['ColorEnum'], |
| 38 | + 'Message' => ['ColorEnum', 'Context'], |
| 39 | + 'BaseComponent' => ['Context', 'VisibilityEnum', 'MethodComponent'], |
| 40 | + 'MethodComponent' => ['+BaseComponent'], |
| 41 | + 'Exception' => ['FileSystem'], |
| 42 | + 'FileSystem' => ['+BaseComponent', 'Exception'], |
| 43 | + 'FormType' => ['CommonType', 'Config', '+FileSystem', '+IO', '+Message'], |
| 44 | + 'HandlerType' => ['CommonType', 'Config', '+FileSystem', '+IO', '+Message'], |
| 45 | + 'ApiHandlerType' => ['+HandlerType'], |
| 46 | + 'InputType' => ['CommonType', 'Config', '+FileSystem', '+IO', '+Message'], |
| 47 | + 'InputFilterType' => ['CommonType', 'Config', '+FileSystem', '+IO', '+Message'], |
| 48 | + 'CommonType' => ['+FormType', '+ApiHandlerType', '+InputType', '+InputFilterType'], |
| 49 | + 'Maker' => ['+CommonType'], |
| 50 | + 'Config' => ['Maker'], |
| 51 | + ]); |
0 commit comments