Import annotated/attributed classes.
This commit is contained in:
parent
a7dd57429e
commit
d81d068027
|
@ -68,7 +68,7 @@ final class ListAction
|
|||
$flushCache = (bool)$request->getParam('flushCache', false);
|
||||
|
||||
if (!$flushCache && $this->cache->has($cacheKey)) {
|
||||
/** @var array<int, \App\Entity\Api\FileList> $result */
|
||||
/** @var array<int, FileList> $result */
|
||||
$result = $this->cache->get($cacheKey);
|
||||
} else {
|
||||
$pathLike = (empty($currentDir))
|
||||
|
|
|
@ -29,18 +29,18 @@ final class ListDirectoriesAction
|
|||
|
||||
$fsMedia = $this->stationFilesystems->getMediaFilesystem($station);
|
||||
|
||||
$protectedPaths = [
|
||||
StationMedia::DIR_ALBUM_ART,
|
||||
StationMedia::DIR_WAVEFORMS,
|
||||
StationMedia::DIR_FOLDER_COVERS,
|
||||
];
|
||||
|
||||
$directoriesRaw = $fsMedia->listContents($currentDir, false)->filter(
|
||||
function (StorageAttributes $attrs) use ($protectedPaths) {
|
||||
function (StorageAttributes $attrs) {
|
||||
if (!$attrs->isDir()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$protectedPaths = [
|
||||
StationMedia::DIR_ALBUM_ART,
|
||||
StationMedia::DIR_WAVEFORMS,
|
||||
StationMedia::DIR_FOLDER_COVERS,
|
||||
];
|
||||
|
||||
if (in_array($attrs->path(), $protectedPaths, true)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Stations\LiquidsoapConfig;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity\Api\Error;
|
||||
use App\Entity\Api\Status;
|
||||
use App\Entity\StationBackendConfiguration;
|
||||
use App\Event\Radio\WriteLiquidsoapConfiguration;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
|
@ -33,7 +36,7 @@ final class PutAction
|
|||
$station = $this->em->refetch($request->getStation());
|
||||
|
||||
$backendConfig = $station->getBackendConfig();
|
||||
foreach (\App\Entity\StationBackendConfiguration::getCustomConfigurationSections() as $field) {
|
||||
foreach (StationBackendConfiguration::getCustomConfigurationSections() as $field) {
|
||||
if (isset($body[$field])) {
|
||||
$backendConfig->setCustomConfigurationSection($field, $body[$field]);
|
||||
}
|
||||
|
@ -51,9 +54,9 @@ final class PutAction
|
|||
$config = $event->buildConfiguration();
|
||||
$this->liquidsoap->verifyConfig($config);
|
||||
} catch (Throwable $e) {
|
||||
return $response->withStatus(500)->withJson(\App\Entity\Api\Error::fromException($e));
|
||||
return $response->withStatus(500)->withJson(Error::fromException($e));
|
||||
}
|
||||
|
||||
return $response->withJson(\App\Entity\Api\Status::updated());
|
||||
return $response->withJson(Status::updated());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ use Symfony\Component\Serializer\Serializer;
|
|||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
|
||||
/**
|
||||
* @extends AbstractApiCrudController<\App\Entity\StationStreamerBroadcast>
|
||||
* @extends AbstractApiCrudController<StationStreamerBroadcast>
|
||||
*/
|
||||
final class BroadcastsController extends AbstractApiCrudController
|
||||
{
|
||||
|
@ -194,7 +194,7 @@ final class BroadcastsController extends AbstractApiCrudController
|
|||
|
||||
private function getRecord(Station $station, int|string $id): ?StationStreamerBroadcast
|
||||
{
|
||||
/** @var \App\Entity\StationStreamerBroadcast|null $broadcast */
|
||||
/** @var StationStreamerBroadcast|null $broadcast */
|
||||
$broadcast = $this->em->getRepository(StationStreamerBroadcast::class)->findOneBy(
|
||||
[
|
||||
'id' => (int)$id,
|
||||
|
@ -206,7 +206,7 @@ final class BroadcastsController extends AbstractApiCrudController
|
|||
|
||||
private function getStreamer(Station $station, int|string $id): ?StationStreamer
|
||||
{
|
||||
/** @var \App\Entity\StationStreamer|null $streamer */
|
||||
/** @var StationStreamer|null $streamer */
|
||||
$streamer = $this->em->getRepository(StationStreamer::class)->findOneBy(
|
||||
[
|
||||
'id' => (int)$id,
|
||||
|
|
|
@ -38,7 +38,7 @@ trait HasScheduleDisplay
|
|||
$endDate = $dateRange->getEnd();
|
||||
|
||||
foreach ($scheduleItems as $scheduleItem) {
|
||||
/** @var \App\Entity\StationSchedule $scheduleItem */
|
||||
/** @var StationSchedule $scheduleItem */
|
||||
$i = $startDate;
|
||||
|
||||
while ($i <= $endDate) {
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Frontend\PublicPages;
|
||||
|
||||
use App\Entity\StationMount;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Radio\Adapters;
|
||||
|
@ -30,7 +31,7 @@ final class PlaylistAction
|
|||
$fa = $this->adapters->getFrontendAdapter($station);
|
||||
if (null !== $fa) {
|
||||
foreach ($station->getMounts() as $mount) {
|
||||
/** @var \App\Entity\StationMount $mount */
|
||||
/** @var StationMount $mount */
|
||||
if (!$mount->getIsVisibleOnPublicPages()) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use Traversable;
|
|||
/**
|
||||
* @template TKey
|
||||
* @template TValue
|
||||
* @implements \IteratorAggregate<TKey, TValue>
|
||||
* @implements IteratorAggregate<TKey, TValue>
|
||||
*/
|
||||
abstract class AbstractBatchIteratorAggregate implements IteratorAggregate
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ final class ReadWriteBatchIteratorAggregate extends AbstractBatchIteratorAggrega
|
|||
{
|
||||
$this->customFetchFunction = (null === $customFetchFunction)
|
||||
? null
|
||||
: Closure::fromCallable($customFetchFunction);
|
||||
: $customFetchFunction(...);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\Api\Admin;
|
||||
|
||||
use App\Entity\Api\NowPlaying\StationMount;
|
||||
use App\Entity\Api\ResolvableUrlInterface;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
|
@ -74,7 +75,7 @@ final class Relay implements ResolvableUrlInterface
|
|||
)]
|
||||
public string $admin_pw;
|
||||
|
||||
/** @var \App\Entity\Api\NowPlaying\StationMount[] */
|
||||
/** @var StationMount[] */
|
||||
#[OA\Property]
|
||||
public array $mounts = [];
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\Migration;
|
||||
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Doctrine\DBAL\ArrayParameterType;
|
||||
use Doctrine\DBAL\ParameterType;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
@ -50,7 +50,7 @@ final class Version20191024185005 extends AbstractMigration
|
|||
$this->connection->executeStatement(
|
||||
'UPDATE station_media SET art_updated_at=UNIX_TIMESTAMP() WHERE unique_id IN (?)',
|
||||
[$mediaRowsToUpdate],
|
||||
[Connection::PARAM_STR_ARRAY]
|
||||
[ArrayParameterType::STRING]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,11 +5,13 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Repository;
|
||||
|
||||
use App\Doctrine\Repository;
|
||||
use App\Entity\ApiKey;
|
||||
use App\Entity\User;
|
||||
use App\Entity\UserLoginToken;
|
||||
use App\Security\SplitToken;
|
||||
|
||||
/**
|
||||
* @template TEntity of \App\Entity\ApiKey|\App\Entity\UserLoginToken
|
||||
* @template TEntity of ApiKey|UserLoginToken
|
||||
* @extends Repository<TEntity>
|
||||
*/
|
||||
abstract class AbstractSplitTokenRepository extends Repository
|
||||
|
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Repository;
|
||||
|
||||
use App\Doctrine\Repository;
|
||||
use App\Entity\Analytics;
|
||||
use App\Entity\Enums\AnalyticsIntervals;
|
||||
use App\Entity\Station;
|
||||
use App\Utilities\DateRange;
|
||||
|
@ -12,7 +13,7 @@ use Carbon\CarbonImmutable;
|
|||
use Carbon\CarbonInterface;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\Analytics>
|
||||
* @extends Repository<Analytics>
|
||||
*/
|
||||
final class AnalyticsRepository extends Repository
|
||||
{
|
||||
|
|
|
@ -11,19 +11,19 @@ use App\Entity\StationMedia;
|
|||
use App\Entity\StationMediaCustomField;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\CustomField>
|
||||
* @extends Repository<CustomField>
|
||||
*/
|
||||
final class CustomFieldRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* @return \App\Entity\CustomField[]
|
||||
* @return CustomField[]
|
||||
*/
|
||||
public function getAutoAssignableFields(): array
|
||||
{
|
||||
$fields = [];
|
||||
|
||||
foreach ($this->repository->findAll() as $field) {
|
||||
/** @var \App\Entity\CustomField $field */
|
||||
/** @var CustomField $field */
|
||||
if (!$field->hasAutoAssign()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ final class CustomFieldRepository extends Repository
|
|||
/**
|
||||
* Retrieve a key-value representation of all custom metadata for the specified media.
|
||||
*
|
||||
* @param \App\Entity\StationMedia $media
|
||||
* @param StationMedia $media
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
|
@ -88,7 +88,7 @@ final class CustomFieldRepository extends Repository
|
|||
/**
|
||||
* Set the custom metadata for a specified station based on a provided key-value array.
|
||||
*
|
||||
* @param \App\Entity\StationMedia $media
|
||||
* @param StationMedia $media
|
||||
* @param array $custom_fields
|
||||
*/
|
||||
public function setCustomFields(StationMedia $media, array $custom_fields): void
|
||||
|
|
|
@ -22,7 +22,7 @@ use Symfony\Component\Filesystem\Filesystem;
|
|||
use Throwable;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\Listener>
|
||||
* @extends Repository<Listener>
|
||||
*/
|
||||
final class ListenerRepository extends Repository
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ final class ListenerRepository extends Repository
|
|||
/**
|
||||
* Get the number of unique listeners for a station during a specified time period.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
* @param DateTimeInterface|int $start
|
||||
* @param DateTimeInterface|int $end
|
||||
*/
|
||||
|
@ -95,7 +95,7 @@ final class ListenerRepository extends Repository
|
|||
/**
|
||||
* Update listener data for a station.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
* @param Client[] $clients
|
||||
*/
|
||||
public function update(Station $station, array $clients): void
|
||||
|
|
|
@ -20,7 +20,7 @@ use League\Flysystem\UnableToDeleteFile;
|
|||
use League\Flysystem\UnableToRetrieveMetadata;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\PodcastEpisode>
|
||||
* @extends Repository<PodcastEpisode>
|
||||
*/
|
||||
final class PodcastEpisodeRepository extends Repository
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ final class PodcastEpisodeRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \App\Entity\PodcastEpisode[]
|
||||
* @return PodcastEpisode[]
|
||||
*/
|
||||
public function fetchPublishedEpisodesForPodcast(Podcast $podcast): array
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ use League\Flysystem\UnableToDeleteFile;
|
|||
use League\Flysystem\UnableToRetrieveMetadata;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\Podcast>
|
||||
* @extends Repository<Podcast>
|
||||
*/
|
||||
final class PodcastRepository extends Repository
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ final class PodcastRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \App\Entity\Podcast[]
|
||||
* @return Podcast[]
|
||||
*/
|
||||
public function fetchPublishedPodcastsForStation(Station $station): array
|
||||
{
|
||||
|
|
|
@ -10,12 +10,12 @@ use App\Entity\RolePermission;
|
|||
use App\Enums\GlobalPermissions;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\RolePermission>
|
||||
* @extends Repository<RolePermission>
|
||||
*/
|
||||
final class RolePermissionRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* @param \App\Entity\Role $role
|
||||
* @param Role $role
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
|
|
|
@ -13,7 +13,7 @@ use Symfony\Component\Serializer\Serializer;
|
|||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\Settings>
|
||||
* @extends Repository<Settings>
|
||||
*/
|
||||
final class SettingsRepository extends Repository
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ final class SettingsRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Settings|array $settingsObj
|
||||
* @param Settings|array $settingsObj
|
||||
*/
|
||||
public function writeSettings(Settings|array $settingsObj): void
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@ use Carbon\CarbonImmutable;
|
|||
use RuntimeException;
|
||||
|
||||
/**
|
||||
* @extends AbstractStationBasedRepository<\App\Entity\SongHistory>
|
||||
* @extends AbstractStationBasedRepository<SongHistory>
|
||||
*/
|
||||
final class SongHistoryRepository extends AbstractStationBasedRepository
|
||||
{
|
||||
|
@ -25,9 +25,9 @@ final class SongHistoryRepository extends AbstractStationBasedRepository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
* @return \App\Entity\SongHistory[]
|
||||
* @return SongHistory[]
|
||||
*/
|
||||
public function getVisibleHistory(
|
||||
Station $station,
|
||||
|
@ -134,7 +134,7 @@ final class SongHistoryRepository extends AbstractStationBasedRepository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
* @param int $start
|
||||
* @param int $end
|
||||
*
|
||||
|
|
|
@ -5,14 +5,15 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Repository;
|
||||
|
||||
use App\Entity\Station;
|
||||
use App\Entity\StationHlsStream;
|
||||
|
||||
/**
|
||||
* @extends AbstractStationBasedRepository<\App\Entity\StationHlsStream>
|
||||
* @extends AbstractStationBasedRepository<StationHlsStream>
|
||||
*/
|
||||
final class StationHlsStreamRepository extends AbstractStationBasedRepository
|
||||
{
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
|
@ -22,7 +23,7 @@ final class StationHlsStreamRepository extends AbstractStationBasedRepository
|
|||
|
||||
$displayNames = [];
|
||||
|
||||
/** @var \App\Entity\StationHlsStream $stream */
|
||||
/** @var StationHlsStream $stream */
|
||||
foreach ($streams as $stream) {
|
||||
$displayNames[$stream->getIdRequired()] = 'HLS: ' . $stream->getName();
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ use App\Entity\Song;
|
|||
use App\Entity\Station;
|
||||
use App\Entity\StationMedia;
|
||||
use App\Entity\StationMediaCustomField;
|
||||
use App\Entity\StationPlaylist;
|
||||
use App\Entity\StorageLocation;
|
||||
use App\Exception\NotFoundException;
|
||||
use App\Flysystem\ExtendedFilesystemInterface;
|
||||
|
@ -55,7 +56,7 @@ final class StationMediaRepository extends Repository
|
|||
|
||||
$storageLocation = $this->getStorageLocation($station);
|
||||
|
||||
/** @var \App\Entity\StationMedia|null $media */
|
||||
/** @var StationMedia|null $media */
|
||||
$media = $this->repository->findOneBy(
|
||||
[
|
||||
'storage_location' => $storageLocation,
|
||||
|
@ -77,7 +78,7 @@ final class StationMediaRepository extends Repository
|
|||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param \App\Entity\Station|\App\Entity\StorageLocation $source
|
||||
* @param Station|StorageLocation $source
|
||||
*
|
||||
*/
|
||||
public function findByPath(
|
||||
|
@ -86,7 +87,7 @@ final class StationMediaRepository extends Repository
|
|||
): ?StationMedia {
|
||||
$storageLocation = $this->getStorageLocation($source);
|
||||
|
||||
/** @var \App\Entity\StationMedia|null $media */
|
||||
/** @var StationMedia|null $media */
|
||||
$media = $this->repository->findOneBy(
|
||||
[
|
||||
'storage_location' => $storageLocation,
|
||||
|
@ -111,7 +112,7 @@ final class StationMediaRepository extends Repository
|
|||
|
||||
/**
|
||||
* @param string $uniqueId
|
||||
* @param \App\Entity\Station|\App\Entity\StorageLocation $source
|
||||
* @param Station|StorageLocation $source
|
||||
*
|
||||
*/
|
||||
public function findByUniqueId(
|
||||
|
@ -120,7 +121,7 @@ final class StationMediaRepository extends Repository
|
|||
): ?StationMedia {
|
||||
$storageLocation = $this->getStorageLocation($source);
|
||||
|
||||
/** @var \App\Entity\StationMedia|null $media */
|
||||
/** @var StationMedia|null $media */
|
||||
$media = $this->repository->findOneBy(
|
||||
[
|
||||
'storage_location' => $storageLocation,
|
||||
|
@ -154,7 +155,7 @@ final class StationMediaRepository extends Repository
|
|||
/**
|
||||
* Process metadata information from media file.
|
||||
*
|
||||
* @param \App\Entity\StationMedia $media
|
||||
* @param StationMedia $media
|
||||
* @param string $filePath
|
||||
* @param ExtendedFilesystemInterface|null $fs
|
||||
*/
|
||||
|
@ -174,7 +175,7 @@ final class StationMediaRepository extends Repository
|
|||
// Clear existing auto-assigned custom fields.
|
||||
$fieldCollection = $media->getCustomFields();
|
||||
foreach ($fieldCollection as $existingCustomField) {
|
||||
/** @var \App\Entity\StationMediaCustomField $existingCustomField */
|
||||
/** @var StationMediaCustomField $existingCustomField */
|
||||
if ($existingCustomField->getField()->hasAutoAssign()) {
|
||||
$this->em->remove($existingCustomField);
|
||||
$fieldCollection->removeElement($existingCustomField);
|
||||
|
@ -334,11 +335,11 @@ final class StationMediaRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\StationMedia $media
|
||||
* @param StationMedia $media
|
||||
* @param bool $deleteFile Whether to remove the media file itself (disabled for batch operations).
|
||||
* @param ExtendedFilesystemInterface|null $fs
|
||||
*
|
||||
* @return \App\Entity\StationPlaylist[] The IDs as keys and records as values for all affected playlists.
|
||||
* @return StationPlaylist[] The IDs as keys and records as values for all affected playlists.
|
||||
*/
|
||||
public function remove(
|
||||
StationMedia $media,
|
||||
|
|
|
@ -10,13 +10,13 @@ use App\Entity\StationPlaylist;
|
|||
use App\Entity\StationPlaylistFolder;
|
||||
|
||||
/**
|
||||
* @extends AbstractStationBasedRepository<\App\Entity\StationPlaylistFolder>
|
||||
* @extends AbstractStationBasedRepository<StationPlaylistFolder>
|
||||
*/
|
||||
final class StationPlaylistFolderRepository extends AbstractStationBasedRepository
|
||||
{
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @param \App\Entity\StationPlaylist[] $playlists
|
||||
* @param Station $station
|
||||
* @param StationPlaylist[] $playlists
|
||||
* @param string $path
|
||||
*/
|
||||
public function setPlaylistsForFolder(
|
||||
|
@ -39,7 +39,7 @@ final class StationPlaylistFolderRepository extends AbstractStationBasedReposito
|
|||
|
||||
foreach ($playlists as $playlistId => $playlistRecord) {
|
||||
if (PlaylistSources::Songs === $playlistRecord->getSource()) {
|
||||
/** @var \App\Entity\StationPlaylist $playlist */
|
||||
/** @var StationPlaylist $playlist */
|
||||
$playlist = $this->em->getReference(StationPlaylist::class, $playlistId);
|
||||
|
||||
$newRecord = new StationPlaylistFolder($station, $playlist, $path);
|
||||
|
|
|
@ -21,7 +21,7 @@ use InvalidArgumentException;
|
|||
use RuntimeException;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\StationPlaylistMedia>
|
||||
* @extends Repository<StationPlaylistMedia>
|
||||
*/
|
||||
final class StationPlaylistMediaRepository extends Repository
|
||||
{
|
||||
|
@ -36,8 +36,8 @@ final class StationPlaylistMediaRepository extends Repository
|
|||
* Add the specified media to the specified playlist.
|
||||
* Must flush the EntityManager after using.
|
||||
*
|
||||
* @param \App\Entity\StationMedia $media
|
||||
* @param \App\Entity\StationPlaylist $playlist
|
||||
* @param StationMedia $media
|
||||
* @param StationPlaylist $playlist
|
||||
* @param int $weight
|
||||
*
|
||||
* @return int The weight assigned to the newly added record.
|
||||
|
@ -104,10 +104,10 @@ final class StationPlaylistMediaRepository extends Repository
|
|||
/**
|
||||
* Remove all playlist associations from the specified media object.
|
||||
*
|
||||
* @param \App\Entity\StationMedia $media
|
||||
* @param \App\Entity\Station|null $station
|
||||
* @param StationMedia $media
|
||||
* @param Station|null $station
|
||||
*
|
||||
* @return \App\Entity\StationPlaylist[] The IDs as keys and records as values for all affected playlists.
|
||||
* @return StationPlaylist[] The IDs as keys and records as values for all affected playlists.
|
||||
*/
|
||||
public function clearPlaylistsFromMedia(
|
||||
StationMedia $media,
|
||||
|
@ -143,7 +143,7 @@ final class StationPlaylistMediaRepository extends Repository
|
|||
* ...
|
||||
* ]
|
||||
*
|
||||
* @param \App\Entity\StationPlaylist $playlist
|
||||
* @param StationPlaylist $playlist
|
||||
* @param array $mapping
|
||||
*/
|
||||
public function setMediaOrder(StationPlaylist $playlist, array $mapping): void
|
||||
|
@ -238,7 +238,7 @@ final class StationPlaylistMediaRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \App\Entity\Api\StationPlaylistQueue[]
|
||||
* @return StationPlaylistQueue[]
|
||||
*/
|
||||
public function getQueue(StationPlaylist $playlist): array
|
||||
{
|
||||
|
|
|
@ -6,14 +6,15 @@ namespace App\Entity\Repository;
|
|||
|
||||
use App\Entity\Enums\PlaylistSources;
|
||||
use App\Entity\Station;
|
||||
use App\Entity\StationPlaylist;
|
||||
|
||||
/**
|
||||
* @extends AbstractStationBasedRepository<\App\Entity\StationPlaylist>
|
||||
* @extends AbstractStationBasedRepository<StationPlaylist>
|
||||
*/
|
||||
final class StationPlaylistRepository extends AbstractStationBasedRepository
|
||||
{
|
||||
/**
|
||||
* @return \App\Entity\StationPlaylist[]
|
||||
* @return StationPlaylist[]
|
||||
*/
|
||||
public function getAllForStation(Station $station): array
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ use Doctrine\ORM\Query;
|
|||
use Doctrine\ORM\QueryBuilder;
|
||||
|
||||
/**
|
||||
* @extends AbstractStationBasedRepository<\App\Entity\StationQueue>
|
||||
* @extends AbstractStationBasedRepository<StationQueue>
|
||||
*/
|
||||
final class StationQueueRepository extends AbstractStationBasedRepository
|
||||
{
|
||||
|
@ -122,8 +122,8 @@ final class StationQueueRepository extends AbstractStationBasedRepository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @return \App\Entity\StationQueue[]
|
||||
* @param Station $station
|
||||
* @return StationQueue[]
|
||||
*/
|
||||
public function getUnplayedQueue(Station $station): array
|
||||
{
|
||||
|
|
|
@ -5,14 +5,15 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Repository;
|
||||
|
||||
use App\Entity\Station;
|
||||
use App\Entity\StationRemote;
|
||||
|
||||
/**
|
||||
* @extends AbstractStationBasedRepository<\App\Entity\StationRemote>
|
||||
* @extends AbstractStationBasedRepository<StationRemote>
|
||||
*/
|
||||
final class StationRemoteRepository extends AbstractStationBasedRepository
|
||||
{
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
* @return mixed[]
|
||||
*/
|
||||
|
@ -23,7 +24,7 @@ final class StationRemoteRepository extends AbstractStationBasedRepository
|
|||
$displayNames = [];
|
||||
|
||||
foreach ($remotes as $remote) {
|
||||
/** @var \App\Entity\StationRemote $remote */
|
||||
/** @var StationRemote $remote */
|
||||
$displayNames[$remote->getId()] = $remote->getDisplayName();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ use Closure;
|
|||
use Psr\Http\Message\UriInterface;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\Station>
|
||||
* @extends Repository<Station>
|
||||
*/
|
||||
final class StationRepository extends Repository
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ final class StationRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @return array<array-key, \App\Entity\Station>
|
||||
* @return array<array-key, Station>
|
||||
*/
|
||||
public function fetchAll(): mixed
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ final class StationRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @return iterable<\App\Entity\Station>
|
||||
* @return iterable<Station>
|
||||
*/
|
||||
public function iterateEnabledStations(): iterable
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ final class StationRepository extends Repository
|
|||
/**
|
||||
* Return the URL to use for songs with no specified album artwork, when artwork is displayed.
|
||||
*
|
||||
* @param \App\Entity\Station|null $station
|
||||
* @param Station|null $station
|
||||
*/
|
||||
public function getDefaultAlbumArtUrl(?Station $station = null): UriInterface
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@ use Carbon\CarbonInterface;
|
|||
use Exception as PhpException;
|
||||
|
||||
/**
|
||||
* @extends AbstractStationBasedRepository<\App\Entity\StationRequest>
|
||||
* @extends AbstractStationBasedRepository<StationRequest>
|
||||
*/
|
||||
final class StationRequestRepository extends AbstractStationBasedRepository
|
||||
{
|
||||
|
@ -130,8 +130,8 @@ final class StationRequestRepository extends AbstractStationBasedRepository
|
|||
/**
|
||||
* Check if the song is already enqueued as a request.
|
||||
*
|
||||
* @param \App\Entity\StationMedia $media
|
||||
* @param \App\Entity\Station $station
|
||||
* @param StationMedia $media
|
||||
* @param Station $station
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
|
@ -184,7 +184,7 @@ final class StationRequestRepository extends AbstractStationBasedRepository
|
|||
->execute();
|
||||
|
||||
foreach ($requests as $request) {
|
||||
/** @var \App\Entity\StationRequest $request */
|
||||
/** @var StationRequest $request */
|
||||
if ($request->shouldPlayNow($now)) {
|
||||
try {
|
||||
$this->checkRecentPlay($request->getTrack(), $station);
|
||||
|
@ -202,8 +202,8 @@ final class StationRequestRepository extends AbstractStationBasedRepository
|
|||
/**
|
||||
* Check the most recent song history.
|
||||
*
|
||||
* @param \App\Entity\StationMedia $media
|
||||
* @param \App\Entity\Station $station
|
||||
* @param StationMedia $media
|
||||
* @param Station $station
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
|
|
|
@ -16,7 +16,7 @@ use Carbon\CarbonImmutable;
|
|||
use Carbon\CarbonInterface;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\StationSchedule>
|
||||
* @extends Repository<StationSchedule>
|
||||
*/
|
||||
final class StationScheduleRepository extends Repository
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ final class StationScheduleRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\StationPlaylist|\App\Entity\StationStreamer $relation
|
||||
* @param StationPlaylist|StationStreamer $relation
|
||||
* @param array $items
|
||||
*/
|
||||
public function setScheduleItems(
|
||||
|
@ -69,9 +69,9 @@ final class StationScheduleRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\StationPlaylist|\App\Entity\StationStreamer $relation
|
||||
* @param StationPlaylist|StationStreamer $relation
|
||||
*
|
||||
* @return \App\Entity\StationSchedule[]
|
||||
* @return StationSchedule[]
|
||||
*/
|
||||
public function findByRelation(StationPlaylist|StationStreamer $relation): array
|
||||
{
|
||||
|
@ -83,9 +83,9 @@ final class StationScheduleRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
* @return \App\Entity\StationSchedule[]
|
||||
* @return StationSchedule[]
|
||||
*/
|
||||
public function getAllScheduledItemsForStation(Station $station): array
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ final class StationScheduleRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
* @param CarbonInterface|null $now
|
||||
*
|
||||
* @return \App\Entity\Api\StationSchedule[]
|
||||
|
@ -120,7 +120,7 @@ final class StationScheduleRepository extends Repository
|
|||
$events = [];
|
||||
|
||||
foreach ($this->getAllScheduledItemsForStation($station) as $scheduleItem) {
|
||||
/** @var \App\Entity\StationSchedule $scheduleItem */
|
||||
/** @var StationSchedule $scheduleItem */
|
||||
$i = $startDate;
|
||||
|
||||
while ($i <= $endDate) {
|
||||
|
|
|
@ -11,7 +11,7 @@ use App\Entity\StationStreamerBroadcast;
|
|||
use Carbon\CarbonImmutable;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\StationStreamerBroadcast>
|
||||
* @extends Repository<StationStreamerBroadcast>
|
||||
*/
|
||||
final class StationStreamerBroadcastRepository extends Repository
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ final class StationStreamerBroadcastRepository extends Repository
|
|||
return null;
|
||||
}
|
||||
|
||||
/** @var \App\Entity\StationStreamerBroadcast|null $latestBroadcast */
|
||||
/** @var StationStreamerBroadcast|null $latestBroadcast */
|
||||
$latestBroadcast = $this->em->createQuery(
|
||||
<<<'DQL'
|
||||
SELECT ssb
|
||||
|
@ -53,9 +53,9 @@ final class StationStreamerBroadcastRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
* @return \App\Entity\StationStreamerBroadcast[]
|
||||
* @return StationStreamerBroadcast[]
|
||||
*/
|
||||
public function getActiveBroadcasts(Station $station): array
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@ use App\Media\AlbumArt;
|
|||
use App\Radio\AutoDJ\Scheduler;
|
||||
|
||||
/**
|
||||
* @extends AbstractStationBasedRepository<\App\Entity\StationStreamer>
|
||||
* @extends AbstractStationBasedRepository<StationStreamer>
|
||||
*/
|
||||
final class StationStreamerRepository extends AbstractStationBasedRepository
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ final class StationStreamerRepository extends AbstractStationBasedRepository
|
|||
/**
|
||||
* Attempt to authenticate a streamer.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
*/
|
||||
|
@ -51,7 +51,7 @@ final class StationStreamerRepository extends AbstractStationBasedRepository
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
* @param string $username
|
||||
*
|
||||
*/
|
||||
|
@ -105,7 +105,7 @@ final class StationStreamerRepository extends AbstractStationBasedRepository
|
|||
$criteria['is_active'] = 1;
|
||||
}
|
||||
|
||||
/** @var \App\Entity\StationStreamer|null $streamer */
|
||||
/** @var StationStreamer|null $streamer */
|
||||
$streamer = $this->repository->findOneBy($criteria);
|
||||
|
||||
return $streamer;
|
||||
|
|
|
@ -10,7 +10,7 @@ use App\Entity\UnprocessableMedia;
|
|||
use Generator;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\UnprocessableMedia>
|
||||
* @extends Repository<UnprocessableMedia>
|
||||
*/
|
||||
final class UnprocessableMediaRepository extends Repository
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ final class UnprocessableMediaRepository extends Repository
|
|||
string $path,
|
||||
StorageLocation $storageLocation
|
||||
): ?UnprocessableMedia {
|
||||
/** @var \App\Entity\UnprocessableMedia|null $record */
|
||||
/** @var UnprocessableMedia|null $record */
|
||||
$record = $this->repository->findOneBy(
|
||||
[
|
||||
'storage_location' => $storageLocation,
|
||||
|
|
|
@ -9,7 +9,7 @@ use App\Entity\UserLoginToken;
|
|||
use App\Security\SplitToken;
|
||||
|
||||
/**
|
||||
* @extends AbstractSplitTokenRepository<\App\Entity\UserLoginToken>
|
||||
* @extends AbstractSplitTokenRepository<UserLoginToken>
|
||||
*/
|
||||
final class UserLoginTokenRepository extends AbstractSplitTokenRepository
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ use App\Doctrine\Repository;
|
|||
use App\Entity\User;
|
||||
|
||||
/**
|
||||
* @extends Repository<\App\Entity\User>
|
||||
* @extends Repository<User>
|
||||
*/
|
||||
final class UserRepository extends Repository
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@ use Symfony\Contracts\EventDispatcher\Event;
|
|||
|
||||
final class BuildQueue extends Event
|
||||
{
|
||||
/** @var \App\Entity\StationQueue[] */
|
||||
/** @var StationQueue[] */
|
||||
private array $nextSongs = [];
|
||||
|
||||
private CarbonInterface $expectedCueTime;
|
||||
|
@ -56,7 +56,7 @@ final class BuildQueue extends Event
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \App\Entity\StationQueue[]
|
||||
* @return StationQueue[]
|
||||
*/
|
||||
public function getNextSongs(): array
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ final class BuildQueue extends Event
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\StationQueue|\App\Entity\StationQueue[]|null $nextSongs
|
||||
* @param StationQueue|StationQueue[]|null $nextSongs
|
||||
* @return bool
|
||||
*/
|
||||
public function setNextSongs(StationQueue|array|null $nextSongs): bool
|
||||
|
|
|
@ -44,7 +44,7 @@ final class AwsS3Adapter extends AwsS3V3Adapter implements ExtendedAdapterInterf
|
|||
throw UnableToRetrieveMetadata::create($path, 'metadata', '', $exception);
|
||||
}
|
||||
|
||||
if (substr($path, -1) === '/') {
|
||||
if (str_ends_with($path, '/')) {
|
||||
return new DirectoryAttributes(rtrim($path, '/'));
|
||||
}
|
||||
|
||||
|
|
|
@ -38,11 +38,9 @@ abstract class AbstractAttributes implements StorageAttributes
|
|||
|
||||
public function visibility(): ?string
|
||||
{
|
||||
$visibility = (is_callable($this->visibility))
|
||||
return (is_callable($this->visibility))
|
||||
? ($this->visibility)($this->path)
|
||||
: $this->visibility;
|
||||
|
||||
return $visibility;
|
||||
}
|
||||
|
||||
public function lastModified(): ?int
|
||||
|
|
|
@ -41,7 +41,7 @@ abstract class AbstractEnvFile implements ArrayAccess
|
|||
$defaults = [];
|
||||
foreach (static::getConfiguration($environment) as $key => $keyInfo) {
|
||||
if (isset($keyInfo['default'])) {
|
||||
$defaults[$key] = $keyInfo['default'] ?? null;
|
||||
$defaults[$key] = $keyInfo['default'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,13 @@ namespace App\Media;
|
|||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Doctrine\ReadWriteBatchIteratorAggregate;
|
||||
use App\Entity\Interfaces\PathAwareInterface;
|
||||
use App\Entity\Repository\StationMediaRepository;
|
||||
use App\Entity\Repository\StorageLocationRepository;
|
||||
use App\Entity\Repository\UnprocessableMediaRepository;
|
||||
use App\Entity\StationMedia;
|
||||
use App\Entity\StationPlaylist;
|
||||
use App\Entity\StationPlaylistFolder;
|
||||
use App\Entity\StorageLocation;
|
||||
use App\Entity\UnprocessableMedia;
|
||||
use App\Flysystem\ExtendedFilesystemInterface;
|
||||
|
@ -45,7 +48,7 @@ final class BatchUtilities
|
|||
|
||||
foreach ($toRename as $iterator) {
|
||||
foreach ($iterator as $record) {
|
||||
/** @var \App\Entity\Interfaces\PathAwareInterface $record */
|
||||
/** @var PathAwareInterface $record */
|
||||
$record->setPath(
|
||||
File::renameDirectoryInPath($record->getPath(), $from, $to)
|
||||
);
|
||||
|
@ -74,10 +77,10 @@ final class BatchUtilities
|
|||
/**
|
||||
* @param array $files
|
||||
* @param array $directories
|
||||
* @param \App\Entity\StorageLocation $storageLocation
|
||||
* @param StorageLocation $storageLocation
|
||||
* @param ExtendedFilesystemInterface|null $fs
|
||||
*
|
||||
* @return \App\Entity\StationPlaylist[] Affected playlists
|
||||
* @return StationPlaylist[] Affected playlists
|
||||
*/
|
||||
public function handleDelete(
|
||||
array $files,
|
||||
|
@ -125,10 +128,10 @@ final class BatchUtilities
|
|||
*
|
||||
* @note This function flushes the entity manager.
|
||||
*
|
||||
* @param \App\Entity\StorageLocation $storageLocation
|
||||
* @param StorageLocation $storageLocation
|
||||
* @param array $paths
|
||||
*
|
||||
* @return iterable|\App\Entity\StationMedia[]
|
||||
* @return iterable|StationMedia[]
|
||||
*/
|
||||
public function iterateMedia(StorageLocation $storageLocation, array $paths): iterable
|
||||
{
|
||||
|
@ -140,10 +143,10 @@ final class BatchUtilities
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\StorageLocation $storageLocation
|
||||
* @param StorageLocation $storageLocation
|
||||
* @param string $dir
|
||||
*
|
||||
* @return iterable|\App\Entity\StationMedia[]
|
||||
* @return iterable|StationMedia[]
|
||||
*/
|
||||
public function iterateMediaInDirectory(StorageLocation $storageLocation, string $dir): iterable
|
||||
{
|
||||
|
@ -165,10 +168,10 @@ final class BatchUtilities
|
|||
*
|
||||
* @note This function flushes the entity manager.
|
||||
*
|
||||
* @param \App\Entity\StorageLocation $storageLocation
|
||||
* @param StorageLocation $storageLocation
|
||||
* @param array $paths
|
||||
*
|
||||
* @return iterable|\App\Entity\UnprocessableMedia[]
|
||||
* @return iterable|UnprocessableMedia[]
|
||||
*/
|
||||
public function iterateUnprocessableMedia(StorageLocation $storageLocation, array $paths): iterable
|
||||
{
|
||||
|
@ -180,10 +183,10 @@ final class BatchUtilities
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\StorageLocation $storageLocation
|
||||
* @param StorageLocation $storageLocation
|
||||
* @param string $dir
|
||||
*
|
||||
* @return iterable|\App\Entity\UnprocessableMedia[]
|
||||
* @return iterable|UnprocessableMedia[]
|
||||
*/
|
||||
public function iterateUnprocessableMediaInDirectory(
|
||||
StorageLocation $storageLocation,
|
||||
|
@ -203,10 +206,10 @@ final class BatchUtilities
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\StorageLocation $storageLocation
|
||||
* @param StorageLocation $storageLocation
|
||||
* @param string $dir
|
||||
*
|
||||
* @return iterable|\App\Entity\StationPlaylistFolder[]
|
||||
* @return iterable|StationPlaylistFolder[]
|
||||
*/
|
||||
public function iteratePlaylistFoldersInDirectory(
|
||||
StorageLocation $storageLocation,
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\MessageQueue;
|
||||
|
||||
use Symfony\Component\Messenger\Transport\InMemoryTransport;
|
||||
use Symfony\Component\Messenger\Transport\InMemory\InMemoryTransport;
|
||||
use Symfony\Component\Messenger\Transport\TransportInterface;
|
||||
|
||||
final class TestQueueManager extends AbstractQueueManager
|
||||
|
|
|
@ -5,12 +5,14 @@ namespace App\Normalizer;
|
|||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Normalizer\Attributes\DeepNormalize;
|
||||
use App\Normalizer\Exception\NoGetterAvailableException;
|
||||
use ArrayObject;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Util\ClassUtils;
|
||||
use Doctrine\Inflector\Inflector;
|
||||
use Doctrine\Inflector\InflectorFactory;
|
||||
use InvalidArgumentException;
|
||||
use ReflectionClass;
|
||||
use ReflectionException;
|
||||
use ReflectionProperty;
|
||||
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
@ -41,7 +43,7 @@ final class DoctrineEntityNormalizer extends AbstractObjectNormalizer
|
|||
/**
|
||||
* Replicates the "toArray" functionality previously present in Doctrine 1.
|
||||
*
|
||||
* @return array|string|int|float|bool|\ArrayObject<int, mixed>|null
|
||||
* @return array|string|int|float|bool|ArrayObject<int, mixed>|null
|
||||
*/
|
||||
public function normalize(mixed $object, ?string $format = null, array $context = []): mixed
|
||||
{
|
||||
|
@ -163,7 +165,7 @@ final class DoctrineEntityNormalizer extends AbstractObjectNormalizer
|
|||
* @param string|null $format
|
||||
* @param array $context
|
||||
* @return bool
|
||||
* @throws \ReflectionException
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
protected function isAllowedAttribute(
|
||||
object|string $classOrObject,
|
||||
|
@ -235,7 +237,7 @@ final class DoctrineEntityNormalizer extends AbstractObjectNormalizer
|
|||
* @param ReflectionClass<object> $reflectionClass
|
||||
* @param string $attribute
|
||||
* @return bool
|
||||
* @throws \ReflectionException
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
private function supportsDeepNormalization(ReflectionClass $reflectionClass, string $attribute): bool
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ abstract class AbstractLocalAdapter
|
|||
/**
|
||||
* Write configuration from Station object to the external service.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
* @return bool Whether the newly written configuration differs from what was already on disk.
|
||||
*/
|
||||
|
@ -58,7 +58,7 @@ abstract class AbstractLocalAdapter
|
|||
/**
|
||||
* Generate the configuration for this adapter as it would exist with current database settings.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
*/
|
||||
public function getCurrentConfiguration(Station $station): ?string
|
||||
|
@ -96,7 +96,7 @@ abstract class AbstractLocalAdapter
|
|||
/**
|
||||
* Check if the service is running.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*/
|
||||
public function isRunning(Station $station): bool
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ abstract class AbstractLocalAdapter
|
|||
/**
|
||||
* Return a boolean indicating whether the adapter has an executable command associated with it.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*/
|
||||
public function hasCommand(Station $station): bool
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ abstract class AbstractLocalAdapter
|
|||
/**
|
||||
* Return the shell command required to run the program.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*/
|
||||
public function getCommand(Station $station): ?string
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ abstract class AbstractLocalAdapter
|
|||
/**
|
||||
* Return the program's fully qualified supervisord name.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*/
|
||||
abstract public function getSupervisorProgramName(Station $station): string;
|
||||
|
||||
|
@ -156,7 +156,7 @@ abstract class AbstractLocalAdapter
|
|||
/**
|
||||
* Restart the executable service.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*/
|
||||
public function restart(Station $station): void
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ abstract class AbstractLocalAdapter
|
|||
/**
|
||||
* Execute a non-destructive reload if the adapter supports it.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*/
|
||||
public function reload(Station $station): void
|
||||
{
|
||||
|
@ -177,7 +177,7 @@ abstract class AbstractLocalAdapter
|
|||
/**
|
||||
* Stop the executable service.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
* @throws SupervisorException
|
||||
* @throws NotRunningException
|
||||
|
@ -202,7 +202,7 @@ abstract class AbstractLocalAdapter
|
|||
/**
|
||||
* Start the executable service.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
* @throws SupervisorException
|
||||
* @throws AlreadyRunningException
|
||||
|
@ -229,7 +229,7 @@ abstract class AbstractLocalAdapter
|
|||
*
|
||||
* @param SupervisorLibException $e
|
||||
* @param string $program_name
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
* @throws SupervisorException
|
||||
*/
|
||||
|
@ -248,7 +248,7 @@ abstract class AbstractLocalAdapter
|
|||
/**
|
||||
* Return the path where logs are written to.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*/
|
||||
public function getLogPath(Station $station): string
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ final class DuplicatePrevention
|
|||
];
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Api\StationPlaylistQueue[] $eligibleTracks
|
||||
* @param StationPlaylistQueue[] $eligibleTracks
|
||||
* @param array $playedTracks
|
||||
* @param bool $allowDuplicates Whether to return a media ID even if duplicates can't be prevented.
|
||||
*/
|
||||
|
@ -47,7 +47,7 @@ final class DuplicatePrevention
|
|||
}
|
||||
}
|
||||
|
||||
/** @var \App\Entity\Api\StationPlaylistQueue[] $notPlayedEligibleTracks */
|
||||
/** @var StationPlaylistQueue[] $notPlayedEligibleTracks */
|
||||
$notPlayedEligibleTracks = [];
|
||||
|
||||
foreach ($eligibleTracks as $mediaId => $track) {
|
||||
|
@ -75,7 +75,7 @@ final class DuplicatePrevention
|
|||
|
||||
// If we reach this point, there's no way to avoid a duplicate title and artist.
|
||||
if ($allowDuplicates) {
|
||||
/** @var \App\Entity\Api\StationPlaylistQueue[] $mediaIdsByTimePlayed */
|
||||
/** @var StationPlaylistQueue[] $mediaIdsByTimePlayed */
|
||||
$mediaIdsByTimePlayed = [];
|
||||
|
||||
// For each piece of eligible media, get its latest played timestamp.
|
||||
|
@ -114,7 +114,7 @@ final class DuplicatePrevention
|
|||
* Both should be in the form of an array, i.e.:
|
||||
* [ 'id' => ['artist' => 'Foo', 'title' => 'Fighters'] ]
|
||||
*
|
||||
* @param \App\Entity\Api\StationPlaylistQueue[] $eligibleTracks
|
||||
* @param StationPlaylistQueue[] $eligibleTracks
|
||||
* @param array $playedTracks
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -167,8 +167,8 @@ final class Queue
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @return \App\Entity\StationQueue[]|null
|
||||
* @param Station $station
|
||||
* @return StationQueue[]|null
|
||||
*/
|
||||
public function getInterruptingQueue(Station $station): ?array
|
||||
{
|
||||
|
|
|
@ -70,7 +70,7 @@ final class QueueBuilder implements EventSubscriberInterface
|
|||
|
||||
$activePlaylistsByType = [];
|
||||
foreach ($station->getPlaylists() as $playlist) {
|
||||
/** @var \App\Entity\StationPlaylist $playlist */
|
||||
/** @var StationPlaylist $playlist */
|
||||
if ($playlist->isPlayable($event->isInterrupting())) {
|
||||
$type = $playlist->getType()->value;
|
||||
|
||||
|
@ -117,7 +117,7 @@ final class QueueBuilder implements EventSubscriberInterface
|
|||
$eligiblePlaylists = [];
|
||||
$logPlaylists = [];
|
||||
foreach ($activePlaylistsByType[$currentPlaylistType] as $playlistId => $playlist) {
|
||||
/** @var \App\Entity\StationPlaylist $playlist */
|
||||
/** @var StationPlaylist $playlist */
|
||||
if (!$this->scheduler->shouldPlaylistPlayNow($playlist, $expectedPlayTime)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -213,11 +213,11 @@ final class QueueBuilder implements EventSubscriberInterface
|
|||
/**
|
||||
* Given a specified (sequential or shuffled) playlist, choose a song from the playlist to play and return it.
|
||||
*
|
||||
* @param \App\Entity\StationPlaylist $playlist
|
||||
* @param StationPlaylist $playlist
|
||||
* @param array $recentSongHistory
|
||||
* @param CarbonInterface $expectedPlayTime
|
||||
* @param bool $allowDuplicates Whether to return a media ID even if duplicates can't be prevented.
|
||||
* @return \App\Entity\StationQueue|\App\Entity\StationQueue[]|null
|
||||
* @return StationQueue|StationQueue[]|null
|
||||
*/
|
||||
private function playSongFromPlaylist(
|
||||
StationPlaylist $playlist,
|
||||
|
@ -435,7 +435,7 @@ final class QueueBuilder implements EventSubscriberInterface
|
|||
$this->spmRepo->resetQueue($playlist);
|
||||
$mediaQueue = $this->spmRepo->getQueue($playlist);
|
||||
|
||||
return $this->duplicatePrevention->preventDuplicates($mediaQueue, $recentSongHistory, $allowDuplicates);
|
||||
return $this->duplicatePrevention->preventDuplicates($mediaQueue, $recentSongHistory, false);
|
||||
}
|
||||
|
||||
public function getNextSongFromRequests(BuildQueue $event): void
|
||||
|
|
|
@ -161,7 +161,7 @@ final class Scheduler
|
|||
/**
|
||||
* Get the duration of scheduled play time in seconds (used for remote URLs of indeterminate length).
|
||||
*
|
||||
* @param \App\Entity\StationPlaylist $playlist
|
||||
* @param StationPlaylist $playlist
|
||||
*/
|
||||
public function getPlaylistScheduleDuration(StationPlaylist $playlist): int
|
||||
{
|
||||
|
@ -198,9 +198,9 @@ final class Scheduler
|
|||
}
|
||||
|
||||
/**
|
||||
* @param Collection<int, \App\Entity\StationSchedule> $scheduleItems
|
||||
* @param Collection<int, StationSchedule> $scheduleItems
|
||||
* @param CarbonInterface $now
|
||||
* @return \App\Entity\StationSchedule|null
|
||||
* @return StationSchedule|null
|
||||
*/
|
||||
private function getActiveScheduleFromCollection(
|
||||
Collection $scheduleItems,
|
||||
|
@ -431,7 +431,7 @@ final class Scheduler
|
|||
/**
|
||||
* Given an ISO-8601 date, return if the playlist can be played on that day.
|
||||
*
|
||||
* @param \App\Entity\StationSchedule $schedule
|
||||
* @param StationSchedule $schedule
|
||||
* @param int $dayToCheck ISO-8601 date (1 for Monday, 7 for Sunday)
|
||||
*/
|
||||
public function isScheduleScheduledToPlayToday(
|
||||
|
|
|
@ -41,7 +41,7 @@ final class Liquidsoap extends AbstractLocalAdapter
|
|||
/**
|
||||
* Returns the port used for DJs/Streamers to connect to LiquidSoap for broadcasting.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
* @return int The port number to use for this station.
|
||||
*/
|
||||
|
@ -62,7 +62,7 @@ final class Liquidsoap extends AbstractLocalAdapter
|
|||
/**
|
||||
* Execute the specified remote command on LiquidSoap via the telnet API.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
* @param string $command_str
|
||||
*
|
||||
* @return string[]
|
||||
|
@ -199,7 +199,7 @@ final class Liquidsoap extends AbstractLocalAdapter
|
|||
/**
|
||||
* Tell LiquidSoap to disconnect the current live streamer.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
|
|
|
@ -14,7 +14,9 @@ use App\Entity\Enums\StationBackendPerformanceModes;
|
|||
use App\Entity\Interfaces\StationMountInterface;
|
||||
use App\Entity\Station;
|
||||
use App\Entity\StationBackendConfiguration;
|
||||
use App\Entity\StationMount;
|
||||
use App\Entity\StationPlaylist;
|
||||
use App\Entity\StationRemote;
|
||||
use App\Entity\StationSchedule;
|
||||
use App\Entity\StationStreamerBroadcast;
|
||||
use App\Event\Radio\WriteLiquidsoapConfiguration;
|
||||
|
@ -713,7 +715,7 @@ final class ConfigWriter implements EventSubscriberInterface
|
|||
* Given a scheduled playlist, return the time criteria that Liquidsoap can use to determine when to play it.
|
||||
*
|
||||
* @param WriteLiquidsoapConfiguration $event
|
||||
* @param \App\Entity\StationSchedule $playlistSchedule
|
||||
* @param StationSchedule $playlistSchedule
|
||||
* @return string
|
||||
*/
|
||||
private function getScheduledPlaylistPlayTime(
|
||||
|
@ -1151,7 +1153,7 @@ final class ConfigWriter implements EventSubscriberInterface
|
|||
foreach ($station->getMounts() as $mount_row) {
|
||||
$i++;
|
||||
|
||||
/** @var \App\Entity\StationMount $mount_row */
|
||||
/** @var StationMount $mount_row */
|
||||
if (!$mount_row->getEnableAutodj()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1362,7 +1364,7 @@ final class ConfigWriter implements EventSubscriberInterface
|
|||
foreach ($station->getRemotes() as $remote_row) {
|
||||
$i++;
|
||||
|
||||
/** @var \App\Entity\StationRemote $remote_row */
|
||||
/** @var StationRemote $remote_row */
|
||||
if (!$remote_row->getEnableAutodj()) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace App\Radio\Backend\Liquidsoap;
|
|||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Entity\Station;
|
||||
use App\Entity\StationMedia;
|
||||
use App\Entity\StationPlaylist;
|
||||
use App\Event\Radio\AnnotateNextSong;
|
||||
use App\Event\Radio\WriteLiquidsoapConfiguration;
|
||||
|
@ -127,7 +128,7 @@ final class PlaylistFileWriter implements EventSubscriberInterface
|
|||
DQL
|
||||
)->setParameter('playlist', $playlist);
|
||||
|
||||
/** @var \App\Entity\StationMedia $mediaFile */
|
||||
/** @var StationMedia $mediaFile */
|
||||
foreach ($mediaQuery->toIterable() as $mediaFile) {
|
||||
$event = new AnnotateNextSong(
|
||||
station: $station,
|
||||
|
|
|
@ -48,7 +48,7 @@ abstract class AbstractFrontend extends AbstractLocalAdapter
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
* @param UriInterface|null $base_url
|
||||
*/
|
||||
public function getStreamUrl(Station $station, UriInterface $base_url = null): UriInterface
|
||||
|
@ -100,7 +100,7 @@ abstract class AbstractFrontend extends AbstractLocalAdapter
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Station $station
|
||||
* @param Station $station
|
||||
* @param UriInterface|null $base_url
|
||||
*
|
||||
* @return UriInterface[]
|
||||
|
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace App\Radio\Frontend;
|
||||
|
||||
use App\Entity\Station;
|
||||
use App\Entity\StationMount;
|
||||
use App\Radio\Enums\StreamFormats;
|
||||
use App\Service\Acme;
|
||||
use App\Utilities;
|
||||
|
@ -179,7 +180,7 @@ final class Icecast extends AbstractFrontend
|
|||
$useListenerAuth = !empty($bannedCountries) || !empty($allowedIps);
|
||||
|
||||
foreach ($station->getMounts() as $mount_row) {
|
||||
/** @var \App\Entity\StationMount $mount_row */
|
||||
/** @var StationMount $mount_row */
|
||||
|
||||
$mount = [
|
||||
'@type' => 'normal',
|
||||
|
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace App\Radio\Frontend;
|
||||
|
||||
use App\Entity\Station;
|
||||
use App\Entity\StationMount;
|
||||
use App\Service\Acme;
|
||||
use GuzzleHttp\Promise\Utils;
|
||||
use NowPlaying\Result\Result;
|
||||
|
@ -155,7 +156,7 @@ final class Shoutcast extends AbstractFrontend
|
|||
|
||||
$i = 0;
|
||||
foreach ($station->getMounts() as $mount_row) {
|
||||
/** @var \App\Entity\StationMount $mount_row */
|
||||
/** @var StationMount $mount_row */
|
||||
$i++;
|
||||
$config['streamid_' . $i] = $i;
|
||||
$config['streampath_' . $i] = $mount_row->getName();
|
||||
|
|
|
@ -61,7 +61,7 @@ abstract class AbstractRemote
|
|||
/**
|
||||
* Return the likely "public" listen URL for the remote.
|
||||
*
|
||||
* @param \App\Entity\StationRemote $remote
|
||||
* @param StationRemote $remote
|
||||
*/
|
||||
public function getPublicUrl(StationRemote $remote): string
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ abstract class AbstractRemote
|
|||
/**
|
||||
* Format and return a URL for the remote path.
|
||||
*
|
||||
* @param \App\Entity\StationRemote $remote
|
||||
* @param StationRemote $remote
|
||||
* @param string|null $customPath
|
||||
*/
|
||||
protected function getRemoteUrl(StationRemote $remote, ?string $customPath = null): string
|
||||
|
|
|
@ -8,6 +8,8 @@ use App\Container\EntityManagerAwareTrait;
|
|||
use App\Container\LoggerAwareTrait;
|
||||
use App\Doctrine\ReadWriteBatchIteratorAggregate;
|
||||
use App\Entity\Enums\StorageLocationTypes;
|
||||
use App\Entity\Station;
|
||||
use App\Entity\StorageLocation;
|
||||
|
||||
abstract class AbstractTask implements ScheduledTaskInterface
|
||||
{
|
||||
|
@ -22,7 +24,7 @@ abstract class AbstractTask implements ScheduledTaskInterface
|
|||
abstract public function run(bool $force = false): void;
|
||||
|
||||
/**
|
||||
* @return ReadWriteBatchIteratorAggregate<int, \App\Entity\Station>
|
||||
* @return ReadWriteBatchIteratorAggregate<int, Station>
|
||||
*/
|
||||
protected function iterateStations(): ReadWriteBatchIteratorAggregate
|
||||
{
|
||||
|
@ -37,9 +39,9 @@ abstract class AbstractTask implements ScheduledTaskInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\Enums\StorageLocationTypes $type
|
||||
* @param StorageLocationTypes $type
|
||||
*
|
||||
* @return ReadWriteBatchIteratorAggregate<int, \App\Entity\StorageLocation>
|
||||
* @return ReadWriteBatchIteratorAggregate<int, StorageLocation>
|
||||
*/
|
||||
protected function iterateStorageLocations(StorageLocationTypes $type): ReadWriteBatchIteratorAggregate
|
||||
{
|
||||
|
|
|
@ -49,13 +49,13 @@ final class CheckRequestsTask extends AbstractTask
|
|||
}
|
||||
}
|
||||
|
||||
private function submitRequest(Station $station, StationRequest $request): bool
|
||||
private function submitRequest(Station $station, StationRequest $request): void
|
||||
{
|
||||
// Send request to the station to play the request.
|
||||
$backend = $this->adapters->getBackendAdapter($station);
|
||||
|
||||
if (!($backend instanceof Liquidsoap)) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for an existing SongHistory record and skip if one exists.
|
||||
|
@ -87,7 +87,7 @@ final class CheckRequestsTask extends AbstractTask
|
|||
|
||||
if (!$backend->isQueueEmpty($station, $queue)) {
|
||||
$this->logger->error('Skipping submitting request to Liquidsoap; current queue is occupied.');
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
$this->logger->debug('Submitting request to AutoDJ.', ['track' => $track]);
|
||||
|
@ -100,7 +100,5 @@ final class CheckRequestsTask extends AbstractTask
|
|||
|
||||
$this->em->persist($request);
|
||||
$this->em->flush();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ final class CleanupStorageTask extends AbstractTask
|
|||
{
|
||||
foreach ($this->iterateStations() as $station) {
|
||||
try {
|
||||
/** @var \App\Entity\Station $station */
|
||||
/** @var Station $station */
|
||||
$this->cleanStationTempFiles($station);
|
||||
} catch (Throwable $e) {
|
||||
$this->logger->error($e->getMessage(), [
|
||||
|
@ -42,7 +42,7 @@ final class CleanupStorageTask extends AbstractTask
|
|||
$storageLocations = $this->iterateStorageLocations(StorageLocationTypes::StationMedia);
|
||||
foreach ($storageLocations as $storageLocation) {
|
||||
try {
|
||||
/** @var \App\Entity\StorageLocation $storageLocation */
|
||||
/** @var StorageLocation $storageLocation */
|
||||
$this->cleanMediaStorageLocation($storageLocation);
|
||||
} catch (Throwable $e) {
|
||||
$this->logger->error($e->getMessage(), [
|
||||
|
|
|
@ -33,7 +33,7 @@ final class MoveBroadcastsTask extends AbstractTask
|
|||
) as $storageLocation
|
||||
) {
|
||||
try {
|
||||
/** @var \App\Entity\StorageLocation $storageLocation */
|
||||
/** @var StorageLocation $storageLocation */
|
||||
$this->processForStorageLocation($storageLocation);
|
||||
} catch (Throwable $e) {
|
||||
$this->logger->error($e->getMessage(), [
|
||||
|
|
|
@ -59,10 +59,10 @@ final class RunAnalyticsTask extends AbstractTask
|
|||
$stationsRaw = $this->em->getRepository(Station::class)
|
||||
->findAll();
|
||||
|
||||
/** @var \App\Entity\Station[] $stations */
|
||||
/** @var Station[] $stations */
|
||||
$stations = [];
|
||||
foreach ($stationsRaw as $station) {
|
||||
/** @var \App\Entity\Station $station */
|
||||
/** @var Station $station */
|
||||
$stations[$station->getId()] = $station;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ final class RunAnalyticsTask extends AbstractTask
|
|||
|
||||
/**
|
||||
* @param CarbonImmutable $day
|
||||
* @param \App\Entity\Station[] $stations
|
||||
* @param Station[] $stations
|
||||
* @param bool $withListeners
|
||||
*/
|
||||
private function processDay(
|
||||
|
|
|
@ -43,7 +43,7 @@ final class UpdateStorageLocationSizesTask extends AbstractTask
|
|||
);
|
||||
|
||||
foreach ($iterator as $storageLocation) {
|
||||
/** @var \App\Entity\StorageLocation $storageLocation */
|
||||
/** @var StorageLocation $storageLocation */
|
||||
$this->updateStorageLocationSize($storageLocation);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ use LogicException;
|
|||
/**
|
||||
* A global section container for templates.
|
||||
*
|
||||
* @implements \ArrayAccess<string, string>
|
||||
* @implements ArrayAccess<string, string>
|
||||
*/
|
||||
final class GlobalSections implements ArrayAccess
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ abstract class AbstractConnector implements ConnectorInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \App\Entity\StationWebhook $webhook
|
||||
* @param StationWebhook $webhook
|
||||
* @param array<string> $triggers
|
||||
*
|
||||
*/
|
||||
|
@ -82,7 +82,7 @@ abstract class AbstractConnector implements ConnectorInterface
|
|||
* Replace variables in the format {{ blah }} with the flattened contents of the NowPlaying API array.
|
||||
*
|
||||
* @param array $raw_vars
|
||||
* @param \App\Entity\Api\NowPlaying\NowPlaying $np
|
||||
* @param NowPlaying $np
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
|
|
@ -14,7 +14,7 @@ interface ConnectorInterface
|
|||
* Return a boolean indicating whether this connector should dispatch, given the current events
|
||||
* that are set to be triggered, and the configured triggers for this connector.
|
||||
*
|
||||
* @param \App\Entity\StationWebhook $webhook
|
||||
* @param StationWebhook $webhook
|
||||
* @param array<string> $triggers
|
||||
*
|
||||
* @return bool Whether the given webhook should dispatch with these triggers.
|
||||
|
@ -27,9 +27,9 @@ interface ConnectorInterface
|
|||
/**
|
||||
* Trigger the webhook for the specified station, now playing entry, and specified configuration.
|
||||
*
|
||||
* @param \App\Entity\Station $station
|
||||
* @param \App\Entity\StationWebhook $webhook
|
||||
* @param \App\Entity\Api\NowPlaying\NowPlaying $np
|
||||
* @param Station $station
|
||||
* @param StationWebhook $webhook
|
||||
* @param NowPlaying $np
|
||||
* @param array<string> $triggers
|
||||
*/
|
||||
public function dispatch(
|
||||
|
|
Loading…
Reference in New Issue