@@ -18,7 +18,7 @@ public function __construct(LaravelRequestDocs $laravelRequestDoc, LaravelReques
18
18
{
19
19
parent ::__construct ();
20
20
21
- $ this ->laravelRequestDocs = $ laravelRequestDoc ;
21
+ $ this ->laravelRequestDocs = $ laravelRequestDoc ;
22
22
$ this ->laravelRequestDocsToOpenApi = $ laravelRequestDocsToOpenApi ;
23
23
}
24
24
@@ -56,12 +56,12 @@ public function handle()
56
56
$ excludedMethods = array_map (fn ($ item ) => strtolower ($ item ), $ excludedMethods );
57
57
58
58
//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 );
63
63
$ showDelete = !in_array ('delete ' , $ excludedMethods );
64
- $ showHead = !in_array ('head ' , $ excludedMethods );
64
+ $ showHead = !in_array ('head ' , $ excludedMethods );
65
65
66
66
// Get a list of Doc with route and rules information.
67
67
$ docs = $ this ->laravelRequestDocs ->getDocs (
@@ -118,7 +118,7 @@ private function confirmFilePathAvailability(): bool
118
118
119
119
/**
120
120
* @param $docs
121
- * @return false|int
121
+ * @return bool
122
122
*/
123
123
private function writeApiDocsToFile (Collection $ docs ): bool
124
124
{
@@ -134,6 +134,6 @@ private function writeApiDocsToFile(Collection $docs): bool
134
134
mkdir ($ targetDirectory , 0755 , true );
135
135
}
136
136
137
- return ( bool ) file_put_contents ($ this ->exportFilePath , $ content );
137
+ return file_put_contents ($ this ->exportFilePath , $ content ) !== false ;
138
138
}
139
139
}
0 commit comments