Skip to content

Commit

Permalink
Merge pull request #42 from itk-dev/feature/ITKS-39_ensure_strict_types
Browse files Browse the repository at this point in the history
Feature/itks 39 ensure strict types
  • Loading branch information
turegjorup authored Oct 12, 2023
2 parents 280b4f3 + 38b2e2b commit 322a8d4
Show file tree
Hide file tree
Showing 136 changed files with 273 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
;

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => false,
'phpdoc_align' => false,
'no_superfluous_phpdoc_tags' => false,
'array_syntax' => ['syntax' => 'short'],
'declare_strict_types' => true
])
->setFinder($finder)
;
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- [#42](https://github.com/itk-dev/devops_itksites/pull/42)
Add and apply CS fixer rule to enforce strict types on all files.

## [1.5.0] - 2023-09-20

- [#40](https://github.com/itk-dev/devops_itksites/pull/40)
Expand Down
2 changes: 2 additions & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Expand Down
2 changes: 2 additions & 0 deletions config/preload.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
}
2 changes: 2 additions & 0 deletions public/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use App\Kernel;

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/AdvisoryCountField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/ChangesField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/ClonedByField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/ConfigFilePathField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/DomainField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/EolTypeField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/LatestStatusField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/RootDirField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/ServerTypeField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/SiteTypeField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/SourcesField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/TextMonospaceField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/VersionField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Admin/Field/WarningField.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Command/PurgeCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Command;

use App\Repository\DetectionResultRepository;
Expand Down
2 changes: 2 additions & 0 deletions src/Command/ReplayDetectionResultsCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Command;

use App\Entity\DetectionResult;
Expand Down
2 changes: 2 additions & 0 deletions src/Command/TruncateDerivedDataCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Command;

use Doctrine\DBAL\Connection;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/AdvisoryCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\SourcesField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/DashboardController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Entity\Advisory;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/DetectionResultCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\RootDirField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/DockerImageCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\TextMonospaceField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/DockerImageTagCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\VersionField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/DomainCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\DomainField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/GitRepoCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\TextMonospaceField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/GitTagCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\VersionField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/InstallationCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\ChangesField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/ModuleCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\TextMonospaceField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/ModuleVersionCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\VersionField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/OIDCCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Entity\OIDC;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/PackageCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\AdvisoryCountField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/PackageVersionCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\AdvisoryCountField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/ServerCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Entity\Server;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/ServiceCertificateCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Entity\ServiceCertificate;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/SiteCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller\Admin;

use App\Admin\Field\ConfigFilePathField;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/OpenIdConnectController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/PostLogoutController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
Expand Down
2 changes: 2 additions & 0 deletions src/Entity/AbstractBaseEntity.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Entity;

use ApiPlatform\Metadata\ApiProperty;
Expand Down
2 changes: 2 additions & 0 deletions src/Entity/AbstractHandlerResult.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Entity;

use App\Utils\RootDirNormalizer;
Expand Down
2 changes: 2 additions & 0 deletions src/Entity/Advisory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Entity;

use App\Repository\AdvisoryRepository;
Expand Down
2 changes: 2 additions & 0 deletions src/Entity/DetectionResult.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Entity;

use ApiPlatform\Metadata\ApiResource;
Expand Down
2 changes: 2 additions & 0 deletions src/Entity/DockerImage.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Entity;

use App\Repository\DockerImageRepository;
Expand Down
2 changes: 2 additions & 0 deletions src/Entity/DockerImageTag.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Entity;

use App\Repository\DockerImageTagRepository;
Expand Down
2 changes: 2 additions & 0 deletions src/Entity/Domain.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Entity;

use App\Repository\DomainRepository;
Expand Down
Loading

0 comments on commit 322a8d4

Please sign in to comment.