@@ -18,7 +18,7 @@ public function __construct(LaravelRequestDocs $laravelRequestDoc, LaravelReques
1818 {
1919 parent ::__construct ();
2020
21- $ this ->laravelRequestDocs = $ laravelRequestDoc ;
21+ $ this ->laravelRequestDocs = $ laravelRequestDoc ;
2222 $ this ->laravelRequestDocsToOpenApi = $ laravelRequestDocsToOpenApi ;
2323 }
2424
@@ -56,12 +56,12 @@ public function handle()
5656 $ excludedMethods = array_map (fn ($ item ) => strtolower ($ item ), $ excludedMethods );
5757
5858 //filter while method apis to export
59- $ showGet = !in_array ('get ' , $ excludedMethods );
60- $ showPost = !in_array ('post ' , $ excludedMethods );
61- $ showPut = !in_array ('put ' , $ excludedMethods );
62- $ showPatch = !in_array ('patch ' , $ excludedMethods );
59+ $ showGet = !in_array ('get ' , $ excludedMethods );
60+ $ showPost = !in_array ('post ' , $ excludedMethods );
61+ $ showPut = !in_array ('put ' , $ excludedMethods );
62+ $ showPatch = !in_array ('patch ' , $ excludedMethods );
6363 $ showDelete = !in_array ('delete ' , $ excludedMethods );
64- $ showHead = !in_array ('head ' , $ excludedMethods );
64+ $ showHead = !in_array ('head ' , $ excludedMethods );
6565
6666 // Get a list of Doc with route and rules information.
6767 $ docs = $ this ->laravelRequestDocs ->getDocs (
@@ -118,7 +118,7 @@ private function confirmFilePathAvailability(): bool
118118
119119 /**
120120 * @param $docs
121- * @return false|int
121+ * @return bool
122122 */
123123 private function writeApiDocsToFile (Collection $ docs ): bool
124124 {
@@ -134,6 +134,6 @@ private function writeApiDocsToFile(Collection $docs): bool
134134 mkdir ($ targetDirectory , 0755 , true );
135135 }
136136
137- return ( bool ) file_put_contents ($ this ->exportFilePath , $ content );
137+ return file_put_contents ($ this ->exportFilePath , $ content ) !== false ;
138138 }
139139}
0 commit comments