src/Standards/BestIt/Sniffs/TypeHints/ReturnTypeDeclarationSniff.php
protected function processToken(): void
    {
        $this->getFile()->recordMetric($this->stackPos, 'Has return type', 'no');

        $returnAnnotation = $this->loadReturnAnnotation();

        if (!$this->isFilledReturnAnnotation($returnAnnotation) ||
            ($returnTypes = $this->getUsableReturnTypes($returnAnnotation))) {
            $this->validateReturnType($returnTypes ?? null);
        }
    }
protected function processToken(): void
    {
        $this->getFile()->recordMetric($this->stackPos, 'Has return type', 'no');

        $returnAnnotation = $this->loadReturnAnnotation();

        if (!$this->isFilledReturnAnnotation($returnAnnotation) ||
            ($returnTypes = $this->getUsableReturnTypes($returnAnnotation))) {
            $this->validateReturnType($returnTypes ?? null);
        }
    }
protected function processToken ( ) : void { $ this -> getFile ( ) -> recordMetric ( $ this -> stackPos , 'Has return type' , 'no' ) ; $ returnAnnotation = $ this -> loadReturnAnnotation ( ) ; if ( ! $ this -> isFilledReturnAnnotation ( $ returnAnnotation ) || ( $ returnTypes = $ this -> getUsableReturnTypes ( $ returnAnnotation ) ) ) { $ this -> validateReturnType ( $ returnTypes ?? null ) ; } }
Check method return type based with its return annotation.

@throws CodeWarning

@return void
Check method return type based with its return annotation .