introduce deptrac, move a whole lot of stuff around
parent
a58db4b5d7
commit
ee8253ba71
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Deptrac\Deptrac\Contract\Config\Collector\BoolConfig;
|
||||
use Deptrac\Deptrac\Contract\Config\Collector\ClassLikeConfig;
|
||||
use Deptrac\Deptrac\Contract\Config\Collector\LayerConfig;
|
||||
use Deptrac\Deptrac\Contract\Config\DeptracConfig;
|
||||
use Deptrac\Deptrac\Contract\Config\Layer;
|
||||
use Deptrac\Deptrac\Contract\Config\Ruleset;
|
||||
|
||||
return static function (DeptracConfig $config): void {
|
||||
$config
|
||||
->paths('./src')
|
||||
->excludeFiles('#.*test.*#')
|
||||
->layers(
|
||||
$analyzePublic = Layer::withName('AnalyzePublic')->collectors(
|
||||
ClassLikeConfig::create('Kartierung\\Analyze\\Exception\\.+'),
|
||||
ClassLikeConfig::create('Kartierung\\Analyze\\Result\\.+')
|
||||
),
|
||||
$analyze = Layer::withName('Analyze')->collectors(
|
||||
BoolConfig::create(
|
||||
must: [ClassLikeConfig::create('Kartierung\\Analyze\\.+')],
|
||||
mustNot: [
|
||||
LayerConfig::create($analyzePublic)
|
||||
]
|
||||
)
|
||||
),
|
||||
$attribute = Layer::withName('Attribute')->collectors(
|
||||
ClassLikeConfig::create('Kartierung\\Attribute\\.*'),
|
||||
),
|
||||
)
|
||||
->rulesets(
|
||||
Ruleset::forLayer($analyze)
|
||||
->accesses($attribute)
|
||||
->accesses($analyzePublic),
|
||||
);
|
||||
};
|
||||
Loading…
Reference in New Issue