@@ -87,6 +87,7 @@ public function __construct(
8787 if (function_exists ('opcache_invalidate ' )) {
8888 opcache_invalidate ($ versionFileName , true );
8989 }
90+
9091 if (!file_exists ($ versionFileName )) {
9192 // fallback to version in config.php
9293 $ version = $ this ->getConfigOptionString ('version ' );
@@ -376,7 +377,7 @@ private function getRecursiveDirectoryIterator(string $folder, array $excludedPa
376377 /* Store first level children in an array to avoid trouble if changes happen while iterating */
377378 $ children = [];
378379 while ($ name = readdir ($ handle )) {
379- if (in_array ($ name , ['. ' , '.. ' ])) {
380+ if (in_array ($ name , ['. ' , '.. ' ], true )) {
380381 continue ;
381382 }
382383
@@ -775,7 +776,7 @@ private function downloadArchive(string $fromUrl, string $toLocation): bool {
775776
776777 curl_setopt_array ($ ch , [
777778 CURLOPT_NOPROGRESS => false ,
778- CURLOPT_PROGRESSFUNCTION => [ $ this , ' downloadProgressCallback ' ] ,
779+ CURLOPT_PROGRESSFUNCTION => $ this -> downloadProgressCallback (...) ,
779780 CURLOPT_FILE => $ fp ,
780781 ]);
781782
@@ -886,6 +887,7 @@ public function verifyIntegrity(string $urlOverride = '', string $signature = ''
886887 'Custom download url provided. You need to provide a signature with --signature or skip integrity check with --no-verify. '
887888 );
888889 }
890+
889891 $ signature = $ this ->getSignatureFromUpdater ();
890892 }
891893
@@ -1349,11 +1351,8 @@ public function currentStep(): array {
13491351
13501352 if (isset ($ jsonData ['step ' ]) && $ jsonData ['step ' ] <= self ::LAST_STEP && $ jsonData ['step ' ] > 0 ) {
13511353 $ result ['step ' ] = (int )$ jsonData ['step ' ];
1352- if (isset ($ jsonData ['state ' ])) {
1353- $ result ['state ' ] = (string )$ jsonData ['state ' ];
1354- } else {
1355- $ result ['state ' ] = 'start ' ;
1356- }
1354+ $ result ['state ' ] = isset ($ jsonData ['state ' ]) ? (string )$ jsonData ['state ' ] : 'start ' ;
1355+
13571356 if ($ result ['step ' ] === self ::LAST_STEP && $ result ['state ' ] !== 'start ' ) {
13581357 return [];
13591358 }
0 commit comments