Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / psy / psysh / src / CodeCleaner / NoReturnValue.php
index bca4d361d6263aee67ce610d6fbe404cf0d73faa..90325701e61ebb251e5067e303b2f29b384760fb 100644 (file)
@@ -11,6 +11,9 @@
 
 namespace Psy\CodeCleaner;
 
+use PhpParser\Node\Expr\New_;
+use PhpParser\Node\Name\FullyQualified as FullyQualifiedName;
+
 /**
  * A class used internally by CodeCleaner to represent input, such as
  * non-expression statements, with no return value.
@@ -20,5 +23,13 @@ namespace Psy\CodeCleaner;
  */
 class NoReturnValue
 {
-    // this space intentionally left blank
+    /**
+     * Get PhpParser AST expression for creating a new NoReturnValue.
+     *
+     * @return PhpParser\Node\Expr\New_
+     */
+    public static function create()
+    {
+        return new New_(new FullyQualifiedName('Psy\CodeCleaner\NoReturnValue'));
+    }
 }