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