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
44
44
continue ;
45
45
}
46
46
47
- if ($ otherClass ->hasDependency ($ givenClass )) {
47
+ if ($ otherClass ->isDependentOn ($ givenClass )) {
48
48
$ givenClass ->incrementAfferent ();
49
49
}
50
50
}
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public function incrementAfferent(): void
48
48
$ this ->coupling ->incrementAfferent ();
49
49
}
50
50
51
- public function hasDependency (ClassDependencies $ otherClass ): bool
51
+ public function isDependentOn (ClassDependencies $ otherClass ): bool
52
52
{
53
53
return $ this ->dependencies ->knows ($ otherClass ->fqcn );
54
54
}
Original file line number Diff line number Diff line change 43
43
->withFqcn ('C ' )
44
44
->build ();
45
45
46
- expect ($ classDependencies ->hasDependency ($ c ))->toBeFalse ();
46
+ expect ($ classDependencies ->isDependentOn ($ c ))->toBeFalse ();
47
47
});
48
48
49
49
test ('it correctly checks if a class is a dependency ' , function () {
59
59
->withFqcn ('B ' )
60
60
->build ();
61
61
62
- expect ($ classDependencies ->hasDependency ($ b ))->toBeTrue ();
62
+ expect ($ classDependencies ->isDependentOn ($ b ))->toBeTrue ();
63
63
});
64
64
65
65
test ('it calculates the abstractness correctly ' , function () {
You can’t perform that action at this time.
0 commit comments