src/Standards/BestIt/Sniffs/DocTags/RequiredMethodTagsSniff.php
private function isMagicFunctionWithoutReturn(): bool
    {
        $whitelist = [
            '__construct',
            '__destruct',
            '__clone',
            '__wakeup',
            '__set',
            '__unset',
        ];

        $stackToken = $this->tokens[$this->stackPos];

        $functionNamePtr = $this->file->getBaseFile()->findNext(
            [T_STRING],
            $this->stackPos + 1,
            $stackToken['parenthesis_opener']
        );

        $functionNameToken = $this->tokens[$functionNamePtr];

        return in_array($functionNameToken['content'], $whitelist, true);
    }
private function isMagicFunctionWithoutReturn(): bool
    {
        $whitelist = [
            '__construct',
            '__destruct',
            '__clone',
            '__wakeup',
            '__set',
            '__unset',
        ];

        $stackToken = $this->tokens[$this->stackPos];

        $functionNamePtr = $this->file->getBaseFile()->findNext(
            [T_STRING],
            $this->stackPos + 1,
            $stackToken['parenthesis_opener']
        );

        $functionNameToken = $this->tokens[$functionNamePtr];

        return in_array($functionNameToken['content'], $whitelist, true);
    }
private function isMagicFunctionWithoutReturn ( ) : bool { $ whitelist = [ '__construct' , '__destruct' , '__clone' , '__wakeup' , '__set' , '__unset' , ] ; $ stackToken = $ this -> tokens [ $ this -> stackPos ] ; $ functionNamePtr = $ this -> file -> getBaseFile ( ) -> findNext ( [ T_STRING ] , $ this -> stackPos + 1 , $ stackToken [ 'parenthesis_opener' ] ) ; $ functionNameToken = $ this -> tokens [ $ functionNamePtr ] ; return in_array ( $ functionNameToken [ 'content' ] , $ whitelist , true ) ; }
Checks if the listener function is a magic php function without return.

@return bool Indicator if the current function is not a whitelisted function
Checks if the listener function is a magic php function without return .