protected function is_safe_casted( $stackPtr ) {

		// Get the last non-empty token.
		$prev = $this->phpcsFile->findPrevious(
			Tokens::$emptyTokens,
			( $stackPtr - 1 ),
			null,
			true
		);

		if ( false === $prev ) {
			return false;
		}

		// Check if it is a safe cast.
		return isset( $this->safe_casts[ $this->tokens[ $prev ]['code'] ] );
	}
protected function is_safe_casted( $stackPtr ) {

		// Get the last non-empty token.
		$prev = $this->phpcsFile->findPrevious(
			Tokens::$emptyTokens,
			( $stackPtr - 1 ),
			null,
			true
		);

		if ( false === $prev ) {
			return false;
		}

		// Check if it is a safe cast.
		return isset( $this->safe_casts[ $this->tokens[ $prev ]['code'] ] );
	}
protected function is_safe_casted ( $ stackPtr ) { // Get the last non-empty token. $ prev = $ this -> phpcsFile -> findPrevious ( Tokens :: $ emptyTokens , ( $ stackPtr - 1 ) , null , true ) ; if ( false === $ prev ) { return false ; } // Check if it is a safe cast. return isset ( $ this -> safe_casts [ $ this -> tokens [ $ prev ] [ 'code' ] ] ) ; }
Check if something is being casted to a safe value.

@since 0.5.0

@param int $stackPtr The index of the token in the stack.

@return bool Whether the token being casted.
Check if something is being casted to a safe value .