Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / psy / psysh / src / Reflection / ReflectionLanguageConstruct.php
similarity index 75%
rename from vendor/psy/psysh/src/Psy/Reflection/ReflectionLanguageConstruct.php
rename to vendor/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php
index defa684b168e88a772b01228f02dab7d8530a805..3e5325b8560511f14ba967728da1dbabd3d0cada 100644 (file)
@@ -3,7 +3,7 @@
 /*
  * This file is part of Psy Shell.
  *
- * (c) 2012-2017 Justin Hileman
+ * (c) 2012-2018 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -21,58 +21,58 @@ class ReflectionLanguageConstruct extends \ReflectionFunctionAbstract
     /**
      * Language construct parameter definitions.
      */
-    private static $languageConstructs = array(
-        'isset' => array(
-            'var' => array(),
-            '...' => array(
+    private static $languageConstructs = [
+        'isset' => [
+            'var' => [],
+            '...' => [
                 'isOptional'   => true,
                 'defaultValue' => null,
-            ),
-        ),
+            ],
+        ],
 
-        'unset' => array(
-            'var' => array(),
-            '...' => array(
+        'unset' => [
+            'var' => [],
+            '...' => [
                 'isOptional'   => true,
                 'defaultValue' => null,
-            ),
-        ),
+            ],
+        ],
 
-        'empty' => array(
-            'var' => array(),
-        ),
+        'empty' => [
+            'var' => [],
+        ],
 
-        'echo' => array(
-            'arg1' => array(),
-            '...'  => array(
+        'echo' => [
+            'arg1' => [],
+            '...'  => [
                 'isOptional'   => true,
                 'defaultValue' => null,
-            ),
-        ),
+            ],
+        ],
 
-        'print' => array(
-            'arg' => array(),
-        ),
+        'print' => [
+            'arg' => [],
+        ],
 
-        'die' => array(
-            'status' => array(
+        'die' => [
+            'status' => [
                 'isOptional'   => true,
                 'defaultValue' => 0,
-            ),
-        ),
+            ],
+        ],
 
-        'exit' => array(
-            'status' => array(
+        'exit' => [
+            'status' => [
                 'isOptional'   => true,
                 'defaultValue' => 0,
-            ),
-        ),
-    );
+            ],
+        ],
+    ];
 
     /**
      * Construct a ReflectionLanguageConstruct object.
      *
-     * @param string $name
+     * @param string $keyword
      */
     public function __construct($keyword)
     {
@@ -116,11 +116,11 @@ class ReflectionLanguageConstruct extends \ReflectionFunctionAbstract
     /**
      * Get language construct params.
      *
-     * @return
+     * @return array
      */
     public function getParameters()
     {
-        $params = array();
+        $params = [];
         foreach (self::$languageConstructs[$this->keyword] as $parameter => $opts) {
             array_push($params, new ReflectionLanguageConstructParameter($this->keyword, $parameter, $opts));
         }
@@ -141,7 +141,7 @@ class ReflectionLanguageConstruct extends \ReflectionFunctionAbstract
     /**
      * Check whether keyword is a (known) language construct.
      *
-     * @param $keyword
+     * @param string $keyword
      *
      * @return bool
      */