Browse Source

Shim newLine() method on L6 (fixes #320)

shalvah 3 years ago
parent
commit
31087fc330
2 changed files with 12 additions and 0 deletions
  1. 6 0
      src/Commands/GenerateDocumentation.php
  2. 6 0
      src/Commands/Upgrade.php

+ 6 - 0
src/Commands/GenerateDocumentation.php

@@ -30,6 +30,12 @@ class GenerateDocumentation extends Command
 
     private bool $forcing;
 
+    public function newLine($count = 1)
+    {
+        // TODO Remove when Laravel g is no longer supported
+        $this->getOutput()->write(str_repeat("\n", $count));
+    }
+
     public function handle(RouteMatcherInterface $routeMatcher, GroupedEndpointsFactory $groupedEndpointsFactory): void
     {
         $this->bootstrap();

+ 6 - 0
src/Commands/Upgrade.php

@@ -11,6 +11,12 @@ class Upgrade extends Command
 
     protected $description = '';
 
+    public function newLine($count = 1)
+    {
+        // TODO Remove when Laravel 6 is no longer supported
+        $this->getOutput()->write(str_repeat("\n", $count));
+    }
+
     public function handle(): void
     {
         $oldConfig = config('scribe');