Jelajahi Sumber

Merge pull request #21 from lucasmichot/feature/master/strict-comparisons

Use strict comparisons
Marcel Pociot 9 tahun lalu
induk
melakukan
e322a6b481
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      src/Mpociot/ApiDoc/ApiDocGenerator.php

+ 2 - 2
src/Mpociot/ApiDoc/ApiDocGenerator.php

@@ -358,7 +358,7 @@ class ApiDocGenerator
         foreach ($headers as $name => $value) {
             $name = strtr(strtoupper($name), '-', '_');
 
-            if (! starts_with($name, $prefix) && $name != 'CONTENT_TYPE') {
+            if (! starts_with($name, $prefix) && $name !== 'CONTENT_TYPE') {
                 $name = $prefix.$name;
             }
 
@@ -401,7 +401,7 @@ class ApiDocGenerator
      */
     protected function parseParameters($rule, $parameter)
     {
-        if (strtolower($rule) == 'regex') {
+        if (strtolower($rule) === 'regex') {
             return [$parameter];
         }