@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @param string $className |
28 | 28 | * |
29 | - * @return ClassReflection |
|
29 | + * @return string |
|
30 | 30 | */ |
31 | 31 | public static function createReflectionClass($className) |
32 | 32 | { |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | * @param string $className |
130 | 130 | * @param string $tag |
131 | 131 | * |
132 | - * @return string|bool |
|
132 | + * @return false|string |
|
133 | 133 | */ |
134 | 134 | public static function getFirstTagValue(string $className, string $tag) |
135 | 135 | { |
@@ -177,10 +177,9 @@ discard block |
||
177 | 177 | /** |
178 | 178 | * Get the tag configuration from this method and respect multiple line and space configuration. |
179 | 179 | * |
180 | - * @param MethodReflection|ClassReflection $reflectionObject |
|
181 | - * @param array $tagNames |
|
180 | + * @param string[] $tagNames |
|
182 | 181 | * |
183 | - * @return array |
|
182 | + * @return string |
|
184 | 183 | */ |
185 | 184 | public static function getTagConfigurationForMethod($className, $methodName, array $tagNames): array |
186 | 185 | { |
@@ -207,8 +206,8 @@ discard block |
||
207 | 206 | /** |
208 | 207 | * Get the tag configuration from this method and respect multiple line and space configuration. |
209 | 208 | * |
210 | - * @param MethodReflection|ClassReflection $reflectionObject |
|
211 | - * @param array $tagNames |
|
209 | + * @param string[] $tagNames |
|
210 | + * @param string $className |
|
212 | 211 | * |
213 | 212 | * @return array |
214 | 213 | */ |
@@ -7,13 +7,11 @@ |
||
7 | 7 | |
8 | 8 | namespace HDNET\Autoloader\Utility; |
9 | 9 | |
10 | -use HDNET\Autoloader\Hooks\ClearCache; |
|
11 | 10 | use TYPO3\CMS\Core\Utility\GeneralUtility; |
12 | 11 | use TYPO3\CMS\Core\Utility\VersionNumberUtility; |
13 | 12 | use TYPO3\CMS\Extbase\Reflection\ClassReflection; |
14 | 13 | use TYPO3\CMS\Extbase\Reflection\MethodReflection; |
15 | 14 | use TYPO3\CMS\Extbase\Reflection\ReflectionService; |
16 | -use TYPO3\CMS\Extbase\Utility\DebuggerUtility; |
|
17 | 15 | |
18 | 16 | /** |
19 | 17 | * Reflection helper. |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public static function isInstantiable($className):bool |
44 | 44 | { |
45 | - if(self::is9orHigher()) { |
|
45 | + if (self::is9orHigher()) { |
|
46 | 46 | $reflectionClass = new \ReflectionClass($className); |
47 | 47 | return (bool)$reflectionClass->isInstantiable(); |
48 | 48 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } |
140 | 140 | $values = $classReflection->getTagValues($tag); |
141 | 141 | if (\is_array($values)) { |
142 | - return \trim((string) $values[0]); |
|
142 | + return \trim((string)$values[0]); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | return false; |
@@ -60,7 +60,7 @@ |
||
60 | 60 | foreach (ReflectionUtility::getPublicMethodNames($hookClass) as $methodName) { |
61 | 61 | $tagConfiguration = ReflectionUtility::getTagConfigurationForMethod($hookClass, $methodName, ['hook']); |
62 | 62 | if (\count($tagConfiguration['hook']) > 0) { |
63 | - $hookLocations = \array_map(function ($hook) { |
|
63 | + $hookLocations = \array_map(function($hook) { |
|
64 | 64 | return \trim($hook, " \t\n\r\0\x0B|"); |
65 | 65 | }, $tagConfiguration['hook']); |
66 | 66 |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $return = false; |
61 | 61 | } else { |
62 | 62 | $classReflection = ReflectionUtility::createReflectionClass($className); |
63 | - $return = !(bool) (!ReflectionUtility::isInstantiable($className) || !$classReflection->isTaggedWith('db')); |
|
63 | + $return = !(bool)(!ReflectionUtility::isInstantiable($className) || !$classReflection->isTaggedWith('db')); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | // if ($registerAutoLoader) { |