Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
tabuna authored and StyleCIBot committed Feb 9, 2020
1 parent a0b0cf9 commit 0ef43d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Platform/Commands/InstallCommand.php
Expand Up @@ -33,7 +33,7 @@ class InstallCommand extends Command
public function handle(Dashboard $dashboard)
{
$this->info('Installation started. Please wait...');
$this->info('Version: ' . Dashboard::VERSION);
$this->info('Version: '.Dashboard::VERSION);

if ($dashboard->checkUpdate()) {
$this->warn('Warning, this is not the latest available version.');
Expand Down
9 changes: 5 additions & 4 deletions src/Platform/Updates.php
Expand Up @@ -36,7 +36,7 @@ public function check(): bool
{
$newReleases = $this->requestVersion()
->filter(static function ($version, $key) {
return !Str::contains($key, 'dev');
return ! Str::contains($key, 'dev');
})->filter(static function ($version) {
return version_compare($version['version'], Dashboard::VERSION, '>');
})->count();
Expand All @@ -45,15 +45,16 @@ public function check(): bool
}

/**
* @return void
* @throws Exception
*
* @return void
*/
public function updateInstall()
{
$packages = [];

for ($i = 0, $max = random_int(10, 20); $i < $max; $i++) {
$packages[] = ['name' => 'orchid/platform', 'version' => Dashboard::VERSION . '.0'];
$packages[] = ['name' => 'orchid/platform', 'version' => Dashboard::VERSION.'.0'];
}

$content = json_encode([
Expand Down Expand Up @@ -82,8 +83,8 @@ public function requestVersion(): Collection
{
try {
$versions = Cache::remember('check-platform-update', now()->addMinutes($this->cache), function () {

$this->updateInstall();

return json_decode(file_get_contents($this->apiURL), true)['packages']['orchid/platform'];
});
} catch (Exception $exception) {
Expand Down

0 comments on commit 0ef43d4

Please sign in to comment.