style(legacy): php-cs-fixer upgrade
This commit is contained in:
parent
25fbf5cf32
commit
c28fe32cdc
|
@ -15,7 +15,7 @@ class Application_Common_OsPath
|
|||
$initial_slashes = false;
|
||||
}
|
||||
if (
|
||||
($initial_slashes)
|
||||
$initial_slashes
|
||||
&& (strpos($path, '//') === 0)
|
||||
&& (strpos($path, '///') === false)
|
||||
) {
|
||||
|
|
|
@ -105,14 +105,14 @@ class ApiController extends Zend_Controller_Action
|
|||
$authAdapter = Zend_Auth::getInstance();
|
||||
Application_Model_Auth::pinSessionToClient($authAdapter);
|
||||
|
||||
if ((Zend_Auth::getInstance()->hasIdentity())) {
|
||||
if (Zend_Auth::getInstance()->hasIdentity()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
echo _('You are not allowed to access this resource.');
|
||||
|
||||
exit();
|
||||
exit;
|
||||
}
|
||||
|
||||
public function versionAction()
|
||||
|
|
|
@ -769,7 +769,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
echo Zend_Json::encode($result);
|
||||
|
||||
exit();
|
||||
exit;
|
||||
}
|
||||
|
||||
public function updateFutureIsScheduledAction()
|
||||
|
|
|
@ -183,7 +183,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
|||
->appendBody('ERROR: CSRF token mismatch.')
|
||||
->sendResponse();
|
||||
|
||||
exit();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1222,7 +1222,7 @@ SQL;
|
|||
|
||||
if ($field == 'utime' || $field == 'mtime' || $field == 'lptime') {
|
||||
// if the date isn't relative we want to convert the value to a specific UTC date
|
||||
if (!(in_array($modifier, ['before', 'after', 'between']))) {
|
||||
if (!in_array($modifier, ['before', 'after', 'between'])) {
|
||||
$value = Application_Common_DateHelper::UserTimezoneStringToUTCString($value);
|
||||
} else {
|
||||
$value = $value . ' ' . $datetimeunit . ' ago';
|
||||
|
@ -1239,7 +1239,7 @@ SQL;
|
|||
if (isset($d['sp_criteria_extra'])) {
|
||||
if ($field == 'utime' || $field == 'mtime' || $field == 'lptime') {
|
||||
// if the date isn't relative we want to convert the value to a specific UTC date
|
||||
if (!(in_array($modifier, ['before', 'after', 'between']))) {
|
||||
if (!in_array($modifier, ['before', 'after', 'between'])) {
|
||||
$extra = Application_Common_DateHelper::UserTimezoneStringToUTCString($extra);
|
||||
} else {
|
||||
$extra = $extra . ' ' . $extradatetimeunit . ' ago';
|
||||
|
@ -1676,7 +1676,7 @@ SQL;
|
|||
// addslashes() does not esapce '%' so we have to do it manually
|
||||
$spCriteriaValue = str_replace('%', '\%', $spCriteriaValue);
|
||||
} else {
|
||||
$spCriteriaValue = ($criteria['value']);
|
||||
$spCriteriaValue = $criteria['value'];
|
||||
}
|
||||
$spCriteriaExtra = $criteria['extra'];
|
||||
}
|
||||
|
@ -1772,9 +1772,9 @@ SQL;
|
|||
if ($storedCrit['limit']['modifier'] == 'items') {
|
||||
$limits['time'] = 1440 * 60;
|
||||
$limits['items'] = $storedCrit['limit']['value'];
|
||||
} elseif (($storedCrit['limit']['modifier'] == 'remaining')) {
|
||||
} elseif ($storedCrit['limit']['modifier'] == 'remaining') {
|
||||
// show will be null unless being called inside a show instance
|
||||
if (!(is_null($showLimit))) {
|
||||
if (!is_null($showLimit)) {
|
||||
$limits['time'] = $showLimit;
|
||||
$limits['items'] = null;
|
||||
} else {
|
||||
|
|
|
@ -437,7 +437,7 @@ class Application_Service_HistoryService
|
|||
Logging::info($shows);
|
||||
|
||||
// need to filter the list to only their shows
|
||||
if ((!empty($user)) && ($user->isHost())) {
|
||||
if ((!empty($user)) && $user->isHost()) {
|
||||
$showIds = [];
|
||||
|
||||
foreach ($shows as $show) {
|
||||
|
|
|
@ -128,7 +128,7 @@ class Application_Service_MediaService
|
|||
*/
|
||||
public static function areFilesStuckInPending()
|
||||
{
|
||||
$oneHourAgo = gmdate(DEFAULT_TIMESTAMP_FORMAT, (microtime(true) - self::PENDING_FILE_TIMEOUT_SECONDS));
|
||||
$oneHourAgo = gmdate(DEFAULT_TIMESTAMP_FORMAT, microtime(true) - self::PENDING_FILE_TIMEOUT_SECONDS);
|
||||
self::$_pendingFiles = CcFilesQuery::create()
|
||||
->filterByDbImportStatus(CcFiles::IMPORT_STATUS_PENDING)
|
||||
->filterByDbUtime($oneHourAgo, Criteria::LESS_EQUAL)
|
||||
|
|
|
@ -300,7 +300,7 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
|||
*/
|
||||
public static function getStuckPendingImports()
|
||||
{
|
||||
$timeout = gmdate(DEFAULT_TIMESTAMP_FORMAT, (microtime(true) - self::PENDING_EPISODE_TIMEOUT_SECONDS));
|
||||
$timeout = gmdate(DEFAULT_TIMESTAMP_FORMAT, microtime(true) - self::PENDING_EPISODE_TIMEOUT_SECONDS);
|
||||
$episodes = PodcastEpisodesQuery::create()
|
||||
->filterByDbFileId()
|
||||
->find();
|
||||
|
|
|
@ -324,7 +324,7 @@ class Application_Service_SchedulerService
|
|||
$con->rollback();
|
||||
Logging::info('Error filling linked shows: ' . $e->getMessage());
|
||||
|
||||
exit();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -326,7 +326,7 @@ class Application_Service_ShowFormService
|
|||
'add_show_repeat_type' => $repeatType,
|
||||
'add_show_day_check' => $days,
|
||||
'add_show_end_date' => (!is_null($repeatEndDate)) ? $repeatEndDate->format('Y-m-d') : null,
|
||||
'add_show_no_end' => (is_null($repeatEndDate)),
|
||||
'add_show_no_end' => is_null($repeatEndDate),
|
||||
'add_show_monthly_repeat_type' => $monthlyRepeatType,
|
||||
]
|
||||
);
|
||||
|
|
|
@ -883,11 +883,10 @@ SQL;
|
|||
CcShowQuery::create()
|
||||
->filterByDbId($showId)
|
||||
->delete();
|
||||
/* There is only one cc_show_instance if the user selects 'Delete This Instance'
|
||||
* There is more than one cc_show_instance if the user selects 'Delete This
|
||||
* Instance and All Following'. We only need to set the last_show value
|
||||
* when 'Delete This Instance and All Following' has been selected
|
||||
*/
|
||||
// There is only one cc_show_instance if the user selects 'Delete This Instance'
|
||||
// There is more than one cc_show_instance if the user selects 'Delete This
|
||||
// Instance and All Following'. We only need to set the last_show value
|
||||
// when 'Delete This Instance and All Following' has been selected
|
||||
} elseif (count($ccShowInstances) > 1) {
|
||||
$this->setLastRepeatingShowDate($showId);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ function showConfigCheckPage()
|
|||
|
||||
require_once CONFIG_PATH . '/config-check.php';
|
||||
|
||||
exit();
|
||||
exit;
|
||||
}
|
||||
|
||||
function isApiCall()
|
||||
|
|
Loading…
Reference in New Issue