Applied fixes from StyleCI

This commit is contained in:
Dominik Liebler
2015-12-21 07:28:20 -05:00
committed by StyleCI Bot
parent 3663603b80
commit fe1f144ec3
167 changed files with 510 additions and 517 deletions

View File

@@ -15,7 +15,7 @@ class Form extends FormElement
/**
* runs through all elements and calls render() on them, then returns the complete representation
* of the form
* of the form.
*
* from the outside, one will not see this and the form will act like a single object instance
*
@@ -28,7 +28,7 @@ class Form extends FormElement
$formCode = '';
foreach ($this->elements as $element) {
$formCode .= $element->render($indent + 1) . PHP_EOL;
$formCode .= $element->render($indent + 1).PHP_EOL;
}
return $formCode;

View File

@@ -3,12 +3,12 @@
namespace DesignPatterns\Structural\Composite;
/**
* Class FormElement
* Class FormElement.
*/
abstract class FormElement
{
/**
* renders the elements' code
* renders the elements' code.
*
* @param int $indent
*

View File

@@ -3,12 +3,12 @@
namespace DesignPatterns\Structural\Composite;
/**
* Class InputElement
* Class InputElement.
*/
class InputElement extends FormElement
{
/**
* renders the input element HTML
* renders the input element HTML.
*
* @param int $indent
*
@@ -16,6 +16,6 @@ class InputElement extends FormElement
*/
public function render($indent = 0)
{
return str_repeat(' ', $indent) . '<input type="text" />';
return str_repeat(' ', $indent).'<input type="text" />';
}
}

View File

@@ -5,11 +5,10 @@ namespace DesignPatterns\Structural\Composite\Tests;
use DesignPatterns\Structural\Composite;
/**
* FormTest tests the composite pattern on Form
* FormTest tests the composite pattern on Form.
*/
class CompositeTest extends \PHPUnit_Framework_TestCase
{
public function testRender()
{
$form = new Composite\Form();
@@ -25,7 +24,7 @@ class CompositeTest extends \PHPUnit_Framework_TestCase
/**
* The all point of this pattern, a Composite must inherit from the node
* if you want to builld trees
* if you want to builld trees.
*/
public function testFormImplementsFormEelement()
{

View File

@@ -3,12 +3,12 @@
namespace DesignPatterns\Structural\Composite;
/**
* Class TextElement
* Class TextElement.
*/
class TextElement extends FormElement
{
/**
* renders the text element
* renders the text element.
*
* @param int $indent
*
@@ -16,6 +16,6 @@ class TextElement extends FormElement
*/
public function render($indent = 0)
{
return str_repeat(' ', $indent) . 'this is a text element';
return str_repeat(' ', $indent).'this is a text element';
}
}