PhpMigration\Changes\v5dot6\IncompMisc::leaveNode PHP Метод

leaveNode() публичный Метод

public leaveNode ( $node )
    public function leaveNode($node)
    {
        // json_decode()
        if ($node instanceof Expr\FuncCall && ParserHelper::isSameFunc($node->name, 'json_decode')) {
            /**
             * {Description}
             * json_decode() now rejects non-lowercase variants of the JSON
             * literals true, false and null at all times, as per the JSON
             * specification, and sets json_last_error() accordingly.
             * Previously, inputs to json_decode() that consisted solely of one
             * of these values in upper or mixed case were accepted.
             *
             * This change will only affect cases where invalid JSON was being
             * passed to json_decode(): valid JSON input is unaffected and will
             * continue to be parsed normally.
             *
             * {Reference}
             * http://php.net/manual/en/migration56.incompatible.php#migration56.incompatible.json-decode
             */
            $this->addSpot('NOTICE', false, 'json_decode() rejects non-lowercase variants of true, false, null');
            // GMP
        } elseif ($node instanceof Expr\FuncCall && $this->gmpTable->has($node->name)) {
            /**
             * {Description}
             * GMP resources are now objects. The functional API implemented in
             * the GMP extension has not changed, and code should run
             * unmodified unless it checks explicitly for a resource using
             * is_resource() or similar.
             *
             * {Reference}
             * http://php.net/manual/en/migration56.incompatible.php#migration56.incompatible.gmp
             */
            $this->addSpot('NOTICE', false, 'GMP resource is now object, do not use is_resource() to test');
            // Mcrypt
        } elseif ($node instanceof Expr\FuncCall && $this->mcryptTable->has($node->name)) {
            /**
             * {Description}
             * mcrypt_encrypt(), mcrypt_decrypt(), mcrypt_cbc(), mcrypt_cfb(),
             * mcrypt_ecb(), mcrypt_generic() and mcrypt_ofb() will no longer
             * accept keys or IVs with incorrect sizes, and block cipher modes
             * that require IVs will now fail if an IV isn't provided.
             *
             * {Reference}
             * http://php.net/manual/en/migration56.incompatible.php#migration56.incompatible.mcrypt
             */
            $this->addSpot('NOTICE', false, $node->name . '() no longer accept keys or IVs with incorrect size');
        }
    }