Browse Source

Fix code style issues

shalvah 4 years ago
parent
commit
ca38437b32
2 changed files with 2 additions and 1 deletions
  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\.#'
         - '#Instantiated class Whoops\\Exception\\Inspector not found\.#'
         - '#.+Dingo.+#'
         - '#.+Dingo.+#'
         - '#Right side of && is always false.#'
         - '#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',
                 'type' => 'object',
                 'description' => $field['description'] ?? '',
                 'description' => $field['description'] ?? '',
                 'example' => $field['value'] ?? null,
                 '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)];
                     return [$subfieldName => $this->generateFieldData($subfield)];
                 })->all(),
                 })->all(),
             ];
             ];