Updated from some -dev modules to alpha, beta or full releases
[yaffs-website] / vendor / psy / psysh / src / Reflection / ReflectionLanguageConstruct.php
index 3e5325b8560511f14ba967728da1dbabd3d0cada..bda0819467b19ece0a9f0cb69a724d6cd5a0cea4 100644 (file)
@@ -76,7 +76,7 @@ class ReflectionLanguageConstruct extends \ReflectionFunctionAbstract
      */
     public function __construct($keyword)
     {
-        if (self::isLanguageConstruct($keyword)) {
+        if (!self::isLanguageConstruct($keyword)) {
             throw new \InvalidArgumentException('Unknown language construct: ' . $keyword);
         }
 
@@ -128,6 +128,18 @@ class ReflectionLanguageConstruct extends \ReflectionFunctionAbstract
         return $params;
     }
 
+    /**
+     * Gets the file name from a language construct.
+     *
+     * (Hint: it always returns false)
+     *
+     * @return bool false
+     */
+    public function getFileName()
+    {
+        return false;
+    }
+
     /**
      * To string.
      *