forked from codeigniter4/queue
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructarmed.php
More file actions
42 lines (38 loc) · 1.42 KB
/
Copy pathstructarmed.php
File metadata and controls
42 lines (38 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
declare(strict_types=1);
/**
* This file is part of CodeIgniter Queue.
*
* (c) CodeIgniter Foundation <admin@codeigniter.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
use Boundwize\StructArmed\Architecture;
use Boundwize\StructArmed\Preset\Preset;
use Boundwize\StructArmed\Preset\Presets\Psr4Preset;
use Boundwize\StructArmed\Rule\Rules\Class_\MustBeFinalRule;
return Architecture::define()
->rule(
'tests.must_be_final',
new MustBeFinalRule(layer: 'tests'),
)
->skip([
Psr4Preset::CLASSES_MUST_MATCH_COMPOSER => [
__DIR__ . '/src/Database/Migrations',
],
])
->cacheDirectory(is_dir('/tmp') ? '/tmp/structarmed' : null)
->withPresets(Preset::PSR4(), Preset::CODEQUALITY())
->layer('tests', __DIR__ . '/tests')
->layerPattern('Model', '/^CodeIgniter\\\\Queue\\\\.*Model$/')
->layerPattern('Controller', '/^CodeIgniter\\\\Queue\\\\Controllers\\\\.*$/')
->layerPattern('Config', '/^CodeIgniter\\\\Queue\\\\Config\\\\.*$/', '/^.*Services$/')
->layerPattern('Entity', '/^CodeIgniter\\\\Queue\\\\Entities\\\\.*$/')
->layerPattern('Service', '/^.*Services$/')
->ruleset([
'Entity' => ['Config', 'Model', 'Service'],
'Config' => ['Service'],
'Model' => ['Config', 'Entity', 'Service'],
'Service' => ['Config'],
]);