Skip to content

Commit 132de8e

Browse files
author
Dominik Liebler
committed
remove Interface-Suffix
1 parent db3032c commit 132de8e

File tree

8 files changed

+20
-59
lines changed

8 files changed

+20
-59
lines changed

Behavioral/Specification/AndSpecification.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33

44
namespace DesignPatterns\Behavioral\Specification;
55

6-
class AndSpecification implements SpecificationInterface
6+
class AndSpecification implements Specification
77
{
88
/**
9-
* @var SpecificationInterface[]
9+
* @var Specification[]
1010
*/
1111
private $specifications;
1212

1313
/**
14-
* @param SpecificationInterface[] ...$specifications
14+
* @param Specification[] ...$specifications
1515
*/
16-
public function __construct(SpecificationInterface ...$specifications)
16+
public function __construct(Specification ...$specifications)
1717
{
1818
$this->specifications = $specifications;
1919
}

Behavioral/Specification/NotSpecification.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
namespace DesignPatterns\Behavioral\Specification;
55

6-
class NotSpecification implements SpecificationInterface
6+
class NotSpecification implements Specification
77
{
88
/**
9-
* @var SpecificationInterface
9+
* @var Specification
1010
*/
1111
private $specification;
1212

13-
public function __construct(SpecificationInterface $specification)
13+
public function __construct(Specification $specification)
1414
{
1515
$this->specification = $specification;
1616
}

Behavioral/Specification/OrSpecification.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33

44
namespace DesignPatterns\Behavioral\Specification;
55

6-
class OrSpecification implements SpecificationInterface
6+
class OrSpecification implements Specification
77
{
88
/**
9-
* @var SpecificationInterface[]
9+
* @var Specification[]
1010
*/
1111
private $specifications;
1212

1313
/**
14-
* @param SpecificationInterface[] ...$specifications
14+
* @param Specification[] ...$specifications
1515
*/
16-
public function __construct(SpecificationInterface ...$specifications)
16+
public function __construct(Specification ...$specifications)
1717
{
1818
$this->specifications = $specifications;
1919
}

Behavioral/Specification/PriceSpecification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace DesignPatterns\Behavioral\Specification;
55

6-
class PriceSpecification implements SpecificationInterface
6+
class PriceSpecification implements Specification
77
{
88
/**
99
* @var float|null

Behavioral/Specification/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Item.php
3232
:language: php
3333
:linenos:
3434

35-
SpecificationInterface.php
35+
Specification.php
3636

37-
.. literalinclude:: SpecificationInterface.php
37+
.. literalinclude:: Specification.php
3838
:language: php
3939
:linenos:
4040

Behavioral/Specification/SpecificationInterface.php renamed to Behavioral/Specification/Specification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace DesignPatterns\Behavioral\Specification;
55

6-
interface SpecificationInterface
6+
interface Specification
77
{
88
public function isSatisfiedBy(Item $item): bool;
99
}

Behavioral/Specification/uml/Specification.uml

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,12 @@
22
<Diagram>
33
<ID>PHP</ID>
44
<OriginalElement>\DesignPatterns\Behavioral\Specification\AndSpecification</OriginalElement>
5-
<nodes>
6-
<node x="0.0" y="112.0">\DesignPatterns\Behavioral\Specification\OrSpecification</node>
7-
<node x="259.0" y="101.0">\DesignPatterns\Behavioral\Specification\PriceSpecification</node>
8-
<node x="807.0" y="112.0">\DesignPatterns\Behavioral\Specification\NotSpecification</node>
9-
<node x="0.0" y="265.0">\DesignPatterns\Behavioral\Specification\Item</node>
10-
<node x="548.0" y="112.0">\DesignPatterns\Behavioral\Specification\AndSpecification</node>
11-
<node x="436.99999999999994" y="0.0">\DesignPatterns\Behavioral\Specification\SpecificationInterface</node>
12-
</nodes>
5+
<nodes />
136
<notes />
14-
<edges>
15-
<edge source="\DesignPatterns\Behavioral\Specification\AndSpecification" target="\DesignPatterns\Behavioral\Specification\SpecificationInterface">
16-
<point x="0.0" y="-48.5" />
17-
<point x="667.5" y="81.0" />
18-
<point x="553.875" y="81.0" />
19-
<point x="23.375000000000057" y="25.5" />
20-
</edge>
21-
<edge source="\DesignPatterns\Behavioral\Specification\NotSpecification" target="\DesignPatterns\Behavioral\Specification\SpecificationInterface">
22-
<point x="0.0" y="-48.5" />
23-
<point x="923.0" y="71.0" />
24-
<point x="600.625" y="71.0" />
25-
<point x="70.12500000000006" y="25.5" />
26-
</edge>
27-
<edge source="\DesignPatterns\Behavioral\Specification\PriceSpecification" target="\DesignPatterns\Behavioral\Specification\SpecificationInterface">
28-
<point x="0.0" y="-59.5" />
29-
<point x="393.5" y="81.0" />
30-
<point x="507.12499999999994" y="81.0" />
31-
<point x="-23.375" y="25.5" />
32-
</edge>
33-
<edge source="\DesignPatterns\Behavioral\Specification\OrSpecification" target="\DesignPatterns\Behavioral\Specification\SpecificationInterface">
34-
<point x="0.0" y="-48.5" />
35-
<point x="119.5" y="71.0" />
36-
<point x="460.37499999999994" y="71.0" />
37-
<point x="-70.125" y="25.5" />
38-
</edge>
39-
</edges>
40-
<settings layout="Hierarchic Group" zoom="1.0" x="425.5" y="91.0" />
41-
<SelectedNodes>
42-
<node>\DesignPatterns\Behavioral\Specification\AndSpecification</node>
43-
</SelectedNodes>
44-
<Categories>
45-
<Category>Fields</Category>
46-
<Category>Constants</Category>
47-
<Category>Constructors</Category>
48-
<Category>Methods</Category>
49-
</Categories>
7+
<edges />
8+
<settings layout="Hierarchic Group" zoom="1.0" x="524.5" y="191.0" />
9+
<SelectedNodes />
10+
<Categories />
5011
<VISIBILITY>private</VISIBILITY>
5112
</Diagram>
5213

Behavioral/Specification/uml/uml.png

8.08 KB
Loading

0 commit comments

Comments
 (0)