Parcourir la source

Fix code style issues

shalvah il y a 4 ans
Parent
commit
ca38437b32
2 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 1 0
      phpstan.neon
  2. 1 1
      src/Writing/OpenAPISpecWriter.php

+ 1 - 0
phpstan.neon

@@ -15,3 +15,4 @@ parameters:
         - '#Instantiated class Whoops\\Exception\\Inspector not found\.#'
         - '#.+Dingo.+#'
         - '#Right side of && is always false.#'
+        - '#Function factory invoked with 1 parameter, 0 required.#'

+ 1 - 1
src/Writing/OpenAPISpecWriter.php

@@ -476,7 +476,7 @@ class OpenAPISpecWriter
                 'type' => 'object',
                 'description' => $field['description'] ?? '',
                 'example' => $field['value'] ?? null,
-                'properties' => collect($field['__fields'])->mapWithKeys(function ($subfield, $subfieldName) use ($field) {
+                'properties' => collect($field['__fields'])->mapWithKeys(function ($subfield, $subfieldName) {
                     return [$subfieldName => $this->generateFieldData($subfield)];
                 })->all(),
             ];