remove Interface-Suffix

This commit is contained in:
Dominik Liebler
2019-08-19 16:50:40 +02:00
parent db3032cd48
commit 132de8e34e
8 changed files with 20 additions and 59 deletions

View File

@ -3,17 +3,17 @@ declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification; namespace DesignPatterns\Behavioral\Specification;
class AndSpecification implements SpecificationInterface class AndSpecification implements Specification
{ {
/** /**
* @var SpecificationInterface[] * @var Specification[]
*/ */
private $specifications; private $specifications;
/** /**
* @param SpecificationInterface[] ...$specifications * @param Specification[] ...$specifications
*/ */
public function __construct(SpecificationInterface ...$specifications) public function __construct(Specification ...$specifications)
{ {
$this->specifications = $specifications; $this->specifications = $specifications;
} }

View File

@ -3,14 +3,14 @@ declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification; namespace DesignPatterns\Behavioral\Specification;
class NotSpecification implements SpecificationInterface class NotSpecification implements Specification
{ {
/** /**
* @var SpecificationInterface * @var Specification
*/ */
private $specification; private $specification;
public function __construct(SpecificationInterface $specification) public function __construct(Specification $specification)
{ {
$this->specification = $specification; $this->specification = $specification;
} }

View File

@ -3,17 +3,17 @@ declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification; namespace DesignPatterns\Behavioral\Specification;
class OrSpecification implements SpecificationInterface class OrSpecification implements Specification
{ {
/** /**
* @var SpecificationInterface[] * @var Specification[]
*/ */
private $specifications; private $specifications;
/** /**
* @param SpecificationInterface[] ...$specifications * @param Specification[] ...$specifications
*/ */
public function __construct(SpecificationInterface ...$specifications) public function __construct(Specification ...$specifications)
{ {
$this->specifications = $specifications; $this->specifications = $specifications;
} }

View File

@ -3,7 +3,7 @@ declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification; namespace DesignPatterns\Behavioral\Specification;
class PriceSpecification implements SpecificationInterface class PriceSpecification implements Specification
{ {
/** /**
* @var float|null * @var float|null

View File

@ -32,9 +32,9 @@ Item.php
:language: php :language: php
:linenos: :linenos:
SpecificationInterface.php Specification.php
.. literalinclude:: SpecificationInterface.php .. literalinclude:: Specification.php
:language: php :language: php
:linenos: :linenos:

View File

@ -3,7 +3,7 @@ declare(strict_types=1);
namespace DesignPatterns\Behavioral\Specification; namespace DesignPatterns\Behavioral\Specification;
interface SpecificationInterface interface Specification
{ {
public function isSatisfiedBy(Item $item): bool; public function isSatisfiedBy(Item $item): bool;
} }

View File

@ -2,51 +2,12 @@
<Diagram> <Diagram>
<ID>PHP</ID> <ID>PHP</ID>
<OriginalElement>\DesignPatterns\Behavioral\Specification\AndSpecification</OriginalElement> <OriginalElement>\DesignPatterns\Behavioral\Specification\AndSpecification</OriginalElement>
<nodes> <nodes />
<node x="0.0" y="112.0">\DesignPatterns\Behavioral\Specification\OrSpecification</node>
<node x="259.0" y="101.0">\DesignPatterns\Behavioral\Specification\PriceSpecification</node>
<node x="807.0" y="112.0">\DesignPatterns\Behavioral\Specification\NotSpecification</node>
<node x="0.0" y="265.0">\DesignPatterns\Behavioral\Specification\Item</node>
<node x="548.0" y="112.0">\DesignPatterns\Behavioral\Specification\AndSpecification</node>
<node x="436.99999999999994" y="0.0">\DesignPatterns\Behavioral\Specification\SpecificationInterface</node>
</nodes>
<notes /> <notes />
<edges> <edges />
<edge source="\DesignPatterns\Behavioral\Specification\AndSpecification" target="\DesignPatterns\Behavioral\Specification\SpecificationInterface"> <settings layout="Hierarchic Group" zoom="1.0" x="524.5" y="191.0" />
<point x="0.0" y="-48.5" /> <SelectedNodes />
<point x="667.5" y="81.0" /> <Categories />
<point x="553.875" y="81.0" />
<point x="23.375000000000057" y="25.5" />
</edge>
<edge source="\DesignPatterns\Behavioral\Specification\NotSpecification" target="\DesignPatterns\Behavioral\Specification\SpecificationInterface">
<point x="0.0" y="-48.5" />
<point x="923.0" y="71.0" />
<point x="600.625" y="71.0" />
<point x="70.12500000000006" y="25.5" />
</edge>
<edge source="\DesignPatterns\Behavioral\Specification\PriceSpecification" target="\DesignPatterns\Behavioral\Specification\SpecificationInterface">
<point x="0.0" y="-59.5" />
<point x="393.5" y="81.0" />
<point x="507.12499999999994" y="81.0" />
<point x="-23.375" y="25.5" />
</edge>
<edge source="\DesignPatterns\Behavioral\Specification\OrSpecification" target="\DesignPatterns\Behavioral\Specification\SpecificationInterface">
<point x="0.0" y="-48.5" />
<point x="119.5" y="71.0" />
<point x="460.37499999999994" y="71.0" />
<point x="-70.125" y="25.5" />
</edge>
</edges>
<settings layout="Hierarchic Group" zoom="1.0" x="425.5" y="91.0" />
<SelectedNodes>
<node>\DesignPatterns\Behavioral\Specification\AndSpecification</node>
</SelectedNodes>
<Categories>
<Category>Fields</Category>
<Category>Constants</Category>
<Category>Constructors</Category>
<Category>Methods</Category>
</Categories>
<VISIBILITY>private</VISIBILITY> <VISIBILITY>private</VISIBILITY>
</Diagram> </Diagram>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 69 KiB