File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ Currently, you can check if a class:
166166``` php
167167$rules[] = Rule::allClasses()
168168 ->that(new ResideInOneOfTheseNamespaces('App\Domain'))
169- ->should(new DependsOnlyOnTheseNamespaces('App\Domain', 'Ramsey\Uuid'))
169+ ->should(new DependsOnlyOnTheseNamespaces([ 'App\Domain', 'Ramsey\Uuid'], ['App\Exluded'] ))
170170 ->because('we want to protect our domain from external dependencies except for Ramsey\Uuid');
171171```
172172
@@ -348,7 +348,7 @@ $rules[] = Rule::allClasses()
348348``` php
349349$rules[] = Rule::allClasses()
350350 ->that(new ResideInOneOfTheseNamespaces('App\Application'))
351- ->should(new NotDependsOnTheseNamespaces('App\Infrastructure'))
351+ ->should(new NotDependsOnTheseNamespaces([ 'App\Infrastructure'], ['App\Infrastructure\Repository'] ))
352352 ->because('we want to avoid coupling between application layer and infrastructure layer');
353353```
354354
You can’t perform that action at this time.
0 commit comments