X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fpsy%2Fpsysh%2Fsrc%2FPsy%2FCodeCleaner%2FInstanceOfPass.php;fp=vendor%2Fpsy%2Fpsysh%2Fsrc%2FPsy%2FCodeCleaner%2FInstanceOfPass.php;h=0000000000000000000000000000000000000000;hp=78ce98e93082e78e9607d9475df8b46a2176162b;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/psy/psysh/src/Psy/CodeCleaner/InstanceOfPass.php b/vendor/psy/psysh/src/Psy/CodeCleaner/InstanceOfPass.php deleted file mode 100644 index 78ce98e93..000000000 --- a/vendor/psy/psysh/src/Psy/CodeCleaner/InstanceOfPass.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -class InstanceOfPass extends CodeCleanerPass -{ - const EXCEPTION_MSG = 'instanceof expects an object instance, constant given'; - - /** - * Validate that the instanceof statement does not receive a scalar value or a non-class constant. - * - * @throws FatalErrorException if a scalar or a non-class constant is given - * - * @param Node $node - */ - public function enterNode(Node $node) - { - if (!$node instanceof Instanceof_) { - return; - } - - if (($node->expr instanceof Scalar && !$node->expr instanceof Encapsed) || $node->expr instanceof ConstFetch) { - throw new FatalErrorException(self::EXCEPTION_MSG, 0, E_ERROR, null, $node->getLine()); - } - } -}