From 63d9e430e1c0fd9f350325682d0fca1bceb5cdd1 Mon Sep 17 00:00:00 2001 From: jo Date: Mon, 12 Sep 2022 13:16:14 +0200 Subject: [PATCH] chore(legacy): format code --- legacy/application/common/CeleryManager.php | 12 +++++----- legacy/application/common/FileDataHelper.php | 4 ++-- legacy/application/common/Storage.php | 2 +- .../application/forms/SmartBlockCriteria.php | 5 ++-- .../forms/StreamSettingSubForm.php | 8 +++---- legacy/application/models/Scheduler.php | 2 -- legacy/application/models/StoredFile.php | 8 +++---- legacy/application/models/StreamSetting.php | 2 +- legacy/application/models/Systemstatus.php | 5 ++-- legacy/application/models/airtime/CcBlock.php | 8 +++---- .../models/airtime/CcBlockcontents.php | 8 +++---- legacy/application/models/airtime/CcFiles.php | 12 +++++----- .../application/models/airtime/CcPlaylist.php | 8 +++---- .../models/airtime/CcPlaylistcontents.php | 8 +++---- .../application/models/airtime/CcSchedule.php | 16 ++++++------- legacy/application/models/airtime/CcShow.php | 12 +++++----- .../models/airtime/CcShowInstances.php | 12 +++++----- .../models/tests/SchedulerExportTests.php | 1 + .../models/tests/SchedulerTests.php | 1 + .../models/tests/StoredFileTests.php | 1 + .../rest/controllers/PodcastController.php | 4 ++-- .../rest/controllers/ShowImageController.php | 8 +++---- legacy/application/services/MediaService.php | 4 ++-- .../services/PodcastEpisodeService.php | 24 +++++++++---------- .../application/services/PodcastService.php | 16 ++++++------- .../services/ThirdPartyCeleryService.php | 12 +++++----- .../services/ThirdPartyService.php | 4 ++-- .../models/database/BlockDbTest.php | 1 + .../models/database/ScheduleDbTest.php | 1 + .../models/unit/PreferenceUnitTest.php | 1 + .../models/unit/ScheduleUnitTest.php | 1 + .../services/database/ShowServiceDbTest.php | 1 + .../services/unit/ShowServiceUnitTest.php | 1 + 33 files changed, 111 insertions(+), 102 deletions(-) diff --git a/legacy/application/common/CeleryManager.php b/legacy/application/common/CeleryManager.php index 668167ab7..3a4fa785a 100644 --- a/legacy/application/common/CeleryManager.php +++ b/legacy/application/common/CeleryManager.php @@ -31,9 +31,9 @@ class CeleryManager * @param $exchange string the amqp exchange name * @param $queue string the amqp queue name * - * @throws Exception when a connection error occurs - * * @return Celery the Celery connection object + * + * @throws Exception when a connection error occurs */ private static function _setupCeleryExchange($config, $exchange, $queue) { @@ -76,11 +76,11 @@ class CeleryManager * * @param $task CeleryTasks the Celery task object * + * @return array the message response array + * * @throws CeleryException when no message is found * @throws CeleryTimeoutException when no message is found and more than * $_CELERY_MESSAGE_TIMEOUT milliseconds have passed - * - * @return array the message response array */ private static function getAsyncResultMessage($task) { @@ -183,10 +183,10 @@ class CeleryManager * * @param $task CeleryTasks the Celery task object * + * @return object the task message object + * * @throws CeleryException when the result message for this task is still pending * @throws CeleryTimeoutException when the result message for this task no longer exists - * - * @return object the task message object */ protected static function _getTaskMessage($task) { diff --git a/legacy/application/common/FileDataHelper.php b/legacy/application/common/FileDataHelper.php index 63a7e80af..f7b7f8f2a 100644 --- a/legacy/application/common/FileDataHelper.php +++ b/legacy/application/common/FileDataHelper.php @@ -59,9 +59,9 @@ class FileDataHelper * * @param string $mime * - * @throws Exception - * * @return string file extension with(!) a dot (for convenience) + * + * @throws Exception */ public static function getFileExtensionFromMime($mime) { diff --git a/legacy/application/common/Storage.php b/legacy/application/common/Storage.php index 012b29122..8e0b97f63 100644 --- a/legacy/application/common/Storage.php +++ b/legacy/application/common/Storage.php @@ -10,6 +10,6 @@ class Application_Common_Storage return null; } - return [$storage_path, substr($p_filepath, strlen($storage_path))]; + return [$storage_path, substr($p_filepath, strlen($storage_path))]; } } diff --git a/legacy/application/forms/SmartBlockCriteria.php b/legacy/application/forms/SmartBlockCriteria.php index d7ad8e11a..423a9f71f 100644 --- a/legacy/application/forms/SmartBlockCriteria.php +++ b/legacy/application/forms/SmartBlockCriteria.php @@ -849,8 +849,9 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm $element->addError(_("'Length' should be in '00:00:00' format")); $isValid = false; } - // this looks up the column type for the criteria the modified time, upload time etc. - } elseif ($column->getType() == PropelColumnTypes::TIMESTAMP) { + } + // this looks up the column type for the criteria the modified time, upload time etc. + elseif ($column->getType() == PropelColumnTypes::TIMESTAMP) { // need to check for relative modifiers first - bypassing currently if (in_array($d['sp_criteria_modifier'], ['before', 'after', 'between'])) { if (!preg_match('/^[1-9][0-9]*$|0/', $d['sp_criteria_value'])) { diff --git a/legacy/application/forms/StreamSettingSubForm.php b/legacy/application/forms/StreamSettingSubForm.php index 079ba0de5..fc3779141 100644 --- a/legacy/application/forms/StreamSettingSubForm.php +++ b/legacy/application/forms/StreamSettingSubForm.php @@ -66,7 +66,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm $output ->setLabel(_('Service Type:')) ->setAttrib('readonly', true) - ->setValue((isset($setting[$prefix . '_output']) ? $setting[$prefix . '_output'] : 'icecast')) + ->setValue(isset($setting[$prefix . '_output']) ? $setting[$prefix . '_output'] : 'icecast') ->setDecorators(['ViewHelper']); $this->addElement($output); @@ -82,7 +82,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm $host ->setLabel(_('Server')) ->setAttrib('readonly', true) - ->setValue((isset($setting[$prefix . '_host']) ? $setting[$prefix . '_host'] : '')) + ->setValue(isset($setting[$prefix . '_host']) ? $setting[$prefix . '_host'] : '') ->setDecorators(['ViewHelper']); $host->setAttrib('alt', 'domain'); $this->addElement($host); @@ -91,7 +91,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm $port ->setLabel(_('Port')) ->setAttrib('readonly', true) - ->setValue((isset($setting[$prefix . '_port']) ? $setting[$prefix . '_port'] : '')) + ->setValue(isset($setting[$prefix . '_port']) ? $setting[$prefix . '_port'] : '') ->setDecorators(['ViewHelper']); $this->addElement($port); @@ -99,7 +99,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm $mount ->setLabel(_('Mount Point')) ->setAttrib('readonly', true) - ->setValue((isset($setting[$prefix . '_mount']) ? $setting[$prefix . '_mount'] : '')) + ->setValue(isset($setting[$prefix . '_mount']) ? $setting[$prefix . '_mount'] : '') ->setDecorators(['ViewHelper']); $mount->setAttrib('alt', 'regular_text'); $this->addElement($mount); diff --git a/legacy/application/models/Scheduler.php b/legacy/application/models/Scheduler.php index 1d44c3b37..ebe929cbb 100644 --- a/legacy/application/models/Scheduler.php +++ b/legacy/application/models/Scheduler.php @@ -782,8 +782,6 @@ final class Application_Model_Scheduler ++$pos; } - - // $pos++; } // selected empty row to add after else { diff --git a/legacy/application/models/StoredFile.php b/legacy/application/models/StoredFile.php index af096da1f..49954ca37 100644 --- a/legacy/application/models/StoredFile.php +++ b/legacy/application/models/StoredFile.php @@ -584,9 +584,9 @@ SQL; * @param Propel Connection * @param null|mixed $con * - * @throws Exception - * * @return Application_Model_StoredFile + * + * @throws Exception */ public static function RecallById($p_id = null, $con = null) { @@ -914,9 +914,9 @@ SQL; * @param string $originalFilename * @param bool $copyFile copy the file instead of moving it * - * @throws Exception - * * @return Ambigous + * + * @throws Exception */ public static function moveFileToStor($tempFilePath, $originalFilename, $copyFile = false) { diff --git a/legacy/application/models/StreamSetting.php b/legacy/application/models/StreamSetting.php index 4e679e661..d8b0472c2 100644 --- a/legacy/application/models/StreamSetting.php +++ b/legacy/application/models/StreamSetting.php @@ -6,7 +6,7 @@ class Application_Model_StreamConfig { private static function toOutputKey($id) { - return 's' . ($id); + return 's' . $id; } private static function toOutputId($key) diff --git a/legacy/application/models/Systemstatus.php b/legacy/application/models/Systemstatus.php index a358220b2..1b32b5521 100644 --- a/legacy/application/models/Systemstatus.php +++ b/legacy/application/models/Systemstatus.php @@ -80,8 +80,9 @@ class Application_Model_Systemstatus if ($pid->length == 0) { $data = $notRunning; } - // running! - } elseif ($status == 0) { + } + // running! + elseif ($status == 0) { $data = $notMonitored; } } diff --git a/legacy/application/models/airtime/CcBlock.php b/legacy/application/models/airtime/CcBlock.php index 7ddee281b..810c03c9d 100644 --- a/legacy/application/models/airtime/CcBlock.php +++ b/legacy/application/models/airtime/CcBlock.php @@ -15,9 +15,9 @@ class CcBlock extends BaseCcBlock * @param string $format The date/time format string (either date()-style or strftime()-style). * If format is NULL, then the raw DateTime object will be returned. * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbUtime($format = 'Y-m-d H:i:s') { @@ -48,9 +48,9 @@ class CcBlock extends BaseCcBlock * @param string $format The date/time format string (either date()-style or strftime()-style). * If format is NULL, then the raw DateTime object will be returned. * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbMtime($format = 'Y-m-d H:i:s') { diff --git a/legacy/application/models/airtime/CcBlockcontents.php b/legacy/application/models/airtime/CcBlockcontents.php index fe2704a63..e33ff4591 100644 --- a/legacy/application/models/airtime/CcBlockcontents.php +++ b/legacy/application/models/airtime/CcBlockcontents.php @@ -14,9 +14,9 @@ class CcBlockcontents extends BaseCcBlockcontents * * @param mixed $format * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbFadein($format = 's.u') { @@ -28,9 +28,9 @@ class CcBlockcontents extends BaseCcBlockcontents * * @param mixed $format * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbFadeout($format = 's.u') { diff --git a/legacy/application/models/airtime/CcFiles.php b/legacy/application/models/airtime/CcFiles.php index f59f29fbf..a255029a2 100644 --- a/legacy/application/models/airtime/CcFiles.php +++ b/legacy/application/models/airtime/CcFiles.php @@ -69,9 +69,9 @@ class CcFiles extends BaseCcFiles * * @param $fileArray An array containing metadata for a CcFiles object * - * @throws Exception - * * @return object the sanitized response + * + * @throws Exception */ public static function createFromUpload($fileArray) { @@ -126,10 +126,10 @@ class CcFiles extends BaseCcFiles * @param string $originalFilename * @param bool $copyFile * + * @return mixed + * * @throws Exception * @throws PropelException - * - * @return mixed */ private static function createAndImport($fileArray, $filePath, $originalFilename, $copyFile = false) { @@ -190,11 +190,11 @@ class CcFiles extends BaseCcFiles * @param $fileId string The ID of the file to update in the DB * @param $fileArray array An associative array containing metadata. Replaces those fields if they exist. * + * @return array a sanitized version of the file metadata array + * * @throws Exception * @throws LibreTimeFileNotFoundException * @throws PropelException - * - * @return array a sanitized version of the file metadata array */ public static function updateFromArray($fileId, $fileArray) { diff --git a/legacy/application/models/airtime/CcPlaylist.php b/legacy/application/models/airtime/CcPlaylist.php index 7c3b1e4db..a5db7907b 100644 --- a/legacy/application/models/airtime/CcPlaylist.php +++ b/legacy/application/models/airtime/CcPlaylist.php @@ -15,9 +15,9 @@ class CcPlaylist extends BaseCcPlaylist * @param string $format The date/time format string (either date()-style or strftime()-style). * If format is NULL, then the raw DateTime object will be returned. * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbUtime($format = 'Y-m-d H:i:s') { @@ -48,9 +48,9 @@ class CcPlaylist extends BaseCcPlaylist * @param string $format The date/time format string (either date()-style or strftime()-style). * If format is NULL, then the raw DateTime object will be returned. * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbMtime($format = 'Y-m-d H:i:s') { diff --git a/legacy/application/models/airtime/CcPlaylistcontents.php b/legacy/application/models/airtime/CcPlaylistcontents.php index bfde42f42..248f5546a 100644 --- a/legacy/application/models/airtime/CcPlaylistcontents.php +++ b/legacy/application/models/airtime/CcPlaylistcontents.php @@ -14,9 +14,9 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents * * @param mixed $format * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbFadein($format = 's.u') { @@ -28,9 +28,9 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents * * @param mixed $format * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbFadeout($format = 's.u') { diff --git a/legacy/application/models/airtime/CcSchedule.php b/legacy/application/models/airtime/CcSchedule.php index b3f30d395..f21f40a13 100644 --- a/legacy/application/models/airtime/CcSchedule.php +++ b/legacy/application/models/airtime/CcSchedule.php @@ -15,9 +15,9 @@ class CcSchedule extends BaseCcSchedule * @param string $format The date/time format string (either date()-style or strftime()-style). * If format is NULL, then the raw DateTime object will be returned. * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbStarts($format = 'Y-m-d H:i:s.u') { @@ -48,9 +48,9 @@ class CcSchedule extends BaseCcSchedule * @param string $format The date/time format string (either date()-style or strftime()-style). * If format is NULL, then the raw DateTime object will be returned. * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbEnds($format = 'Y-m-d H:i:s.u') { @@ -80,9 +80,9 @@ class CcSchedule extends BaseCcSchedule * * @param mixed $format * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbFadeIn($format = 's.u') { @@ -94,9 +94,9 @@ class CcSchedule extends BaseCcSchedule * * @param mixed $format * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbFadeOut($format = 's.u') { diff --git a/legacy/application/models/airtime/CcShow.php b/legacy/application/models/airtime/CcShow.php index b162d8fbc..02c6c569e 100644 --- a/legacy/application/models/airtime/CcShow.php +++ b/legacy/application/models/airtime/CcShow.php @@ -38,9 +38,9 @@ class CcShow extends BaseCcShow * @param Criteria $criteria optional Criteria object to narrow the query * @param PropelPDO $con optional connection object * - * @throws PropelException - * * @return array|PropelCollection CcShowDays[] List of CcShowDays objects + * + * @throws PropelException */ public function getFirstCcShowDay($criteria = null, PropelPDO $con = null) { @@ -157,9 +157,9 @@ class CcShow extends BaseCcShow * @param Criteria $criteria optional Criteria object to narrow the query * @param PropelPDO $con optional connection object * - * @throws PropelException - * * @return array|PropelCollection CcShowInstances[] List of CcShowInstances objects + * + * @throws PropelException */ public function getFutureCcShowInstancess($criteria = null, PropelPDO $con = null) { @@ -242,9 +242,9 @@ class CcShow extends BaseCcShow * @param Criteria $criteria optional Criteria object to narrow the query * @param PropelPDO $con optional connection object * - * @throws PropelException - * * @return array|PropelCollection CcShowInstances[] List of CcShowInstances objects + * + * @throws PropelException */ public function getCcShowInstancess($criteria = null, PropelPDO $con = null) { diff --git a/legacy/application/models/airtime/CcShowInstances.php b/legacy/application/models/airtime/CcShowInstances.php index 35038926c..0a495a833 100644 --- a/legacy/application/models/airtime/CcShowInstances.php +++ b/legacy/application/models/airtime/CcShowInstances.php @@ -15,9 +15,9 @@ class CcShowInstances extends BaseCcShowInstances * @param string $format The date/time format string (either date()-style or strftime()-style). * If format is NULL, then the raw DateTime object will be returned. * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbStarts($format = 'Y-m-d H:i:s') { @@ -48,9 +48,9 @@ class CcShowInstances extends BaseCcShowInstances * @param string $format The date/time format string (either date()-style or strftime()-style). * If format is NULL, then the raw DateTime object will be returned. * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbEnds($format = 'Y-m-d H:i:s') { @@ -81,9 +81,9 @@ class CcShowInstances extends BaseCcShowInstances * @param string $format The date/time format string (either date()-style or strftime()-style). * If format is NULL, then the raw DateTime object will be returned. * - * @throws propelException - if unable to parse/validate the date/time value - * * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL + * + * @throws propelException - if unable to parse/validate the date/time value */ public function getDbLastScheduled($format = 'Y-m-d H:i:s') { diff --git a/legacy/application/models/tests/SchedulerExportTests.php b/legacy/application/models/tests/SchedulerExportTests.php index 5b680eac0..b1787b90d 100644 --- a/legacy/application/models/tests/SchedulerExportTests.php +++ b/legacy/application/models/tests/SchedulerExportTests.php @@ -2,6 +2,7 @@ /** * @internal + * * @coversNothing */ class SchedulerExportTests extends PHPUnit_TestCase diff --git a/legacy/application/models/tests/SchedulerTests.php b/legacy/application/models/tests/SchedulerTests.php index 7eccf4031..0940dea34 100644 --- a/legacy/application/models/tests/SchedulerTests.php +++ b/legacy/application/models/tests/SchedulerTests.php @@ -2,6 +2,7 @@ /** * @internal + * * @coversNothing */ class SchedulerTests extends PHPUnit_TestCase diff --git a/legacy/application/models/tests/StoredFileTests.php b/legacy/application/models/tests/StoredFileTests.php index ccf485b61..2aab80dac 100644 --- a/legacy/application/models/tests/StoredFileTests.php +++ b/legacy/application/models/tests/StoredFileTests.php @@ -2,6 +2,7 @@ /** * @internal + * * @coversNothing */ class StoredFileTest extends PHPUnit_TestCase diff --git a/legacy/application/modules/rest/controllers/PodcastController.php b/legacy/application/modules/rest/controllers/PodcastController.php index 8066c4ee5..65bef6593 100644 --- a/legacy/application/modules/rest/controllers/PodcastController.php +++ b/legacy/application/modules/rest/controllers/PodcastController.php @@ -170,7 +170,7 @@ class Rest_PodcastController extends Zend_Rest_Controller Application_Service_PodcastService::deletePodcastById($id); } - break; + break; case HttpRequestType::GET: $path = 'podcast/podcast.phtml'; @@ -181,7 +181,7 @@ class Rest_PodcastController extends Zend_Rest_Controller ]; } - break; + break; } $this->_helper->json->sendJson($responseBody); diff --git a/legacy/application/modules/rest/controllers/ShowImageController.php b/legacy/application/modules/rest/controllers/ShowImageController.php index dc99126b3..5911ab808 100644 --- a/legacy/application/modules/rest/controllers/ShowImageController.php +++ b/legacy/application/modules/rest/controllers/ShowImageController.php @@ -146,11 +146,11 @@ class Rest_ShowImageController extends Zend_Rest_Controller * @param int $showId the ID of the show we're adding the image to * @param string $tempFilePath temporary filepath assigned to the upload generally of the form /tmp/:tmp_name * + * @return string the path to the new location for the file + * * @throws Exception * - when a file with an unsupported file extension is uploaded or an * error occurs in copyFileToStor - * - * @return string the path to the new location for the file */ private function processUploadedImage($showId, $tempFilePath) { @@ -219,12 +219,12 @@ class Rest_ShowImageController extends Zend_Rest_Controller * @param string $importedStorageDirectory the path to the new location for the file * @param string $fileExtension the file's extension based on its MIME type * + * @return string the new full path to the file in stor + * * @throws Exception if either the storage directory does not exist and cannot be * created, the storage directory does not have write permissions * enabled, or the user's hard drive does not have enough space to * store the file - * - * @return string the new full path to the file in stor */ private function copyFileToStor($tempFilePath, $importedStorageDirectory, $fileExtension) { diff --git a/legacy/application/services/MediaService.php b/legacy/application/services/MediaService.php index 7ea0798c7..72eb2b8bd 100644 --- a/legacy/application/services/MediaService.php +++ b/legacy/application/services/MediaService.php @@ -19,9 +19,9 @@ class Application_Service_MediaService * @param $ownerId string The ID of the user that will own the file inside Airtime * @param $copyFile bool True if you want to copy the file to the "organize" directory, false if you want to move it (default) * - * @throws Exception - * * @return Ambigous + * + * @throws Exception */ public static function importFileToLibrary($fileId, $filePath, $originalFilename, $ownerId, $copyFile) { diff --git a/legacy/application/services/PodcastEpisodeService.php b/legacy/application/services/PodcastEpisodeService.php index 3187b3048..9158f34b0 100644 --- a/legacy/application/services/PodcastEpisodeService.php +++ b/legacy/application/services/PodcastEpisodeService.php @@ -88,9 +88,9 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir * @param int $podcastId Podcast object identifier * @param array $episode array of podcast episode data * - * @throws DuplicatePodcastEpisodeException - * * @return PodcastEpisodes the stored PodcastEpisodes object + * + * @throws DuplicatePodcastEpisodeException */ public function addPlaceholder($podcastId, $episode) { @@ -116,10 +116,10 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir * @param string $title the title of the episode * @param string $description the description of the epsiode * + * @return PodcastEpisodes the newly created PodcastEpisodes object + * * @throws Exception * @throws PropelException - * - * @return PodcastEpisodes the newly created PodcastEpisodes object */ private function _buildEpisode($podcastId, $url, $guid, $publicationDate, $title = null, $description = null) { @@ -202,10 +202,10 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir * @param $episode stdClass simple object containing Podcast episode information * @param $status string Celery task status * + * @return ThirdPartyTrackReferences the updated ThirdPartyTrackReferences object + * * @throws Exception * @throws PropelException - * - * @return ThirdPartyTrackReferences the updated ThirdPartyTrackReferences object */ public function updateTrackReference($task, $episodeId, $episode, $status) { @@ -320,9 +320,9 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir /** * @param $episodeId * - * @throws PodcastEpisodeNotFoundException - * * @return array + * + * @throws PodcastEpisodeNotFoundException */ public static function getPodcastEpisodeById($episodeId) { @@ -343,9 +343,9 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir * @param string $sortColumn * @param string $sortDir "ASC" || "DESC" * - * @throws PodcastNotFoundException - * * @return array + * + * @throws PodcastNotFoundException */ public function getPodcastEpisodes( $podcastId, @@ -408,9 +408,9 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir * @param ImportedPodcast $podcast Podcast object to fetch the episodes for * @param array $episodes array of PodcastEpisodes objects to * - * @throws CcFiles/LibreTimeFileNotFoundException - * * @return array array of episode data + * + * @throws CcFiles/LibreTimeFileNotFoundException */ public function _getImportedPodcastEpisodeArray($podcast, $episodes) { diff --git a/legacy/application/services/PodcastService.php b/legacy/application/services/PodcastService.php index a14bdf063..7ff77ed01 100644 --- a/legacy/application/services/PodcastService.php +++ b/legacy/application/services/PodcastService.php @@ -44,10 +44,10 @@ class Application_Service_PodcastService * * @param string $feedUrl Podcast RSS Feed Url * + * @return array Podcast Array with a full list of episodes + * * @throws Exception * @throws InvalidPodcastException - * - * @return array Podcast Array with a full list of episodes */ public static function createFromFeedUrl($feedUrl) { @@ -278,10 +278,10 @@ class Application_Service_PodcastService * * @param $podcastId * + * @return array - Podcast Array with a full list of episodes + * * @throws PodcastNotFoundException * @throws InvalidPodcastException - * - * @return array - Podcast Array with a full list of episodes */ public static function getPodcastById($podcastId) { @@ -325,9 +325,9 @@ class Application_Service_PodcastService * @param int $podcastId ID of the podcast to build a response for * @param Zend_View_Interface $view Zend view object to render the response HTML * - * @throws PodcastNotFoundException - * * @return array the response array containing the podcast data and editor HTML + * + * @throws PodcastNotFoundException */ public static function buildPodcastEditorResponse($podcastId, $view) { @@ -349,10 +349,10 @@ class Application_Service_PodcastService * @param $podcastId * @param $data * + * @return array + * * @throws Exception * @throws PodcastNotFoundException - * - * @return array */ public static function updatePodcastFromArray($podcastId, $data) { diff --git a/legacy/application/services/ThirdPartyCeleryService.php b/legacy/application/services/ThirdPartyCeleryService.php index 9694bd358..90b604fac 100644 --- a/legacy/application/services/ThirdPartyCeleryService.php +++ b/legacy/application/services/ThirdPartyCeleryService.php @@ -19,9 +19,9 @@ abstract class Application_Service_ThirdPartyCeleryService extends Application_S * @param array $data the data array to send as task parameters * @param int $fileId the unique identifier for the file involved in the task * - * @throws Exception - * * @return CeleryTasks the created task + * + * @throws Exception */ protected function _executeTask($taskName, $data, $fileId = null) { @@ -49,10 +49,10 @@ abstract class Application_Service_ThirdPartyCeleryService extends Application_S * receive completed task messages * @param $taskName string broker task name * + * @return CeleryTasks the created task + * * @throws Exception * @throws PropelException - * - * @return CeleryTasks the created task */ protected function _createTaskReference($fileId, $brokerTaskId, $taskName) { @@ -95,10 +95,10 @@ abstract class Application_Service_ThirdPartyCeleryService extends Application_S * @param $result mixed Celery task result message * @param $status string Celery task status * + * @return ThirdPartyTrackReferences the updated ThirdPartyTrackReferences object + * * @throws Exception * @throws PropelException - * - * @return ThirdPartyTrackReferences the updated ThirdPartyTrackReferences object */ public function updateTrackReference($task, $trackId, $result, $status) { diff --git a/legacy/application/services/ThirdPartyService.php b/legacy/application/services/ThirdPartyService.php index 2cb03ed0d..2f70fb0e4 100644 --- a/legacy/application/services/ThirdPartyService.php +++ b/legacy/application/services/ThirdPartyService.php @@ -24,10 +24,10 @@ abstract class Application_Service_ThirdPartyService * * @param $fileId int local CcFiles identifier * + * @return string the new ThirdPartyTrackReferences identifier + * * @throws Exception * @throws PropelException - * - * @return string the new ThirdPartyTrackReferences identifier */ public function createTrackReference($fileId) { diff --git a/legacy/tests/application/models/database/BlockDbTest.php b/legacy/tests/application/models/database/BlockDbTest.php index 81a21ac6d..9973354ec 100644 --- a/legacy/tests/application/models/database/BlockDbTest.php +++ b/legacy/tests/application/models/database/BlockDbTest.php @@ -2,6 +2,7 @@ /** * @internal + * * @coversNothing */ class BlockDbTest extends Zend_Test_PHPUnit_DatabaseTestCase // PHPUnit_Framework_TestCase diff --git a/legacy/tests/application/models/database/ScheduleDbTest.php b/legacy/tests/application/models/database/ScheduleDbTest.php index 9842f2da8..09a087d0d 100644 --- a/legacy/tests/application/models/database/ScheduleDbTest.php +++ b/legacy/tests/application/models/database/ScheduleDbTest.php @@ -2,6 +2,7 @@ /** * @internal + * * @coversNothing */ class ScheduleDbTest extends Zend_Test_PHPUnit_DatabaseTestCase diff --git a/legacy/tests/application/models/unit/PreferenceUnitTest.php b/legacy/tests/application/models/unit/PreferenceUnitTest.php index b814f52f9..d317ea6be 100644 --- a/legacy/tests/application/models/unit/PreferenceUnitTest.php +++ b/legacy/tests/application/models/unit/PreferenceUnitTest.php @@ -4,6 +4,7 @@ require_once '../application/configs/conf.php'; /** * @internal + * * @coversNothing */ class PreferenceUnitTest extends PHPUnit_Framework_TestCase diff --git a/legacy/tests/application/models/unit/ScheduleUnitTest.php b/legacy/tests/application/models/unit/ScheduleUnitTest.php index 3bed88520..c9779c6c6 100644 --- a/legacy/tests/application/models/unit/ScheduleUnitTest.php +++ b/legacy/tests/application/models/unit/ScheduleUnitTest.php @@ -2,6 +2,7 @@ /** * @internal + * * @coversNothing */ class ScheduleUnitTest extends Zend_Test_PHPUnit_ControllerTestCase // PHPUnit_Framework_TestCase diff --git a/legacy/tests/application/services/database/ShowServiceDbTest.php b/legacy/tests/application/services/database/ShowServiceDbTest.php index ed41e4e96..682e1eee9 100644 --- a/legacy/tests/application/services/database/ShowServiceDbTest.php +++ b/legacy/tests/application/services/database/ShowServiceDbTest.php @@ -12,6 +12,7 @@ require_once '../application/configs/conf.php'; */ /** * @internal + * * @coversNothing */ class ShowServiceDbTest extends Zend_Test_PHPUnit_DatabaseTestCase diff --git a/legacy/tests/application/services/unit/ShowServiceUnitTest.php b/legacy/tests/application/services/unit/ShowServiceUnitTest.php index 43a6ab358..73d663dd4 100644 --- a/legacy/tests/application/services/unit/ShowServiceUnitTest.php +++ b/legacy/tests/application/services/unit/ShowServiceUnitTest.php @@ -4,6 +4,7 @@ require_once '../application/configs/conf.php'; /** * @internal + * * @coversNothing */ class ShowServiceUnitTest extends PHPUnit_Framework_TestCase