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

@@ -3,7 +3,7 @@
namespace DesignPatterns\Behavioral\Strategy;
/**
* Class ComparatorInterface
* Class ComparatorInterface.
*/
interface ComparatorInterface
{

View File

@@ -3,7 +3,7 @@
namespace DesignPatterns\Behavioral\Strategy;
/**
* Class DateComparator
* Class DateComparator.
*/
class DateComparator implements ComparatorInterface
{

View File

@@ -3,7 +3,7 @@
namespace DesignPatterns\Behavioral\Strategy;
/**
* Class IdComparator
* Class IdComparator.
*/
class IdComparator implements ComparatorInterface
{

View File

@@ -3,7 +3,7 @@
namespace DesignPatterns\Behavioral\Strategy;
/**
* Class ObjectCollection
* Class ObjectCollection.
*/
class ObjectCollection
{
@@ -31,7 +31,7 @@ class ObjectCollection
public function sort()
{
if (!$this->comparator) {
throw new \LogicException("Comparator is not set");
throw new \LogicException('Comparator is not set');
}
$callback = array($this->comparator, 'compare');

View File

@@ -8,21 +8,20 @@ use DesignPatterns\Behavioral\Strategy\ObjectCollection;
use DesignPatterns\Behavioral\Strategy\Strategy;
/**
* Tests for Strategy pattern
* Tests for Strategy pattern.
*/
class StrategyTest extends \PHPUnit_Framework_TestCase
{
public function getIdCollection()
{
return array(
array(
array(array('id' => 2), array('id' => 1), array('id' => 3)),
array('id' => 1)
array('id' => 1),
),
array(
array(array('id' => 3), array('id' => 2), array('id' => 1)),
array('id' => 1)
array('id' => 1),
),
);
}
@@ -32,11 +31,11 @@ class StrategyTest extends \PHPUnit_Framework_TestCase
return array(
array(
array(array('date' => '2014-03-03'), array('date' => '2015-03-02'), array('date' => '2013-03-01')),
array('date' => '2013-03-01')
array('date' => '2013-03-01'),
),
array(
array(array('date' => '2014-02-03'), array('date' => '2013-02-01'), array('date' => '2015-02-02')),
array('date' => '2013-02-01')
array('date' => '2013-02-01'),
),
);
}