fix(deps): update dependency friendsofphp/php-cs-fixer to <3.27.1 (stable) (#2715)

* fix(deps): update dependency friendsofphp/php-cs-fixer to <3.27.1

* style: format legacy files

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jo <ljonas@riseup.net>
This commit is contained in:
renovate[bot] 2023-09-17 17:18:07 +02:00 committed by GitHub
parent 9067299df3
commit bfdb40dd7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 25 additions and 25 deletions

View File

@ -80,7 +80,7 @@ class Application_Common_OsPath
} }
if ($dir[strlen($dir) - 1] != '/') { if ($dir[strlen($dir) - 1] != '/') {
$dir = $dir . '/'; $dir .= '/';
} }
return $dir; return $dir;

View File

@ -248,7 +248,7 @@ class PreferenceController extends Zend_Controller_Action
$element['isError'] = true; $element['isError'] = true;
$result[$path] = $element; $result[$path] = $element;
} else { } else {
$path = $path . '/'; $path .= '/';
$handle = opendir($path); $handle = opendir($path);
if ($handle !== false) { if ($handle !== false) {
while (false !== ($file = readdir($handle))) { while (false !== ($file = readdir($handle))) {

View File

@ -349,7 +349,7 @@ SQL;
if ($mins > 59) { if ($mins > 59) {
$hour = intval($mins / 60); $hour = intval($mins / 60);
$hour = str_pad($hour, 2, '0', STR_PAD_LEFT); $hour = str_pad($hour, 2, '0', STR_PAD_LEFT);
$mins = $mins % 60; $mins %= 60;
} }
} }
$hour = str_pad($hour, 2, '0', STR_PAD_LEFT); $hour = str_pad($hour, 2, '0', STR_PAD_LEFT);
@ -499,10 +499,10 @@ SQL;
$db_file = CcFilesQuery::create()->findPk($ac[0], $this->con); $db_file = CcFilesQuery::create()->findPk($ac[0], $this->con);
$db_file->setDbIsPlaylist(true)->save($this->con); $db_file->setDbIsPlaylist(true)->save($this->con);
$pos = $pos + 1; ++$pos;
} elseif (!is_array($ac)) { } elseif (!is_array($ac)) {
$res = $this->insertBlockElement($this->buildEntry($ac, $pos)); $res = $this->insertBlockElement($this->buildEntry($ac, $pos));
$pos = $pos + 1; ++$pos;
$db_file = CcFilesQuery::create()->findPk($ac, $this->con); $db_file = CcFilesQuery::create()->findPk($ac, $this->con);
$db_file->setDbIsPlaylist(true)->save($this->con); $db_file->setDbIsPlaylist(true)->save($this->con);
@ -516,7 +516,7 @@ SQL;
for ($i = 0; $i < count($contentsToUpdate); ++$i) { for ($i = 0; $i < count($contentsToUpdate); ++$i) {
$contentsToUpdate[$i]->setDbPosition($pos); $contentsToUpdate[$i]->setDbPosition($pos);
$contentsToUpdate[$i]->save($this->con); $contentsToUpdate[$i]->save($this->con);
$pos = $pos + 1; ++$pos;
} }
$this->block->setDbMtime(new DateTime('now', new DateTimeZone('UTC'))); $this->block->setDbMtime(new DateTime('now', new DateTimeZone('UTC')));
@ -565,13 +565,13 @@ SQL;
Logging::info("item {$item->getDbId()} to pos {$pos}"); Logging::info("item {$item->getDbId()} to pos {$pos}");
$item->setDbPosition($pos); $item->setDbPosition($pos);
$item->save($this->con); $item->save($this->con);
$pos = $pos + 1; ++$pos;
} }
foreach ($otherContent as $item) { foreach ($otherContent as $item) {
Logging::info("item {$item->getDbId()} to pos {$pos}"); Logging::info("item {$item->getDbId()} to pos {$pos}");
$item->setDbPosition($pos); $item->setDbPosition($pos);
$item->save($this->con); $item->save($this->con);
$pos = $pos + 1; ++$pos;
} }
} else { } else {
Logging::info("moving items after {$p_afterItem}"); Logging::info("moving items after {$p_afterItem}");
@ -580,14 +580,14 @@ SQL;
Logging::info("item {$item->getDbId()} to pos {$pos}"); Logging::info("item {$item->getDbId()} to pos {$pos}");
$item->setDbPosition($pos); $item->setDbPosition($pos);
$item->save($this->con); $item->save($this->con);
$pos = $pos + 1; ++$pos;
if ($item->getDbId() == $p_afterItem) { if ($item->getDbId() == $p_afterItem) {
foreach ($contentsToMove as $move) { foreach ($contentsToMove as $move) {
Logging::info("item {$move->getDbId()} to pos {$pos}"); Logging::info("item {$move->getDbId()} to pos {$pos}");
$move->setDbPosition($pos); $move->setDbPosition($pos);
$move->save($this->con); $move->save($this->con);
$pos = $pos + 1; ++$pos;
} }
} }
} }
@ -1660,7 +1660,7 @@ SQL;
*/ */
} elseif (in_array($spCriteria, ['length', 'cuein', 'cueout']) && $spCriteriaModifier == 'is') { } elseif (in_array($spCriteria, ['length', 'cuein', 'cueout']) && $spCriteriaModifier == 'is') {
$spCriteriaModifier = 'starts with'; $spCriteriaModifier = 'starts with';
$spCriteria = $spCriteria . '::text'; $spCriteria .= '::text';
$spCriteriaValue = $criteria['value']; $spCriteriaValue = $criteria['value'];
} else { } else {
/* Propel does not escape special characters properly when using LIKE/ILIKE /* Propel does not escape special characters properly when using LIKE/ILIKE

View File

@ -499,14 +499,14 @@ SQL;
$db_file->setDbIsPlaylist(true)->save($this->con); $db_file->setDbIsPlaylist(true)->save($this->con);
} }
$pos = $pos + 1; ++$pos;
} }
// reset the positions of the remaining items. // reset the positions of the remaining items.
for ($i = 0; $i < count($contentsToUpdate); ++$i) { for ($i = 0; $i < count($contentsToUpdate); ++$i) {
$contentsToUpdate[$i]->setDbPosition($pos); $contentsToUpdate[$i]->setDbPosition($pos);
$contentsToUpdate[$i]->save($this->con); $contentsToUpdate[$i]->save($this->con);
$pos = $pos + 1; ++$pos;
} }
$this->pl->setDbMtime(new DateTime('now', new DateTimeZone('UTC'))); $this->pl->setDbMtime(new DateTime('now', new DateTimeZone('UTC')));
@ -553,13 +553,13 @@ SQL;
Logging::info("item {$item->getDbId()} to pos {$pos}"); Logging::info("item {$item->getDbId()} to pos {$pos}");
$item->setDbPosition($pos); $item->setDbPosition($pos);
$item->save($this->con); $item->save($this->con);
$pos = $pos + 1; ++$pos;
} }
foreach ($otherContent as $item) { foreach ($otherContent as $item) {
Logging::info("item {$item->getDbId()} to pos {$pos}"); Logging::info("item {$item->getDbId()} to pos {$pos}");
$item->setDbPosition($pos); $item->setDbPosition($pos);
$item->save($this->con); $item->save($this->con);
$pos = $pos + 1; ++$pos;
} }
} else { } else {
Logging::info("moving items after {$p_afterItem}"); Logging::info("moving items after {$p_afterItem}");
@ -568,14 +568,14 @@ SQL;
Logging::info("item {$item->getDbId()} to pos {$pos}"); Logging::info("item {$item->getDbId()} to pos {$pos}");
$item->setDbPosition($pos); $item->setDbPosition($pos);
$item->save($this->con); $item->save($this->con);
$pos = $pos + 1; ++$pos;
if ($item->getDbId() == $p_afterItem) { if ($item->getDbId() == $p_afterItem) {
foreach ($contentsToMove as $move) { foreach ($contentsToMove as $move) {
Logging::info("item {$move->getDbId()} to pos {$pos}"); Logging::info("item {$move->getDbId()} to pos {$pos}");
$move->setDbPosition($pos); $move->setDbPosition($pos);
$move->save($this->con); $move->save($this->con);
$pos = $pos + 1; ++$pos;
} }
} }
} }

View File

@ -514,7 +514,7 @@ SQL;
':sj_ts_5' => $p_track_start, ':sj_ts_5' => $p_track_start,
':sj_ts_6' => $p_track_end, ':sj_ts_6' => $p_track_end,
]; ];
$paramMap = $paramMap + $map; $paramMap += $map;
$streamSql = str_replace( $streamSql = str_replace(
'%%columns%%', '%%columns%%',
@ -540,7 +540,7 @@ SQL;
} }
$showPredicate = ' AND show_id IN (' . implode(',', $params) . ')'; $showPredicate = ' AND show_id IN (' . implode(',', $params) . ')';
$paramMap = $paramMap + $map; $paramMap += $map;
} elseif (count($p_show_instances) > 0) { } elseif (count($p_show_instances) > 0) {
$showPredicate = ' AND si.id IN (' . implode(',', $p_show_instances) . ')'; $showPredicate = ' AND si.id IN (' . implode(',', $p_show_instances) . ')';
} }
@ -584,7 +584,7 @@ SQL;
':ts_5' => $p_start_str, ':ts_5' => $p_start_str,
':ts_6' => $p_end_str, ':ts_6' => $p_end_str,
]; ];
$paramMap = $paramMap + $map; $paramMap += $map;
return Application_Common_Database::prepareAndExecute( return Application_Common_Database::prepareAndExecute(
$sql, $sql,

View File

@ -130,7 +130,7 @@ class Application_Model_Tracktype
$sql .= ' AND code ILIKE :search'; $sql .= ' AND code ILIKE :search';
$params[':search'] = "%{$search}%"; $params[':search'] = "%{$search}%";
$sql = $sql . ' ORDER BY id'; $sql .= ' ORDER BY id';
return Application_Common_Database::prepareAndExecute($sql, $params, 'all'); return Application_Common_Database::prepareAndExecute($sql, $params, 'all');
} }

View File

@ -311,7 +311,7 @@ class Application_Model_User
$sql .= ' AND login ILIKE :search'; $sql .= ' AND login ILIKE :search';
$params[':search'] = "%{$search}%"; $params[':search'] = "%{$search}%";
$sql = $sql . ' ORDER BY login'; $sql .= ' ORDER BY login';
return Application_Common_Database::prepareAndExecute($sql, $params, 'all'); return Application_Common_Database::prepareAndExecute($sql, $params, 'all');
} }

View File

@ -154,7 +154,7 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
// minutes cannot be over 59. Need to convert anything > 59 minutes into hours. // minutes cannot be over 59. Need to convert anything > 59 minutes into hours.
$hours += intval($minutes / 60); $hours += intval($minutes / 60);
$minutes = $minutes % 60; $minutes %= 60;
$di = new DateInterval("PT{$hours}H{$minutes}M"); $di = new DateInterval("PT{$hours}H{$minutes}M");

View File

@ -105,7 +105,7 @@ while ($showTime < $endDate) {
createTestShow($showNumber, $showTime); createTestShow($showNumber, $showTime);
$showTime->add(new DateInterval('PT1H')); $showTime->add(new DateInterval('PT1H'));
} }
$showNumber = $showNumber + 1; ++$showNumber;
} }
if (Application_Model_RabbitMq::$doPush) { if (Application_Model_RabbitMq::$doPush) {

View File

@ -1,6 +1,6 @@
{ {
"require": { "require": {
"php": "^7.4", "php": "^7.4",
"friendsofphp/php-cs-fixer": "<3.26.2" "friendsofphp/php-cs-fixer": "<3.27.1"
} }
} }