Apply fixes from StyleCI (#678)

This commit is contained in:
Phan An 2017-11-08 14:11:45 +01:00 committed by GitHub
parent 8ad5fed3f7
commit 1919df1e20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -115,19 +115,19 @@ class SyncMedia extends Command
$this->line("$name has no changes  ignoring");
}
++$this->ignored;
$this->ignored++;
} elseif ($result === File::SYNC_RESULT_BAD_FILE) {
if ($this->option('verbose')) {
$this->error("$name is not a valid media file because: ".$reason);
}
++$this->invalid;
$this->invalid++;
} else {
if ($this->option('verbose')) {
$this->info("$name synced");
}
++$this->synced;
$this->synced++;
}
}

View file

@ -125,7 +125,7 @@ class File
'comments.track_number',
];
for ($i = 0; $i < count($trackIndices) && $track === 0; ++$i) {
for ($i = 0; $i < count($trackIndices) && $track === 0; $i++) {
$track = array_get($info, $trackIndices[$i], [0])[0];
}

View file

@ -65,7 +65,7 @@ class Interaction extends Model
$interaction->liked = false;
}
++$interaction->play_count;
$interaction->play_count++;
$interaction->save();
});
}

View file

@ -85,7 +85,7 @@ class SongZipArchive
// The following several lines are to make sure each file name is unique.
$name = basename($path);
if (array_key_exists($name, $this->fileNames)) {
++$this->fileNames[$name];
$this->fileNames[$name]++;
$parts = explode('.', $name);
$ext = $parts[count($parts) - 1];
$parts[count($parts) - 1] = $this->fileNames[$name].".$ext";