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