Skip to content

Commit

Permalink
refactor(cs): use strict type everywhere
Browse files Browse the repository at this point in the history
It already found an issue!
  • Loading branch information
Nek- committed Aug 18, 2020
1 parent b9e80d0 commit 4e4d43e
Show file tree
Hide file tree
Showing 117 changed files with 239 additions and 5 deletions.
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ return PhpCsFixer\Config::create()
'no_useless_return' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'declare_strict_types' => true,
])
->setFinder($finder)
;
2 changes: 1 addition & 1 deletion features/crud.feature
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Feature:
And the last response contains:
"""
{
"id": "1"
"id": 1
}
"""
When I make a GET request on "/todos/1"
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Doctrine/DoctrineDataStore.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Doctrine;

use Doctrine\ORM\EntityManagerInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/DependencyInjection/MelodiiaExtension.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\DependencyInjection;

use SwagIndustries\Melodiia\Bridge\Symfony\Exception\ConfigException;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/EventListener/ExceptionListener.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\EventListener;

use Nekland\Tools\StringTools;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Exception/ConfigException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Exception;

use SwagIndustries\Melodiia\Exception\MelodiiaLogicException;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Form/AbstractType.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Form;

use SwagIndustries\Melodiia\Bridge\Symfony\Form\Type\ApiType;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Form/DomainObjectDataMapperInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Form;

use Symfony\Component\Form\DataMapperInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Form/DomainObjectsDataMapper.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Form;

use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Form/Extension/DateTimeExtension.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Form\Extension;

use Symfony\Component\Form\AbstractTypeExtension;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Form\Listener;

use SwagIndustries\Melodiia\Crud\MelodiiaModel;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Form/Type/ApiType.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Form\Type;

use SwagIndustries\Melodiia\Bridge\Symfony\Form\DomainObjectDataMapperInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Form/Type/BooleanType.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Form\Type;

use Symfony\Component\Form\AbstractType;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Form/Type/DateTimeType.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Form\Type;

use Symfony\Component\Form\AbstractType;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Form/Type/MelodiiaCollectionType.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Form\Type;

use SwagIndustries\Melodiia\Bridge\Symfony\Form\Listener\ReorderDataToMatchCollectionListener;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/MelodiiaBundle.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony;

use SwagIndustries\Melodiia\Bridge\Symfony\DependencyInjection\MelodiiaExtension;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/MelodiiaConfiguration.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony;

use SwagIndustries\Melodiia\MelodiiaConfigurationInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Response/FormErrorResponse.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Response;

use Nekland\Tools\StringTools;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Routing/CrudDocumentationFactory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Routing;

use Nekland\Tools\StringTools;
Expand Down
2 changes: 2 additions & 0 deletions src/Bridge/Symfony/Routing/LoadGeneratedRoutes.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Bridge\Symfony\Routing;

use Nekland\Tools\StringTools;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/Controller/BaseCrudController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud\Controller;

use SwagIndustries\Melodiia\Bridge\Symfony\Response\FormErrorResponse;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/Controller/Create.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud\Controller;

use SwagIndustries\Melodiia\Crud\Event\CrudEvent;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/Controller/Delete.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud\Controller;

use SwagIndustries\Melodiia\Crud\CrudControllerInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/Controller/Get.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud\Controller;

use SwagIndustries\Melodiia\Crud\CrudControllerInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/Controller/GetAll.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud\Controller;

use SwagIndustries\Melodiia\Bridge\Symfony\Response\FormErrorResponse;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/Controller/Update.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud\Controller;

use SwagIndustries\Melodiia\Crud\Event\CrudEvent;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/CrudControllerInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud;

interface CrudControllerInterface
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/Event/CrudEvent.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud\Event;

use Symfony\Contracts\EventDispatcher\Event;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/Event/CustomResponseEvent.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud\Event;

use SwagIndustries\Melodiia\Response\ApiResponse;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/FilterCollection.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud;

use SwagIndustries\Melodiia\Bridge\Symfony\Form\Type\ApiType;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/FilterCollectionFactory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud;

use Symfony\Component\Form\FormFactoryInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/FilterCollectionFactoryInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud;

interface FilterCollectionFactoryInterface
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/FilterInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud;

use Symfony\Component\Form\FormBuilderInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/MelodiiaModel.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud;

interface MelodiiaModel
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/Persistence/DataStoreInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud\Persistence;

use Pagerfanta\Pagerfanta;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/Tools/IdResolverInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud\Tools;

use Symfony\Component\HttpFoundation\Request;
Expand Down
2 changes: 2 additions & 0 deletions src/Crud/Tools/SimpleIdResolver.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Crud\Tools;

use SwagIndustries\Melodiia\Exception\IdMissingException;
Expand Down
2 changes: 2 additions & 0 deletions src/Documentation/Controller/OpenApiController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Documentation\Controller;

use Symfony\Component\HttpFoundation\Request;
Expand Down
2 changes: 2 additions & 0 deletions src/Documentation/Controller/OpenApiJsonController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Documentation\Controller;

use SwagIndustries\Melodiia\Bridge\Symfony\Exception\ConfigException;
Expand Down
2 changes: 2 additions & 0 deletions src/Documentation/DocumentationFactoryInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Documentation;

use OpenApi\Analysis;
Expand Down
2 changes: 2 additions & 0 deletions src/Documentation/OpenApiDocFactory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Documentation;

use Nekland\Tools\StringTools;
Expand Down
2 changes: 2 additions & 0 deletions src/Error/OnError.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Error;

use Symfony\Component\Debug\Exception\FlattenException as LegacyFlattenException;
Expand Down
2 changes: 2 additions & 0 deletions src/Exception/IdMissingException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Exception;

class IdMissingException extends MelodiiaLogicException
Expand Down
2 changes: 2 additions & 0 deletions src/Exception/ImpossibleToPaginateWithDoctrineRepository.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Exception;

class ImpossibleToPaginateWithDoctrineRepository extends MelodiiaLogicException
Expand Down
2 changes: 2 additions & 0 deletions src/Exception/InvalidPathException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Exception;

class InvalidPathException extends MelodiiaLogicException
Expand Down
2 changes: 2 additions & 0 deletions src/Exception/InvalidResponseException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Exception;

class InvalidResponseException extends MelodiiaLogicException
Expand Down
2 changes: 2 additions & 0 deletions src/Exception/MelodiiaException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Exception;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Exception/MelodiiaLogicException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SwagIndustries\Melodiia\Exception;

class MelodiiaLogicException extends \LogicException implements MelodiiaException
Expand Down
Loading

0 comments on commit 4e4d43e

Please sign in to comment.