Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / nikic / php-parser / lib / PhpParser / Builder / Param.php
index eff76cb45c49057c11e4b3e79515745b9d86a605..184813a657cf6cab39406fc02a1715f74ed0540a 100644 (file)
@@ -42,13 +42,13 @@ class Param implements PhpParser\Builder
     }
 
     /**
-     * Sets type hint for the parameter.
+     * Sets type for the parameter.
      *
-     * @param string|Node\Name|Node\NullableType $type Type hint to use
+     * @param string|Node\Name|Node\NullableType $type Parameter type
      *
      * @return $this The builder instance (for fluid interface)
      */
-    public function setTypeHint($type) {
+    public function setType($type) {
         $this->type = BuilderHelpers::normalizeType($type);
         if ($this->type == 'void') {
             throw new \LogicException('Parameter type cannot be void');
@@ -57,6 +57,19 @@ class Param implements PhpParser\Builder
         return $this;
     }
 
+    /**
+     * Sets type for the parameter.
+     *
+     * @param string|Node\Name|Node\NullableType $type Parameter type
+     *
+     * @return $this The builder instance (for fluid interface)
+     *
+     * @deprecated Use setType() instead
+     */
+    public function setTypeHint($type) {
+        return $this->setType($type);
+    }
+
     /**
      * Make the parameter accept the value by reference.
      *