File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -142,20 +142,16 @@ private function getReleasesFallback(): void
142142 $ releasesJson = \curl_exec ($ curl );
143143
144144 if (\is_string ($ releasesJson ) === false ) {
145- \curl_close ($ curl );
146145 throw new RuntimeException ('GitHub API request to retrieve the releases failed ' );
147146 }
148147
149148 \curl_setopt ($ curl , \CURLOPT_URL , self ::API_LATEST_TAG_URL );
150149 $ latestReleaseJson = \curl_exec ($ curl );
151150
152151 if (\is_string ($ latestReleaseJson ) === false ) {
153- \curl_close ($ curl );
154152 throw new RuntimeException ('GitHub API request to retrieve the latest release failed ' );
155153 }
156154
157- \curl_close ($ curl );
158-
159155 $ latestRelease = \json_decode ($ latestReleaseJson , flags: \JSON_THROW_ON_ERROR | \JSON_OBJECT_AS_ARRAY );
160156 $ latestRelease = $ latestRelease ['tag_name ' ];
161157
@@ -230,7 +226,7 @@ private function getXsdFile(string $tagName): string
230226 {
231227 $ url = \sprintf (self ::XSD_URL , $ tagName );
232228 $ contents = \file_get_contents ($ url );
233- if (! $ contents ) {
229+ if (is_string ( $ contents) === false ) {
234230 throw new RuntimeException (\sprintf ('Failed to read XSD file: %s ' , $ url ));
235231 }
236232
You can’t perform that action at this time.
0 commit comments