style(legacy): force semicolon on same line (#1534)

This commit is contained in:
Jonas L 2022-01-23 19:15:55 +01:00 committed by GitHub
parent 522d989cab
commit 8569af9328
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
85 changed files with 396 additions and 789 deletions

View file

@ -76,8 +76,7 @@ class ApiController extends Zend_Controller_Action
->addActionContext('get-usability-hint', 'json')
->addActionContext('poll-celery', 'json')
->addActionContext('recalculate-schedule', 'json') //RKTN-260
->initContext()
;
->initContext();
}
public function checkAuth()
@ -1412,8 +1411,7 @@ class ApiController extends Zend_Controller_Action
$previous_metadata = CcWebstreamMetadataQuery::create()
->orderByDbStartTime('desc')
->filterByDbInstanceId($media_id)
->findOne()
;
->findOne();
$do_insert = true;
if ($previous_metadata) {
@ -1723,8 +1721,7 @@ class ApiController extends Zend_Controller_Action
->filterByDbStarts($now, Criteria::GREATER_THAN)
//->filterByDbModifiedInstance(false)
->orderByDbStarts()
->find()
;
->find();
//->find($this->con);
$total = $showInstances->count();
$progress = 0;
@ -1771,7 +1768,6 @@ class ApiController extends Zend_Controller_Action
$this->getResponse()
->setHttpResponseCode($status)
->setHeader('Content-Type', 'application/json')
->setBody(json_encode(['error' => $message]))
;
->setBody(json_encode(['error' => $message]));
}
}

View file

