Browse Source

Back to 7.4 because of spatie/dto

shalvah 4 years ago
parent
commit
471cd72786
6 changed files with 11 additions and 16 deletions
  1. 0 1
      .travis.yml
  2. 1 1
      README.md
  3. 7 11
      camel/Camel.php
  4. 1 1
      composer.dingo.json
  5. 1 1
      composer.json
  6. 1 1
      docs/index.md

+ 0 - 1
.travis.yml

@@ -16,7 +16,6 @@ matrix:
     - php: 7.4
       env: SETUP=lint
       name: "Lint code"
-    - php: 7.3
     - php: 7.4
     - php: 7.4
       env: SETUP=lowest

+ 1 - 1
README.md

@@ -30,7 +30,7 @@ Generate API documentation for humans from your Laravel codebase. [Here's what t
 Check out the documentation at [ReadTheDocs](http://scribe.rtfd.io/).
 
 ## Installation
-PHP 7.3 and Laravel/Lumen 6.0 or higher are required.
+PHP 7.4 and Laravel/Lumen 6.0 or higher are required.
 
 ```sh
 composer require --dev knuckleswtf/scribe

+ 7 - 11
camel/Camel.php

@@ -111,17 +111,13 @@ class Camel
             ->groupBy('metadata.groupName')
             ->sortKeys(SORT_NATURAL);
 
-        return $groupedEndpoints->map(function (Collection $group) {
-            return [
-                'name' => $group[0]->metadata->groupName,
-                'description' => Arr::first($group, function (ExtractedEndpointData $endpointData) {
-                        return $endpointData->metadata->groupDescription !== '';
-                    })->metadata->groupDescription ?? '',
-                'endpoints' => $group->map(function (ExtractedEndpointData $endpointData) {
-                    return $endpointData->forSerialisation()->toArray();
-                })->all(),
-            ];
-        })->values()->all();
+        return $groupedEndpoints->map(fn(Collection $group) => [
+            'name' => $group[0]->metadata->groupName,
+            'description' => Arr::first($group, function (ExtractedEndpointData $endpointData) {
+                    return $endpointData->metadata->groupDescription !== '';
+                })->metadata->groupDescription ?? '',
+            'endpoints' => $group->map(fn(ExtractedEndpointData $endpointData) => $endpointData->forSerialisation()->toArray())->all(),
+        ])->values()->all();
     }
 
     public static function prepareGroupedEndpointsForOutput(array $groupedEndpoints): array

+ 1 - 1
composer.dingo.json

@@ -16,7 +16,7 @@
         }
     ],
     "require": {
-        "php": ">=7.3",
+        "php": ">=7.4",
         "ext-fileinfo": "*",
         "ext-json": "*",
         "ext-pdo": "*",

+ 1 - 1
composer.json

@@ -16,7 +16,7 @@
     }
   ],
   "require": {
-    "php": ">=7.3",
+    "php": ">=7.4",
     "ext-fileinfo": "*",
     "ext-json": "*",
     "ext-pdo": "*",

+ 1 - 1
docs/index.md

@@ -45,7 +45,7 @@ Generate API documentation for humans from your Laravel/Lumen/[Dingo](https://gi
 ```
 
 ## Installation
-PHP 7.3 and Laravel/Lumen 6 or higher are required.
+PHP 7.4 and Laravel/Lumen 6 or higher are required.
 
 ```sh
 composer require --dev knuckleswtf/scribe