Skip to content
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
codeigniter4
shield
Repository navigation
Code
Issues
4
(4)
Pull requests
12
(12)
Discussions
Actions
Projects
Security and quality
4
(4)
Insights
More
items
Files
Expand file tree
develop
Breadcrumbs
shield
/
structarmed.php
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
37 lines (32 loc) · 1.43 KB
develop
Breadcrumbs
shield
/
structarmed.php
Copy path
Top
File metadata and controls
Code
Blame
37 lines (32 loc) · 1.43 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<?php
declare(strict_types=1);
use Boundwize\StructArmed\Architecture;
use Boundwize\StructArmed\Preset\Preset;
use Boundwize\StructArmed\Preset\Presets\Psr4Preset;
use Boundwize\StructArmed\Rule\Rules\Class_\ExtendedClassMustBeAbstractOrInstantiatedRule;
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())
->rule('base_classes.must_be_abstract', new ExtendedClassMustBeAbstractOrInstantiatedRule('Source', '/^CodeIgniter\\\\Shield\\\\.*Base.*$/'))
->layer('tests', __DIR__ . '/tests')
->layerPattern('Model', '/^CodeIgniter\\\\Shield\\\\.*Model$/')
->layerPattern('Controller', '/^CodeIgniter\\\\Shield\\\\Controllers\\\\.*$/')
->layerPattern('Config', '/^CodeIgniter\\\\Shield\\\\Config\\\\.*$/', '/^.*Services$/')
->layerPattern('Entity', '/^CodeIgniter\\\\Shield\\\\Entities\\\\.*$/')
->layerPattern('Service', '/^.*Services$/')
->ruleset([
'Entity' => ['Config', 'Model', 'Service'],
'Config' => ['Model', 'Service'],
'Model' => ['Config', 'Entity', 'Service'],
'Service' => ['Config'],
]);
You can’t perform that action at this time.