mirror of
https://github.com/koel/koel
synced 2024-11-10 14:44:13 +00:00
Apply fixes from StyleCI (#678)
This commit is contained in:
parent
8ad5fed3f7
commit
1919df1e20
4 changed files with 6 additions and 6 deletions
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class Interaction extends Model
|
|||
$interaction->liked = false;
|
||||
}
|
||||
|
||||
++$interaction->play_count;
|
||||
$interaction->play_count++;
|
||||
$interaction->save();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue