style: Adopt PSR12

Dev dependency flyeralarm/php-code-validator has been removed.

Closes #444
This commit is contained in:
Mario Simão 2021-10-01 10:26:04 -03:00
parent 7c0b7ece07
commit 56970cc221
167 changed files with 511 additions and 226 deletions

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\ChainOfResponsibilities; namespace DesignPatterns\Behavioral\ChainOfResponsibilities;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\ChainOfResponsibilities\Responsible; namespace DesignPatterns\Behavioral\ChainOfResponsibilities\Responsible;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\ChainOfResponsibilities\Responsible; namespace DesignPatterns\Behavioral\ChainOfResponsibilities\Responsible;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\ChainOfResponsibilities\Tests; namespace DesignPatterns\Behavioral\ChainOfResponsibilities\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Command; namespace DesignPatterns\Behavioral\Command;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Command; namespace DesignPatterns\Behavioral\Command;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Command; namespace DesignPatterns\Behavioral\Command;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Command; namespace DesignPatterns\Behavioral\Command;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Command; namespace DesignPatterns\Behavioral\Command;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Command\Tests; namespace DesignPatterns\Behavioral\Command\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Command\Tests; namespace DesignPatterns\Behavioral\Command\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Command; namespace DesignPatterns\Behavioral\Command;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Interpreter; namespace DesignPatterns\Behavioral\Interpreter;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Interpreter; namespace DesignPatterns\Behavioral\Interpreter;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Interpreter; namespace DesignPatterns\Behavioral\Interpreter;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Interpreter; namespace DesignPatterns\Behavioral\Interpreter;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Interpreter\Tests; namespace DesignPatterns\Behavioral\Interpreter\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Interpreter; namespace DesignPatterns\Behavioral\Interpreter;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Iterator; namespace DesignPatterns\Behavioral\Iterator;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Iterator; namespace DesignPatterns\Behavioral\Iterator;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Iterator\Tests; namespace DesignPatterns\Behavioral\Iterator\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Mediator; namespace DesignPatterns\Behavioral\Mediator;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Mediator; namespace DesignPatterns\Behavioral\Mediator;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Tests\Mediator\Tests; namespace DesignPatterns\Tests\Mediator\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Mediator; namespace DesignPatterns\Behavioral\Mediator;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Mediator; namespace DesignPatterns\Behavioral\Mediator;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Mediator; namespace DesignPatterns\Behavioral\Mediator;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Memento; namespace DesignPatterns\Behavioral\Memento;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Memento; namespace DesignPatterns\Behavioral\Memento;
@ -6,10 +8,10 @@ use InvalidArgumentException;
class State implements \Stringable class State implements \Stringable
{ {
const STATE_CREATED = 'created'; public const STATE_CREATED = 'created';
const STATE_OPENED = 'opened'; public const STATE_OPENED = 'opened';
const STATE_ASSIGNED = 'assigned'; public const STATE_ASSIGNED = 'assigned';
const STATE_CLOSED = 'closed'; public const STATE_CLOSED = 'closed';
private string $state; private string $state;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Memento\Tests; namespace DesignPatterns\Behavioral\Memento\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Memento; namespace DesignPatterns\Behavioral\Memento;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\NullObject; namespace DesignPatterns\Behavioral\NullObject;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\NullObject; namespace DesignPatterns\Behavioral\NullObject;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\NullObject; namespace DesignPatterns\Behavioral\NullObject;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\NullObject; namespace DesignPatterns\Behavioral\NullObject;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\NullObject\Tests; namespace DesignPatterns\Behavioral\NullObject\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Observer\Tests; namespace DesignPatterns\Behavioral\Observer\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Observer; namespace DesignPatterns\Behavioral\Observer;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Observer; namespace DesignPatterns\Behavioral\Observer;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification; namespace DesignPatterns\Behavioral\Specification;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification; namespace DesignPatterns\Behavioral\Specification;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification; namespace DesignPatterns\Behavioral\Specification;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification; namespace DesignPatterns\Behavioral\Specification;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification; namespace DesignPatterns\Behavioral\Specification;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification; namespace DesignPatterns\Behavioral\Specification;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification\Tests; namespace DesignPatterns\Behavioral\Specification\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\State; namespace DesignPatterns\Behavioral\State;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\State; namespace DesignPatterns\Behavioral\State;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\State; namespace DesignPatterns\Behavioral\State;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\State; namespace DesignPatterns\Behavioral\State;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\State; namespace DesignPatterns\Behavioral\State;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\State\Tests; namespace DesignPatterns\Behavioral\State\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Strategy; namespace DesignPatterns\Behavioral\Strategy;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Strategy; namespace DesignPatterns\Behavioral\Strategy;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Strategy; namespace DesignPatterns\Behavioral\Strategy;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Strategy; namespace DesignPatterns\Behavioral\Strategy;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Strategy\Tests; namespace DesignPatterns\Behavioral\Strategy\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\TemplateMethod; namespace DesignPatterns\Behavioral\TemplateMethod;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\TemplateMethod; namespace DesignPatterns\Behavioral\TemplateMethod;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\TemplateMethod; namespace DesignPatterns\Behavioral\TemplateMethod;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\TemplateMethod\Tests; namespace DesignPatterns\Behavioral\TemplateMethod\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Visitor; namespace DesignPatterns\Behavioral\Visitor;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Visitor; namespace DesignPatterns\Behavioral\Visitor;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Visitor; namespace DesignPatterns\Behavioral\Visitor;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Visitor; namespace DesignPatterns\Behavioral\Visitor;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Tests\Visitor\Tests; namespace DesignPatterns\Tests\Visitor\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Visitor; namespace DesignPatterns\Behavioral\Visitor;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\AbstractFactory\Tests; namespace DesignPatterns\Creational\AbstractFactory\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Builder; namespace DesignPatterns\Creational\Builder;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Builder; namespace DesignPatterns\Creational\Builder;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Builder; namespace DesignPatterns\Creational\Builder;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Builder\Parts; namespace DesignPatterns\Creational\Builder\Parts;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Builder\Parts; namespace DesignPatterns\Creational\Builder\Parts;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Builder\Parts; namespace DesignPatterns\Creational\Builder\Parts;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Builder\Parts; namespace DesignPatterns\Creational\Builder\Parts;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Builder\Parts; namespace DesignPatterns\Creational\Builder\Parts;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Builder\Parts; namespace DesignPatterns\Creational\Builder\Parts;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Builder\Tests; namespace DesignPatterns\Creational\Builder\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Builder; namespace DesignPatterns\Creational\Builder;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\FactoryMethod; namespace DesignPatterns\Creational\FactoryMethod;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\FactoryMethod; namespace DesignPatterns\Creational\FactoryMethod;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\FactoryMethod; namespace DesignPatterns\Creational\FactoryMethod;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\FactoryMethod; namespace DesignPatterns\Creational\FactoryMethod;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\FactoryMethod; namespace DesignPatterns\Creational\FactoryMethod;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\FactoryMethod; namespace DesignPatterns\Creational\FactoryMethod;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\FactoryMethod\Tests; namespace DesignPatterns\Creational\FactoryMethod\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Pool; namespace DesignPatterns\Creational\Pool;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Pool\Tests; namespace DesignPatterns\Creational\Pool\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Pool; namespace DesignPatterns\Creational\Pool;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Prototype; namespace DesignPatterns\Creational\Prototype;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Prototype; namespace DesignPatterns\Creational\Prototype;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Prototype; namespace DesignPatterns\Creational\Prototype;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Prototype\Tests; namespace DesignPatterns\Creational\Prototype\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\SimpleFactory; namespace DesignPatterns\Creational\SimpleFactory;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\SimpleFactory; namespace DesignPatterns\Creational\SimpleFactory;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\SimpleFactory\Tests; namespace DesignPatterns\Creational\SimpleFactory\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Singleton; namespace DesignPatterns\Creational\Singleton;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\Singleton\Tests; namespace DesignPatterns\Creational\Singleton\Tests;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\StaticFactory; namespace DesignPatterns\Creational\StaticFactory;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
namespace DesignPatterns\Creational\StaticFactory; namespace DesignPatterns\Creational\StaticFactory;

Some files were not shown because too many files have changed in this diff Show More