mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-09-25 22:09:23 +02:00
Applied fixes from StyleCI
This commit is contained in:
committed by
StyleCI Bot
parent
3663603b80
commit
fe1f144ec3
@@ -9,7 +9,7 @@ namespace DesignPatterns\Structural\Decorator;
|
||||
*/
|
||||
|
||||
/**
|
||||
* class Decorator
|
||||
* class Decorator.
|
||||
*/
|
||||
abstract class Decorator implements RendererInterface
|
||||
{
|
||||
|
@@ -3,12 +3,12 @@
|
||||
namespace DesignPatterns\Structural\Decorator;
|
||||
|
||||
/**
|
||||
* Class RenderInJson
|
||||
* Class RenderInJson.
|
||||
*/
|
||||
class RenderInJson extends Decorator
|
||||
{
|
||||
/**
|
||||
* render data as JSON
|
||||
* render data as JSON.
|
||||
*
|
||||
* @return mixed|string
|
||||
*/
|
||||
|
@@ -3,12 +3,12 @@
|
||||
namespace DesignPatterns\Structural\Decorator;
|
||||
|
||||
/**
|
||||
* Class RenderInXml
|
||||
* Class RenderInXml.
|
||||
*/
|
||||
class RenderInXml extends Decorator
|
||||
{
|
||||
/**
|
||||
* render data as XML
|
||||
* render data as XML.
|
||||
*
|
||||
* @return mixed|string
|
||||
*/
|
||||
|
@@ -3,12 +3,12 @@
|
||||
namespace DesignPatterns\Structural\Decorator;
|
||||
|
||||
/**
|
||||
* Class RendererInterface
|
||||
* Class RendererInterface.
|
||||
*/
|
||||
interface RendererInterface
|
||||
{
|
||||
/**
|
||||
* render data
|
||||
* render data.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
@@ -5,11 +5,10 @@ namespace DesignPatterns\Structural\Decorator\Tests;
|
||||
use DesignPatterns\Structural\Decorator;
|
||||
|
||||
/**
|
||||
* DecoratorTest tests the decorator pattern
|
||||
* DecoratorTest tests the decorator pattern.
|
||||
*/
|
||||
class DecoratorTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
protected $service;
|
||||
|
||||
protected function setUp()
|
||||
@@ -35,7 +34,7 @@ class DecoratorTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* The first key-point of this pattern :
|
||||
* The first key-point of this pattern :.
|
||||
*/
|
||||
public function testDecoratorMustImplementsRenderer()
|
||||
{
|
||||
@@ -45,7 +44,7 @@ class DecoratorTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Second key-point of this pattern : the decorator is type-hinted
|
||||
* Second key-point of this pattern : the decorator is type-hinted.
|
||||
*
|
||||
* @expectedException \PHPUnit_Framework_Error
|
||||
*/
|
||||
@@ -59,7 +58,7 @@ class DecoratorTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Second key-point of this pattern : the decorator is type-hinted
|
||||
* Second key-point of this pattern : the decorator is type-hinted.
|
||||
*
|
||||
* @requires PHP 7
|
||||
* @expectedException TypeError
|
||||
@@ -70,7 +69,7 @@ class DecoratorTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* The decorator implements and wraps the same interface
|
||||
* The decorator implements and wraps the same interface.
|
||||
*/
|
||||
public function testDecoratorOnlyAcceptRenderer()
|
||||
{
|
||||
|
@@ -3,7 +3,7 @@
|
||||
namespace DesignPatterns\Structural\Decorator;
|
||||
|
||||
/**
|
||||
* Class Webservice
|
||||
* Class Webservice.
|
||||
*/
|
||||
class Webservice implements RendererInterface
|
||||
{
|
||||
|
Reference in New Issue
Block a user