Minor code cleanup and reformatting.
This commit is contained in:
parent
16ce83be51
commit
12e7952c76
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
namespace App\Console\Command\Internal;
|
||||
|
||||
use App\Console\Command\CommandAbstract;
|
||||
use App\Entity;
|
||||
use App\Service\AzuraCastCentral;
|
||||
use App\Console\Command\CommandAbstract;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
|
||||
class GetIpCommand extends CommandAbstract
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
namespace App\Controller\Admin;
|
||||
|
||||
use App\Config;
|
||||
use App\Form\Form;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Radio\Frontend\SHOUTcast;
|
||||
use App\Settings;
|
||||
use App\Config;
|
||||
use Exception;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\UploadedFileInterface;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
namespace App\Controller\Stations;
|
||||
|
||||
use App\Exception;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Exception;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
class PlaylistsController
|
||||
|
|
|
@ -18,7 +18,7 @@ class DeferredCallable
|
|||
* @var callable|string
|
||||
*/
|
||||
protected $callable;
|
||||
|
||||
|
||||
protected ?CallableResolverInterface $callableResolver;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<?php
|
||||
namespace App\Doctrine;
|
||||
|
||||
use App\Http\RequestHelper;
|
||||
use App\Http\Response;
|
||||
use App\Http\ResponseHelper;
|
||||
use App\Http\Router;
|
||||
use App\Http\ServerRequest;
|
||||
use Doctrine\ORM\Query;
|
||||
|
|
|
@ -28,7 +28,7 @@ class NowPlayingListeners
|
|||
* @var int
|
||||
*/
|
||||
public int $total = 0;
|
||||
|
||||
|
||||
public function __construct(?array $listeners = [])
|
||||
{
|
||||
if (isset($listeners['current'])) {
|
||||
|
|
|
@ -13,7 +13,7 @@ class StationServiceStatus
|
|||
* @var bool
|
||||
*/
|
||||
public bool $backend_running;
|
||||
|
||||
|
||||
/**
|
||||
* @OA\Property(example=true)
|
||||
* @var bool
|
||||
|
|
|
@ -103,7 +103,7 @@ class CustomField
|
|||
{
|
||||
return !empty($this->auto_assign);
|
||||
}
|
||||
|
||||
|
||||
public function setAutoAssign(?string $auto_assign): void
|
||||
{
|
||||
$this->auto_assign = $auto_assign;
|
||||
|
|
|
@ -159,7 +159,7 @@ class Relay
|
|||
{
|
||||
$this->updated_at = $updated_at;
|
||||
}
|
||||
|
||||
|
||||
public function getRemotes(): Collection
|
||||
{
|
||||
return $this->remotes;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
namespace App\Entity\Repository;
|
||||
|
||||
use App\Entity;
|
||||
use App\Doctrine\Repository;
|
||||
use App\Entity;
|
||||
|
||||
class CustomFieldRepository extends Repository
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
namespace App\Entity\Repository;
|
||||
|
||||
use App\Entity;
|
||||
use App\Doctrine\Repository;
|
||||
use App\Entity;
|
||||
|
||||
class RolePermissionRepository extends Repository
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
namespace App\Entity\Repository;
|
||||
|
||||
use App\Entity;
|
||||
use App\Doctrine\Repository;
|
||||
use App\Entity;
|
||||
|
||||
class StationMountRepository extends Repository
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
namespace App\Entity\Repository;
|
||||
|
||||
use App\Entity;
|
||||
use App\Doctrine\Repository;
|
||||
use App\Entity;
|
||||
|
||||
class UserRepository extends Repository
|
||||
{
|
||||
|
|
|
@ -4,9 +4,9 @@ namespace App\Event;
|
|||
use App\Acl;
|
||||
use App\Entity\Station;
|
||||
use App\Entity\User;
|
||||
use App\Http\RouterInterface;
|
||||
use App\Radio\Backend\AbstractBackend;
|
||||
use App\Radio\Frontend\AbstractFrontend;
|
||||
use App\Http\RouterInterface;
|
||||
|
||||
class BuildStationMenu extends AbstractBuildMenu
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ class WriteLiquidsoapConfiguration extends Event
|
|||
{
|
||||
$this->configLines = array_merge($this->configLines, [''], $lines);
|
||||
}
|
||||
|
||||
|
||||
public function appendBlock(string $lines): void
|
||||
{
|
||||
$this->appendLines(explode("\n", $lines));
|
||||
|
|
|
@ -79,7 +79,7 @@ class SendWebhooks extends Event
|
|||
{
|
||||
return count($this->triggers) > 1;
|
||||
}
|
||||
|
||||
|
||||
public function isStandalone(): bool
|
||||
{
|
||||
return $this->is_standalone;
|
||||
|
|
|
@ -23,7 +23,7 @@ class ValidationException extends Exception
|
|||
{
|
||||
return $this->detailedErrors;
|
||||
}
|
||||
|
||||
|
||||
public function setDetailedErrors(ConstraintViolationListInterface $detailedErrors): void
|
||||
{
|
||||
$this->detailedErrors = $detailedErrors;
|
||||
|
|
|
@ -9,7 +9,7 @@ class Csrf extends \AzuraForms\Field\Csrf
|
|||
protected function verifyCsrf(string $token): bool
|
||||
{
|
||||
try {
|
||||
$this->getCsrf()->verify($token, 'form_'.$this->options['csrf_key']);
|
||||
$this->getCsrf()->verify($token, 'form_' . $this->options['csrf_key']);
|
||||
} catch (CsrfValidationException $e) {
|
||||
return false;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class Csrf extends \AzuraForms\Field\Csrf
|
|||
|
||||
protected function generateCsrf(): string
|
||||
{
|
||||
return $this->getCsrf()->generate('form_'.$this->options['csrf_key']);
|
||||
return $this->getCsrf()->generate('form_' . $this->options['csrf_key']);
|
||||
}
|
||||
|
||||
protected function getCsrf(): Session\Csrf
|
||||
|
|
|
@ -11,7 +11,7 @@ class Logger
|
|||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
|
||||
public static function setInstance(LoggerInterface $instance): void
|
||||
{
|
||||
self::$instance = $instance;
|
||||
|
|
|
@ -27,7 +27,7 @@ class GetStation implements MiddlewareInterface
|
|||
$this->station_repo = $station_repo;
|
||||
$this->adapters = $adapters;
|
||||
}
|
||||
|
||||
|
||||
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||
{
|
||||
$routeContext = RouteContext::fromRequest($request);
|
||||
|
|
|
@ -19,7 +19,7 @@ class InjectAcl implements MiddlewareInterface
|
|||
{
|
||||
$this->acl = $acl;
|
||||
}
|
||||
|
||||
|
||||
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||
{
|
||||
$request = $request->withAttribute(ServerRequest::ATTR_ACL, $this->acl);
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
namespace App\Middleware\Module;
|
||||
|
||||
use App\Event;
|
||||
use App\Http\ServerRequest;
|
||||
use App\EventDispatcher;
|
||||
use App\Http\ServerRequest;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Slim\Interfaces\RouteInterface;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
namespace App\Middleware\Module;
|
||||
|
||||
use App\Event;
|
||||
use App\Http\ServerRequest;
|
||||
use App\EventDispatcher;
|
||||
use App\Http\ServerRequest;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use Slim\Interfaces\RouteInterface;
|
||||
|
|
|
@ -12,7 +12,7 @@ class Certificate
|
|||
$this->keyPath = $keyPath;
|
||||
$this->certPath = $certPath;
|
||||
}
|
||||
|
||||
|
||||
public function getKeyPath(): string
|
||||
{
|
||||
return $this->keyPath;
|
||||
|
|
|
@ -29,7 +29,7 @@ class FolderPlaylists extends AbstractTask
|
|||
$this->folderRepo = $folderRepo;
|
||||
$this->filesystem = $filesystem;
|
||||
}
|
||||
|
||||
|
||||
public function run(bool $force = false): void
|
||||
{
|
||||
$stations = SimpleBatchIteratorAggregate::fromQuery(
|
||||
|
|
|
@ -59,7 +59,7 @@ class Module extends Framework implements DoctrineProvider
|
|||
|
||||
parent::_after($test);
|
||||
}
|
||||
|
||||
|
||||
public function _getEntityManager(): EntityManagerInterface
|
||||
{
|
||||
return $this->em;
|
||||
|
|
Loading…
Reference in New Issue