arkitect icon indicating copy to clipboard operation
arkitect copied to clipboard

Implement no class feature

Open pfazzi opened this issue 3 years ago • 1 comments
trafficstars

Closes #315 allowing to write rules like:

Rule::noClass()
  ->should(new ResideInTheseNamespaces('App\Services'))
  ->because('this namespace has been deprecated in favor of the modular architecture');

or

Rule::noClass()
  ->that(new ResideInOneOfTheseNamespaces('App\Entity'))
  ->should(new HaveNameMatching('*Service'))
  ->because('of our naming convention');

pfazzi avatar Nov 22 '22 22:11 pfazzi

Codecov Report

Merging #316 (cd1fda2) into main (392757f) will increase coverage by 0.20%. The diff coverage is 92.85%.

@@             Coverage Diff              @@
##               main     #316      +/-   ##
============================================
+ Coverage     93.02%   93.23%   +0.20%     
- Complexity      476      487      +11     
============================================
  Files            60       62       +2     
  Lines          1262     1301      +39     
============================================
+ Hits           1174     1213      +39     
  Misses           88       88              
Impacted Files Coverage Δ
src/Rules/Specs.php 100.00% <ø> (ø)
src/Rules/NoClass.php 72.72% <72.72%> (ø)
src/CLI/TargetPhpVersion.php 100.00% <100.00%> (ø)
src/Expression/NegateDecorator.php 100.00% <100.00%> (ø)
src/Rules/Rule.php 100.00% <100.00%> (ø)
src/Rules/RuleBuilder.php 100.00% <100.00%> (+10.71%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Nov 22 '22 22:11 codecov-commenter