shalvah 4 years ago
parent
commit
d59b274988

+ 1 - 0
camel/Camel.php

@@ -69,6 +69,7 @@ class Camel
             }
         }
     }
+
     public static function loadUserDefinedEndpoints(string $folder): array
     {
         $adapter = new Local(getcwd());

+ 1 - 0
phpstan.neon

@@ -17,3 +17,4 @@ parameters:
         - '#Right side of && is always false.#'
         - '#Function factory invoked with 1 parameter, 0 required.#'
         - '#Call to an undefined method Illuminate\\Contracts\\Filesystem\\Filesystem::path\(\)#'
+        - '#Access to an undefined property Illuminate\\Support\\HigherOrderCollectionProxy#'

+ 2 - 1
resources/example_custom_endpoint.yaml

@@ -1,5 +1,6 @@
 # To include an endpoint that isn't a part of your Laravel app (or belongs to a vendor package),
-# you can define it in a custom.* YAML file, like this one. Here's an example:
+# you can define it in a custom.*.yaml file, like this one.
+# Each custom file should contain an array of endpoints. Here's an example:
 
 #- methods:
 #    - POST

+ 1 - 1
src/Commands/GenerateDocumentation.php

@@ -64,7 +64,7 @@ class GenerateDocumentation extends Command
             $this->extractAndWriteApiDetailsToDisk();
         } else {
             if (!is_dir(static::$camelDir)) {
-                throw new \InvalidArgumentException("Can't use --no-extraction because there are no endpoints in the {static::$camelDir} directory.");
+                throw new \InvalidArgumentException("Can't use --no-extraction because there are no endpoints in the ".static::$camelDir." directory.");
             }
             $groupedEndpoints = Camel::loadEndpointsIntoGroups(static::$camelDir);
         }

+ 2 - 2
src/Extracting/ApiDetails.php

@@ -86,7 +86,7 @@ class ApiDetails
         $introMarkdown = view('scribe::markdown.intro')
             ->with('description', $this->config->get('description', ''))
             ->with('introText', $this->config->get('intro_text', ''))
-            ->with('baseUrl', $this->baseUrl);
+            ->with('baseUrl', $this->baseUrl)->render();
         $this->writeMarkdownFileAndRecordTime($indexMarkdownFile, $introMarkdown);
     }
 
@@ -142,7 +142,7 @@ class ApiDetails
             'isAuthed' => $isAuthed,
             'authDescription' => $authDescription,
             'extraAuthInfo' => $extraInfo,
-        ]);
+        ])->render();
         $this->writeMarkdownFileAndRecordTime($authMarkdownFile, $authMarkdown);
     }
 

+ 1 - 1
src/Tools/Utils.php

@@ -120,7 +120,7 @@ class Utils
             if ($f->isFile()) {
                 copy($f->getRealPath(), "$dest/" . $f->getFilename());
             } else if (!$f->isDot() && $f->isDir()) {
-                rcopy($f->getRealPath(), "$dest/$f");
+                self::copyDirectory($f->getRealPath(), "$dest/$f");
             }
         }
     }

+ 0 - 11
tests/Unit/CamelTest.php

@@ -1,11 +0,0 @@
-<?php
-
-namespace Knuckles\Scribe\Tests\Unit;
-
-use Knuckles\Camel\Camel;
-use PHPUnit\Framework\TestCase;
-
-class CamelTest extends TestCase
-{
-
-}