@ -10,8 +10,7 @@ class AudiopreviewController extends Zend_Controller_Action
->addActionContext('get-show', 'json')
->addActionContext('playlist-preview', 'json')
->addActionContext('get-playlist', 'json')
->initContext()
;
->initContext();
}
/**

View file

@ -7,8 +7,7 @@ class DashboardController extends Zend_Controller_Action
$ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext->addActionContext('switch-source', 'json')
->addActionContext('disconnect-source', 'json')
->initContext()
;
->initContext();
}
public function indexAction()

View file

@ -15,8 +15,7 @@ class LibraryController extends Zend_Controller_Action
->addActionContext('set-num-entries', 'json')
->addActionContext('edit-file-md', 'json')
->addActionContext('publish-dialog', 'html')
->initContext()
;
->initContext();
}
public function indexAction()

View file

@ -7,8 +7,7 @@ class ListenerstatController extends Zend_Controller_Action
$ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext
->addActionContext('get-data', 'json')
->initContext()
;
->initContext();
}
public function indexAction()

View file

@ -10,8 +10,7 @@ class LoginController extends Zend_Controller_Action
$this->view->headLink(['rel' => 'icon', 'href' => $baseUrl . 'favicon.ico?' . $CC_CONFIG['airtime_version'], 'type' => 'image/x-icon'], 'PREPEND')
->appendStylesheet($baseUrl . 'css/bootstrap.css?' . $CC_CONFIG['airtime_version'])
->appendStylesheet($baseUrl . 'css/redmond/jquery-ui-1.8.8.custom.css?' . $CC_CONFIG['airtime_version'])
->appendStylesheet($baseUrl . 'css/styles.css?' . $CC_CONFIG['airtime_version'])
;
->appendStylesheet($baseUrl . 'css/styles.css?' . $CC_CONFIG['airtime_version']);
}
public function indexAction()
@ -64,8 +63,7 @@ class LoginController extends Zend_Controller_Action
//pass to the adapter the submitted username and password
$authAdapter->setIdentity($username)
->setCredential($password)
;
->setCredential($password);
$result = $auth->authenticate($authAdapter);
if ($result->isValid()) {
@ -142,8 +140,7 @@ class LoginController extends Zend_Controller_Action
$query->filterByDbLogin($username);
} else {
$query->filterByDbEmail($email)
->filterByDbLogin($username)
;
->filterByDbLogin($username);
}
$user = $query->findOne();
@ -212,8 +209,7 @@ class LoginController extends Zend_Controller_Action
$authAdapter = Application_Model_Auth::getAuthAdapter();
$authAdapter->setIdentity($user->getDbLogin())
->setCredential($form->password->getValue())
;
->setCredential($form->password->getValue());
$zend_auth->authenticate($authAdapter);

View file

@ -29,8 +29,7 @@ class PlaylistController extends Zend_Controller_Action
->addActionContext('shuffle', 'json')
->addActionContext('empty-content', 'json')
->addActionContext('change-playlist', 'json')
->initContext()
;
->initContext();
//This controller writes to the session all over the place, so we're going to reopen it for writing here.
SessionHelper::reopenSessionForWriting();

View file

@ -16,8 +16,7 @@ class PlayouthistoryController extends Zend_Controller_Action
->addActionContext('delete-list-items', 'json')
->addActionContext('update-list-item', 'json')
->addActionContext('update-file-item', 'json')
->initContext()
;
->initContext();
}
public function indexAction()

View file

@ -10,8 +10,7 @@ class PlayouthistorytemplateController extends Zend_Controller_Action
->addActionContext('update-template', 'json')
->addActionContext('delete-template', 'json')
->addActionContext('set-template-default', 'json')
->initContext()
;
->initContext();
}
public function indexAction()

View file

@ -7,8 +7,7 @@ class PluploadController extends Zend_Controller_Action
$ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext->addActionContext('upload', 'json')
->addActionContext('recent-uploads', 'json')
->initContext()
;
->initContext();
}
public function indexAction()
@ -103,8 +102,7 @@ class PluploadController extends Zend_Controller_Action
->orderByDbUtime(Criteria::DESC)
->offset($rowStart)
->limit($limit)
->find()
;
->find();
$uploadsArray = [];
$utcTimezone = new DateTimeZone('UTC');

View file

@ -15,8 +15,7 @@ class PreferenceController extends Zend_Controller_Action
->addActionContext('get-liquidsoap-status', 'json')
->addActionContext('set-source-connection-url', 'json')
->addActionContext('get-admin-password-status', 'json')
->initContext()
;
->initContext();
}
public function indexAction()
@ -512,8 +511,7 @@ class PreferenceController extends Zend_Controller_Action
if (!($method == 'POST')) {
$this->getResponse()
->setHttpResponseCode(405)
->appendBody(_('Request method not accepted') . ": {$method}")
;
->appendBody(_('Request method not accepted') . ": {$method}");
return;
}
@ -524,8 +522,7 @@ class PreferenceController extends Zend_Controller_Action
$this->getResponse()
->setHttpResponseCode(200)
->appendBody('OK')
;
->appendBody('OK');
}
private function deleteFutureScheduleItems()
@ -534,8 +531,7 @@ class PreferenceController extends Zend_Controller_Action
$nowDateTime = new DateTime('now', $utcTimezone);
$scheduleItems = CcScheduleQuery::create()
->filterByDbEnds($nowDateTime->format(DEFAULT_TIMESTAMP_FORMAT), Criteria::GREATER_THAN)
->find()
;
->find();
// Delete all the schedule items
foreach ($scheduleItems as $i) {

View file

@ -35,8 +35,7 @@ class ScheduleController extends Zend_Controller_Action
->addActionContext('get-current-show', 'json')
->addActionContext('update-future-is-scheduled', 'json')
->addActionContext('localize-start-end-time', 'json')
->initContext()
;
->initContext();
$this->sched_sess = new Zend_Session_Namespace('schedule');
}

View file

@ -12,8 +12,7 @@ class ShowbuilderController extends Zend_Controller_Action
->addActionContext('check-builder-feed', 'json')
->addActionContext('builder-feed', 'json')
->addActionContext('context-menu', 'json')
->initContext()
;
->initContext();
}
public function indexAction()

View file

@ -8,8 +8,7 @@ class TracktypeController extends Zend_Controller_Action
$ajaxContext->addActionContext('get-tracktype-data-table-info', 'json')
->addActionContext('get-tracktype-data', 'json')
->addActionContext('remove-tracktype', 'json')
->initContext()
;
->initContext();
}
public function addTracktypeAction()

View file

@ -17,19 +17,16 @@ class UpgradeController extends Zend_Controller_Action
if (!$didWePerformAnUpgrade) {
$this->getResponse()
->setHttpResponseCode(200)
->appendBody('No upgrade was performed. The current schema version is ' . Application_Model_Preference::GetSchemaVersion() . '.<br>')
;
->appendBody('No upgrade was performed. The current schema version is ' . Application_Model_Preference::GetSchemaVersion() . '.<br>');
} else {
$this->getResponse()
->setHttpResponseCode(200)
->appendBody('Upgrade to Airtime schema version ' . Application_Model_Preference::GetSchemaVersion() . ' OK<br>')
;
->appendBody('Upgrade to Airtime schema version ' . Application_Model_Preference::GetSchemaVersion() . ' OK<br>');
}
} catch (Exception $e) {
$this->getResponse()
->setHttpResponseCode(400)
->appendBody($e->getMessage())
;
->appendBody($e->getMessage());
}
}
@ -51,19 +48,16 @@ class UpgradeController extends Zend_Controller_Action
if (!$downgradePerformed) {
$this->getResponse()
->setHttpResponseCode(200)
->appendBody('No downgrade was performed. The current schema version is ' . Application_Model_Preference::GetSchemaVersion() . '.<br>')
;
->appendBody('No downgrade was performed. The current schema version is ' . Application_Model_Preference::GetSchemaVersion() . '.<br>');
} else {
$this->getResponse()
->setHttpResponseCode(200)
->appendBody('Downgrade to Airtime schema version ' . Application_Model_Preference::GetSchemaVersion() . ' OK<br>')
;
->appendBody('Downgrade to Airtime schema version ' . Application_Model_Preference::GetSchemaVersion() . ' OK<br>');
}
} catch (Exception $e) {
$this->getResponse()
->setHttpResponseCode(400)
->appendBody($e->getMessage())
;
->appendBody($e->getMessage());
}
}
}

View file

@ -10,8 +10,7 @@ class UserController extends Zend_Controller_Action
->addActionContext('get-user-data', 'json')
->addActionContext('remove-user', 'json')
->addActionContext('edit-user', 'json')
->initContext()
;
->initContext();
}
public function addUserAction()

View file

@ -16,8 +16,7 @@ class UsersettingsController extends Zend_Controller_Action
->addActionContext('remindme-never', 'json')
->addActionContext('donotshowregistrationpopup', 'json')
->addActionContext('set-library-screen-settings', 'json')
->initContext()
;
->initContext();
}
public function setNowPlayingScreenSettingsAction()

View file

@ -9,8 +9,7 @@ class WebstreamController extends Zend_Controller_Action
->addActionContext('save', 'json')
->addActionContext('edit', 'json')
->addActionContext('delete', 'json')
->initContext()
;
->initContext();
}
public function newAction()

View file

@ -146,8 +146,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
$this->getResponse()
->setHttpResponseCode(401)
->setBody($json)
->sendResponse()
;
->sendResponse();
//redirectAndExit() cleans up, sends the headers and stops the script
Zend_Controller_Action_HelperBroker::getStaticHelper('redirector')->redirectAndExit();
@ -178,8 +177,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
$this->getResponse()
->setHttpResponseCode(401)
->appendBody('ERROR: CSRF token mismatch.')
->sendResponse()
;
->sendResponse();
exit();
}
@ -223,8 +221,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
$this->getResponse()
->setHttpResponseCode(401)
->appendBody('ERROR: Incorrect API key.')
;
->appendBody('ERROR: Incorrect API key.');
return false;
}
@ -247,8 +244,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
$controller = $request->getControllerName();
$action = $request->getActionName();
$stationPodcast = StationPodcastQuery::create()
->findOneByDbPodcastId(Application_Model_Preference::getStationPodcastId())
;
->findOneByDbPodcastId(Application_Model_Preference::getStationPodcastId());
return $module == 'rest' && $controller == 'media' && $action == 'download'
&& $key === Application_Model_Preference::getStationPodcastDownloadKey()

View file

@ -10,8 +10,7 @@ class Zend_Controller_Plugin_Maintenance extends Zend_Controller_Plugin_Abstract
$request->setModuleName('default')
->setControllerName('index')
->setActionName('maintenance')
->setDispatched(true)
;
->setDispatched(true);
}
}
}

View file

@ -172,8 +172,7 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
->appendStylesheet($baseUrl . 'css/qtip/jquery.qtip.min.css?' . $CC_CONFIG['airtime_version'])
->appendStylesheet($baseUrl . 'css/styles.css?' . $CC_CONFIG['airtime_version'])
->appendStylesheet($baseUrl . 'css/masterpanel.css?' . $CC_CONFIG['airtime_version'])
->appendStylesheet($baseUrl . 'css/tipsy/jquery.tipsy.css?' . $CC_CONFIG['airtime_version'])
;
->appendStylesheet($baseUrl . 'css/tipsy/jquery.tipsy.css?' . $CC_CONFIG['airtime_version']);
}
protected function _initHeadScript()
@ -203,8 +202,7 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
->appendFile($baseUrl . 'locale/datatables-translation-table?' . $CC_CONFIG['airtime_version'], 'text/javascript')
->appendScript('$.i18n.setDictionary(general_dict)')
->appendScript("var baseUrl='{$baseUrl}'")
;
->appendScript("var baseUrl='{$baseUrl}'");
//These timezones are needed to adjust javascript Date objects on the client to make sense to the user's set timezone
//or the server's set timezone.
@ -228,8 +226,7 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
->appendFile($baseUrl . 'js/tipsy/jquery.tipsy.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
->appendFile($baseUrl . 'js/airtime/common/common.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
->appendFile($baseUrl . 'js/airtime/common/audioplaytest.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
;
->appendFile($baseUrl . 'js/airtime/common/audioplaytest.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$user = Application_Model_User::getCurrentUser();
if (!is_null($user)) {