@@ -203,10 +203,10 @@ |
||
| 203 | 203 | */ |
| 204 | 204 | private function filterByLocalMajorVersion(array $versions) |
| 205 | 205 | { |
| 206 | - list($localMajorVersion, ) = explode('.', $this->localVersion, 2); |
|
| 206 | + list($localMajorVersion,) = explode('.', $this->localVersion, 2); |
|
| 207 | 207 | |
| 208 | - return array_filter($versions, function ($version) use ($localMajorVersion) { |
|
| 209 | - list($majorVersion, ) = explode('.', $version, 2); |
|
| 208 | + return array_filter($versions, function($version) use ($localMajorVersion) { |
|
| 209 | + list($majorVersion,) = explode('.', $version, 2); |
|
| 210 | 210 | return $majorVersion === $localMajorVersion; |
| 211 | 211 | }); |
| 212 | 212 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | /** |
| 94 | 94 | * Constructor |
| 95 | 95 | * |
| 96 | - * @param string $strategy |
|
| 96 | + * @param StrategyInterface $strategy |
|
| 97 | 97 | * @param bool $hasPubKey |
| 98 | 98 | * @param string $localPharFile |
| 99 | 99 | */ |
@@ -469,6 +469,9 @@ discard block |
||
| 469 | 469 | . sprintf('%s.phar.temp.pubkey', $this->getLocalPharFileBasename()); |
| 470 | 470 | } |
| 471 | 471 | |
| 472 | + /** |
|
| 473 | + * @param string|null $localPharFile |
|
| 474 | + */ |
|
| 472 | 475 | protected function setLocalPharFile($localPharFile) |
| 473 | 476 | { |
| 474 | 477 | if (!is_null($localPharFile)) { |
@@ -513,6 +516,9 @@ discard block |
||
| 513 | 516 | $this->tempDirectory = $tempDirectory; |
| 514 | 517 | } |
| 515 | 518 | |
| 519 | + /** |
|
| 520 | + * @param string $phar |
|
| 521 | + */ |
|
| 516 | 522 | protected function validatePhar($phar) |
| 517 | 523 | { |
| 518 | 524 | $phar = realpath($phar); |
@@ -18,9 +18,6 @@ |
||
| 18 | 18 | use Humbug\SelfUpdate\Exception\HttpRequestException; |
| 19 | 19 | use Humbug\SelfUpdate\Exception\NoSignatureException; |
| 20 | 20 | use Humbug\SelfUpdate\Strategy\StrategyInterface; |
| 21 | -use Humbug\SelfUpdate\Strategy\ShaStrategy; |
|
| 22 | -use Humbug\SelfUpdate\Strategy\Sha256Strategy; |
|
| 23 | -use Humbug\SelfUpdate\Strategy\GithubStrategy; |
|
| 24 | 21 | |
| 25 | 22 | class Updater |
| 26 | 23 | { |