@@ -62,6 +62,9 @@ discard block |
||
62 | 62 | return class_exists($eventName, false) ? $this->addOriginInterfaceListeners($eventName, $listeners) : $listeners; |
63 | 63 | } |
64 | 64 | |
65 | + /** |
|
66 | + * @param string $string |
|
67 | + */ |
|
65 | 68 | private function error($string) |
66 | 69 | { |
67 | 70 | app(ErrorPrinter::class)->pended[] = $string; |
@@ -96,6 +99,9 @@ discard block |
||
96 | 99 | } |
97 | 100 | } |
98 | 101 | |
102 | + /** |
|
103 | + * @return string |
|
104 | + */ |
|
99 | 105 | private function stringify($event) |
100 | 106 | { |
101 | 107 | return is_object($event) ? get_class($event) : $event; |
@@ -117,6 +123,9 @@ discard block |
||
117 | 123 | return 'The method of '.$at.' is not callable as an event listener for "'.$e.'" event'; |
118 | 124 | } |
119 | 125 | |
126 | + /** |
|
127 | + * @return string |
|
128 | + */ |
|
120 | 129 | protected function getTypeHintedClass($listenerObj, $methodName) |
121 | 130 | { |
122 | 131 | try { |
@@ -142,6 +151,9 @@ discard block |
||
142 | 151 | return $listeners; |
143 | 152 | } |
144 | 153 | |
154 | + /** |
|
155 | + * @param \Closure $listener |
|
156 | + */ |
|
145 | 157 | private function stringifyClosure($listener) |
146 | 158 | { |
147 | 159 | try { |
@@ -2,12 +2,12 @@ |
||
2 | 2 | |
3 | 3 | namespace Imanghafoori\LaravelMicroscope\SpyClasses; |
4 | 4 | |
5 | -use ReflectionFunction; |
|
6 | -use ReflectionException; |
|
7 | -use Illuminate\Support\Str; |
|
8 | 5 | use Illuminate\Events\Dispatcher; |
6 | +use Illuminate\Support\Str; |
|
9 | 7 | use Imanghafoori\LaravelMicroscope\Analyzers\FilePath; |
10 | 8 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
9 | +use ReflectionException; |
|
10 | +use ReflectionFunction; |
|
11 | 11 | |
12 | 12 | class SpyDispatcher extends Dispatcher |
13 | 13 | { |