File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 66
77use hiqdev \php \billing \product \trait \HasLockInterface ;
88
9+ /**
10+ * @template TParentCollection
11+ * @implements HasBehaviorsInterface<TParentCollection>
12+ */
913abstract class BehaviorRegistry implements HasLockInterface, HasBehaviorsInterface
1014{
15+ /**
16+ * @return BehaviorCollectionInterface<TParentCollection>
17+ */
1118 abstract protected function getBehaviorCollection (): BehaviorCollectionInterface ;
1219
1320 public function hasBehavior (string $ behaviorClassName ): bool
@@ -23,7 +30,7 @@ public function hasBehavior(string $behaviorClassName): bool
2330
2431 public function findBehaviorByClass (string $ class )
2532 {
26- foreach ($ this ->withBehaviors () as $ behavior ) {
33+ foreach ($ this ->getBehaviorCollection () as $ behavior ) {
2734 if ($ behavior instanceof $ class ) {
2835 return $ behavior ;
2936 }
You can’t perform that action at this time.
0 commit comments