Enforce strict types across files.
This commit is contained in:
parent
c8305d5bc9
commit
71560164b2
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Console\Command;
|
use App\Console\Command;
|
||||||
|
|
||||||
return function (App\Event\BuildConsoleCommands $event) {
|
return function (App\Event\BuildConsoleCommands $event) {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\CallableEventDispatcherInterface;
|
use App\CallableEventDispatcherInterface;
|
||||||
use App\Environment;
|
use App\Environment;
|
||||||
use App\Event;
|
use App\Event;
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* Administrative dashboard configuration.
|
* Administrative dashboard configuration.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Enums\GlobalPermissions;
|
use App\Enums\GlobalPermissions;
|
||||||
|
|
||||||
return static function (App\Event\BuildAdminMenu $e) {
|
return static function (App\Event\BuildAdminMenu $e) {
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* Administrative dashboard configuration.
|
* Administrative dashboard configuration.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Enums\StationFeatures;
|
use App\Enums\StationFeatures;
|
||||||
use App\Enums\StationPermissions;
|
use App\Enums\StationPermissions;
|
||||||
use App\Radio\Enums\AudioProcessingMethods;
|
use App\Radio\Enums\AudioProcessingMethods;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
// An array of message queue types and the DI classes responsible for handling them.
|
// An array of message queue types and the DI classes responsible for handling them.
|
||||||
use App\Message;
|
use App\Message;
|
||||||
use App\Radio\Backend\Liquidsoap;
|
use App\Radio\Backend\Liquidsoap;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Middleware;
|
use App\Middleware;
|
||||||
use Slim\App;
|
use Slim\App;
|
||||||
use Slim\Routing\RouteCollectorProxy;
|
use Slim\Routing\RouteCollectorProxy;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Controller;
|
use App\Controller;
|
||||||
use App\Enums\GlobalPermissions;
|
use App\Enums\GlobalPermissions;
|
||||||
use App\Middleware;
|
use App\Middleware;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Controller;
|
use App\Controller;
|
||||||
use App\Http\Response;
|
use App\Http\Response;
|
||||||
use App\Http\ServerRequest;
|
use App\Http\ServerRequest;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Controller;
|
use App\Controller;
|
||||||
use App\Enums\GlobalPermissions;
|
use App\Enums\GlobalPermissions;
|
||||||
use App\Http\Response;
|
use App\Http\Response;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Controller;
|
use App\Controller;
|
||||||
use App\Middleware;
|
use App\Middleware;
|
||||||
use Slim\Routing\RouteCollectorProxy;
|
use Slim\Routing\RouteCollectorProxy;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Controller;
|
use App\Controller;
|
||||||
use App\Enums\StationFeatures;
|
use App\Enums\StationFeatures;
|
||||||
use App\Enums\StationPermissions;
|
use App\Enums\StationPermissions;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Controller;
|
use App\Controller;
|
||||||
use App\Enums\GlobalPermissions;
|
use App\Enums\GlobalPermissions;
|
||||||
use App\Http\Response;
|
use App\Http\Response;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Controller;
|
use App\Controller;
|
||||||
use App\Http\Response;
|
use App\Http\Response;
|
||||||
use App\Http\ServerRequest;
|
use App\Http\ServerRequest;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Controller;
|
use App\Controller;
|
||||||
use App\Enums\StationFeatures;
|
use App\Enums\StationFeatures;
|
||||||
use App\Enums\StationPermissions;
|
use App\Enums\StationPermissions;
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* PHP-DI Services
|
* PHP-DI Services
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Environment;
|
use App\Environment;
|
||||||
use App\Event;
|
use App\Event;
|
||||||
use Psr\Container\ContainerInterface;
|
use Psr\Container\ContainerInterface;
|
||||||
|
|
22
phpcs.xml
22
phpcs.xml
|
@ -35,26 +35,40 @@
|
||||||
<exclude-pattern>src/Installer/EnvFiles/*.php</exclude-pattern>
|
<exclude-pattern>src/Installer/EnvFiles/*.php</exclude-pattern>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<rule ref="Squiz.NamingConventions.ValidVariableName">
|
||||||
|
|
||||||
|
</rule>
|
||||||
|
-->
|
||||||
|
|
||||||
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
|
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
|
||||||
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/>
|
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
|
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
|
||||||
<rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
|
|
||||||
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
|
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
|
||||||
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
|
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
|
||||||
|
|
||||||
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
|
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="searchAnnotations" value="true"/>
|
<property name="declareOnFirstLine" value="false"/>
|
||||||
|
<property name="linesCountBeforeDeclare" value="1"/>
|
||||||
|
<property name="linesCountAfterDeclare" value="1"/>
|
||||||
|
<property name="spacesCountAroundEqualsSign" value="0"/>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
<exclude-pattern>src/Normalizer/DoctrineEntityNormalizer.php</exclude-pattern>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
|
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
|
||||||
<exclude-pattern>src/Entity/Migration/*$</exclude-pattern>
|
<exclude-pattern>src/Entity/Migration/*$</exclude-pattern>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
|
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
|
||||||
|
<properties>
|
||||||
|
<property name="searchAnnotations" value="true"/>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<exclude-pattern>config/*$</exclude-pattern>
|
<exclude-pattern>config/*$</exclude-pattern>
|
||||||
</rule>
|
</rule>
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Controller\Admin;
|
namespace App\Controller\Admin;
|
||||||
|
|
||||||
use App\Container\EnvironmentAwareTrait;
|
use App\Container\EnvironmentAwareTrait;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Entity\Enums;
|
namespace App\Entity\Enums;
|
||||||
|
|
||||||
enum AuditLogOperations: int
|
enum AuditLogOperations: int
|
||||||
|
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||||
namespace App\Entity\Repository;
|
namespace App\Entity\Repository;
|
||||||
|
|
||||||
use App\Doctrine\Repository;
|
use App\Doctrine\Repository;
|
||||||
|
use App\Entity\Api\StationSchedule as ApiStationSchedule;
|
||||||
use App\Entity\ApiGenerator\ScheduleApiGenerator;
|
use App\Entity\ApiGenerator\ScheduleApiGenerator;
|
||||||
use App\Entity\Station;
|
use App\Entity\Station;
|
||||||
use App\Entity\StationPlaylist;
|
use App\Entity\StationPlaylist;
|
||||||
|
@ -105,7 +106,7 @@ final class StationScheduleRepository extends Repository
|
||||||
* @param Station $station
|
* @param Station $station
|
||||||
* @param CarbonInterface|null $now
|
* @param CarbonInterface|null $now
|
||||||
*
|
*
|
||||||
* @return \App\Entity\Api\StationSchedule[]
|
* @return ApiStationSchedule[]
|
||||||
*/
|
*/
|
||||||
public function getUpcomingSchedule(Station $station, CarbonInterface $now = null): array
|
public function getUpcomingSchedule(Station $station, CarbonInterface $now = null): array
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Flysystem;
|
namespace App\Flysystem;
|
||||||
|
|
||||||
use App\Flysystem\Adapter\ExtendedAdapterInterface;
|
use App\Flysystem\Adapter\ExtendedAdapterInterface;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Flysystem\Adapter;
|
namespace App\Flysystem\Adapter;
|
||||||
|
|
||||||
use App\Flysystem\Attributes\DirectoryAttributes;
|
use App\Flysystem\Attributes\DirectoryAttributes;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Flysystem\Adapter;
|
namespace App\Flysystem\Adapter;
|
||||||
|
|
||||||
use League\Flysystem\StorageAttributes;
|
use League\Flysystem\StorageAttributes;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Flysystem\Adapter;
|
namespace App\Flysystem\Adapter;
|
||||||
|
|
||||||
interface LocalAdapterInterface extends ExtendedAdapterInterface
|
interface LocalAdapterInterface extends ExtendedAdapterInterface
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Flysystem\Adapter;
|
namespace App\Flysystem\Adapter;
|
||||||
|
|
||||||
use App\Flysystem\Attributes\DirectoryAttributes;
|
use App\Flysystem\Attributes\DirectoryAttributes;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Flysystem\Adapter;
|
namespace App\Flysystem\Adapter;
|
||||||
|
|
||||||
use App\Flysystem\Attributes\DirectoryAttributes;
|
use App\Flysystem\Attributes\DirectoryAttributes;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Flysystem\Attributes;
|
namespace App\Flysystem\Attributes;
|
||||||
|
|
||||||
use League\Flysystem\ProxyArrayAccessToProperties;
|
use League\Flysystem\ProxyArrayAccessToProperties;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Flysystem;
|
namespace App\Flysystem;
|
||||||
|
|
||||||
use App\Flysystem\Adapter\ExtendedAdapterInterface;
|
use App\Flysystem\Adapter\ExtendedAdapterInterface;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Flysystem;
|
namespace App\Flysystem;
|
||||||
|
|
||||||
use App\Flysystem\Adapter\LocalAdapterInterface;
|
use App\Flysystem\Adapter\LocalAdapterInterface;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Flysystem;
|
namespace App\Flysystem;
|
||||||
|
|
||||||
use App\Flysystem\Adapter\ExtendedAdapterInterface;
|
use App\Flysystem\Adapter\ExtendedAdapterInterface;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the Symfony package.
|
* This file is part of the Symfony package.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Media\Enums;
|
namespace App\Media\Enums;
|
||||||
|
|
||||||
enum MetadataTags: string
|
enum MetadataTags: string
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Service\DeviceDetector;
|
namespace App\Service\DeviceDetector;
|
||||||
|
|
||||||
use DeviceDetector\DeviceDetector;
|
use DeviceDetector\DeviceDetector;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Service;
|
namespace App\Service;
|
||||||
|
|
||||||
use GuzzleHttp\Client;
|
use GuzzleHttp\Client;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Service\IpGeolocator;
|
namespace App\Service\IpGeolocator;
|
||||||
|
|
||||||
final class IpResult
|
final class IpResult
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Service;
|
namespace App\Service;
|
||||||
|
|
||||||
use App\Container\EnvironmentAwareTrait;
|
use App\Container\EnvironmentAwareTrait;
|
||||||
|
|
Loading…
Reference in New Issue