File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
tests/Unit/Domain/Entities Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public function calculateInstability(): void
4444 continue ;
4545 }
4646
47- if ($ otherClass ->hasDependency ($ givenClass )) {
47+ if ($ otherClass ->isDependentOn ($ givenClass )) {
4848 $ givenClass ->incrementAfferent ();
4949 }
5050 }
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public function incrementAfferent(): void
4848 $ this ->coupling ->incrementAfferent ();
4949 }
5050
51- public function hasDependency (ClassDependencies $ otherClass ): bool
51+ public function isDependentOn (ClassDependencies $ otherClass ): bool
5252 {
5353 return $ this ->dependencies ->knows ($ otherClass ->fqcn );
5454 }
Original file line number Diff line number Diff line change 4343 ->withFqcn ('C ' )
4444 ->build ();
4545
46- expect ($ classDependencies ->hasDependency ($ c ))->toBeFalse ();
46+ expect ($ classDependencies ->isDependentOn ($ c ))->toBeFalse ();
4747});
4848
4949test ('it correctly checks if a class is a dependency ' , function () {
5959 ->withFqcn ('B ' )
6060 ->build ();
6161
62- expect ($ classDependencies ->hasDependency ($ b ))->toBeTrue ();
62+ expect ($ classDependencies ->isDependentOn ($ b ))->toBeTrue ();
6363});
6464
6565test ('it calculates the abstractness correctly ' , function () {
You can’t perform that action at this time.
0 commit comments