@@ -49,7 +49,7 @@ public function __construct(bool $isInterceptFunctions = false)
49
49
*
50
50
* @param Aop\Advisor[] $advisors List of advisor to match
51
51
*
52
- * @return Aop\Advice[] List of advices for class
52
+ * @return Aop\Advice[][][] List of advices for function
53
53
*/
54
54
public function getAdvicesForFunctions (ReflectionFileNamespace $ namespace , array $ advisors ): array
55
55
{
@@ -81,7 +81,7 @@ public function getAdvicesForFunctions(ReflectionFileNamespace $namespace, array
81
81
*
82
82
* @param array|Aop\Advisor[] $advisors List of advisor to match
83
83
*
84
- * @return Aop\Advice[][] List of advices for class
84
+ * @return Aop\Advice[][][] List of advices for class
85
85
*/
86
86
public function getAdvicesForClass (ReflectionClass $ class , array $ advisors ): array
87
87
{
@@ -103,7 +103,7 @@ public function getAdvicesForClass(ReflectionClass $class, array $advisors): arr
103
103
104
104
if ($ advisor instanceof IntroductionAdvisor) {
105
105
if ($ advisor ->getClassFilter ()->matches ($ class )) {
106
- $ classAdvices [] = $ this ->getIntroductionFromAdvisor ($ originalClass , $ advisor, $ advisorId );
106
+ $ classAdvices [] = $ this ->getIntroductionFromAdvisor ($ originalClass , $ advisor );
107
107
}
108
108
}
109
109
}
@@ -172,11 +172,12 @@ private function getAdvicesFromAdvisor(
172
172
173
173
/**
174
174
* Returns list of introduction advices from advisor
175
+ *
176
+ * @return Aop\IntroductionInfo[][][]
175
177
*/
176
178
private function getIntroductionFromAdvisor (
177
179
ReflectionClass $ class ,
178
- IntroductionAdvisor $ advisor ,
179
- string $ advisorId
180
+ IntroductionAdvisor $ advisor
180
181
): array {
181
182
$ classAdvices = [];
182
183
// Do not make introduction for traits
@@ -190,13 +191,13 @@ private function getIntroductionFromAdvisor(
190
191
if (!empty ($ introducedTrait )) {
191
192
$ introducedTrait = '\\' . ltrim ($ introducedTrait , '\\' );
192
193
193
- $ classAdvices [AspectContainer::INTRODUCTION_TRAIT_PREFIX ][$ advisorId ] = $ introducedTrait ;
194
+ $ classAdvices [AspectContainer::INTRODUCTION_TRAIT_PREFIX ][' root ' ][ $ introducedTrait ] = $ introduction ;
194
195
}
195
196
$ introducedInterface = $ introduction ->getInterface ();
196
197
if (!empty ($ introducedInterface )) {
197
198
$ introducedInterface = '\\' . ltrim ($ introducedInterface , '\\' );
198
199
199
- $ classAdvices [AspectContainer::INTRODUCTION_INTERFACE_PREFIX ][$ advisorId ] = $ introducedInterface ;
200
+ $ classAdvices [AspectContainer::INTRODUCTION_INTERFACE_PREFIX ][' root ' ][ $ introducedInterface ] = $ introduction ;
200
201
}
201
202
202
203
return $ classAdvices ;
0 commit comments