@@ 775-791 (lines=17) @@ | ||
772 | * |
|
773 | * @return void |
|
774 | */ |
|
775 | private function processReturnTypeToken(\PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
|
776 | { |
|
777 | $returnTypeHint = $this->getReturnTypeHintName($phpcsFile, $stackPtr); |
|
778 | $returnTypeHint = ltrim($returnTypeHint, '\\'); |
|
779 | $returnTypeHintLc = strtolower($returnTypeHint); |
|
780 | ||
781 | if (isset($this->newClasses[$returnTypeHintLc]) === false) { |
|
782 | return; |
|
783 | } |
|
784 | ||
785 | // Still here ? Then this is a return type declaration using a new class. |
|
786 | $itemInfo = array( |
|
787 | 'name' => $returnTypeHint, |
|
788 | 'nameLc' => $returnTypeHintLc, |
|
789 | ); |
|
790 | $this->handleFeature($phpcsFile, $stackPtr, $itemInfo); |
|
791 | } |
|
792 | ||
793 | ||
794 | /** |
@@ 288-304 (lines=17) @@ | ||
285 | * |
|
286 | * @return void |
|
287 | */ |
|
288 | private function processReturnTypeToken(\PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
|
289 | { |
|
290 | $returnTypeHint = $this->getReturnTypeHintName($phpcsFile, $stackPtr); |
|
291 | $returnTypeHint = ltrim($returnTypeHint, '\\'); |
|
292 | $returnTypeHintLc = strtolower($returnTypeHint); |
|
293 | ||
294 | if (isset($this->newInterfaces[$returnTypeHintLc]) === false) { |
|
295 | return; |
|
296 | } |
|
297 | ||
298 | // Still here ? Then this is a return type declaration using a new interface. |
|
299 | $itemInfo = array( |
|
300 | 'name' => $returnTypeHint, |
|
301 | 'nameLc' => $returnTypeHintLc, |
|
302 | ); |
|
303 | $this->handleFeature($phpcsFile, $stackPtr, $itemInfo); |
|
304 | } |
|
305 | ||
306 | ||
307 | /** |