From c9e63e9f90c6c990c7e35333b78767c4b0384a6f Mon Sep 17 00:00:00 2001 From: Leonardo Di Donato Date: Tue, 28 Jul 2015 17:04:47 +0200 Subject: [PATCH] PSR2 --- library/Listener/ListenerManager.php | 1 - library/ModelStubInterface.php | 2 +- library/Object/AbstractCollection.php | 2 +- .../Object/PrototypeStrategy/PrototypeStrategyAwareTrait.php | 1 - tests/Criteria/CallbackCriteriaTest.php | 2 +- tests/Hydrator/ClassMethodsTest.php | 2 +- tests/Hydrator/Strategy/HasOneStrategyTest.php | 1 - tests/Listener/ListenerManagerTest.php | 1 - tests/Object/AbstractCollectionTest.php | 2 -- tests/TestAsset/ActiveRecordObject.php | 1 - tests/TestAsset/ArrayGateway/ArrayGateway.php | 2 +- tests/TestAsset/ArrayObjectIterator.php | 4 ++-- tests/TestAsset/ListenerAggregate.php | 5 +---- 13 files changed, 8 insertions(+), 18 deletions(-) diff --git a/library/Listener/ListenerManager.php b/library/Listener/ListenerManager.php index 438da3f..91e3b1f 100644 --- a/library/Listener/ListenerManager.php +++ b/library/Listener/ListenerManager.php @@ -43,5 +43,4 @@ public function validatePlugin($plugin) )); } } - } diff --git a/library/ModelStubInterface.php b/library/ModelStubInterface.php index 3f362ec..100f3d3 100644 --- a/library/ModelStubInterface.php +++ b/library/ModelStubInterface.php @@ -19,7 +19,7 @@ * Matryoshka doesn't provide a persistence layer implementation itself, * but it can work with any third party component that acts as datagateway. * To accomplish this goal Matryoshka uses criteria interfaces that developer have to implement. - * Classes implementing this interface are mainly intended to provide a set of services consumed by + * Classes implementing this interface are mainly intended to provide a set of services consumed by * the criteria implementations. */ interface ModelStubInterface extends ModelPrototypeInterface diff --git a/library/Object/AbstractCollection.php b/library/Object/AbstractCollection.php index 6096de7..5aa58eb 100644 --- a/library/Object/AbstractCollection.php +++ b/library/Object/AbstractCollection.php @@ -125,4 +125,4 @@ public function exchangeArray($data) $this->storage = $data; return $storage; } -} \ No newline at end of file +} diff --git a/library/Object/PrototypeStrategy/PrototypeStrategyAwareTrait.php b/library/Object/PrototypeStrategy/PrototypeStrategyAwareTrait.php index c19f33f..10d970c 100644 --- a/library/Object/PrototypeStrategy/PrototypeStrategyAwareTrait.php +++ b/library/Object/PrototypeStrategy/PrototypeStrategyAwareTrait.php @@ -43,5 +43,4 @@ public function getPrototypeStrategy() return $this->prototypeStrategy; } - } diff --git a/tests/Criteria/CallbackCriteriaTest.php b/tests/Criteria/CallbackCriteriaTest.php index 50e4662..b3c34f9 100644 --- a/tests/Criteria/CallbackCriteriaTest.php +++ b/tests/Criteria/CallbackCriteriaTest.php @@ -66,7 +66,7 @@ public function testApply() $scope = null; $return = ['return']; - $criteria = new CallbackCriteria(function () use (&$argv, &$scope,$return) { + $criteria = new CallbackCriteria(function () use (&$argv, &$scope, $return) { $argv = func_get_args(); $scope = $this; return $return; diff --git a/tests/Hydrator/ClassMethodsTest.php b/tests/Hydrator/ClassMethodsTest.php index 48371f9..1674686 100644 --- a/tests/Hydrator/ClassMethodsTest.php +++ b/tests/Hydrator/ClassMethodsTest.php @@ -34,7 +34,7 @@ public function setUp() $this->mockObject->expects($this->any())->method('getModel')->will($this->returnValue(null)); } - public function test__constructor() + public function testCtor() { $this->assertTrue($this->hydrator->getUnderscoreSeparatedKeys()); } diff --git a/tests/Hydrator/Strategy/HasOneStrategyTest.php b/tests/Hydrator/Strategy/HasOneStrategyTest.php index 8852dd4..46293c6 100644 --- a/tests/Hydrator/Strategy/HasOneStrategyTest.php +++ b/tests/Hydrator/Strategy/HasOneStrategyTest.php @@ -84,6 +84,5 @@ public function testPrototypeStrategy() $strategy->setPrototypeStrategy($prototypeStrategy); $this->assertInstanceOf('\Matryoshka\Model\Object\AbstractObject', $strategy->hydrate([])); - } } diff --git a/tests/Listener/ListenerManagerTest.php b/tests/Listener/ListenerManagerTest.php index 72e77e8..4b61432 100644 --- a/tests/Listener/ListenerManagerTest.php +++ b/tests/Listener/ListenerManagerTest.php @@ -38,5 +38,4 @@ public function testValidatePlugin() $pluginManager = new ListenerManager(); $pluginManager->validatePlugin(new ListenerAggregate()); } - } diff --git a/tests/Object/AbstractCollectionTest.php b/tests/Object/AbstractCollectionTest.php index 4cefc47..f2eae18 100644 --- a/tests/Object/AbstractCollectionTest.php +++ b/tests/Object/AbstractCollectionTest.php @@ -101,6 +101,4 @@ public function testExchangeArrayStringArgumentFail() $ar = $this->getMockForAbstractClass(AbstractCollection::class, [['foo' => 'bar']]); $old = $ar->exchangeArray('Bacon'); } - - } diff --git a/tests/TestAsset/ActiveRecordObject.php b/tests/TestAsset/ActiveRecordObject.php index 04c52e1..d16c91b 100644 --- a/tests/TestAsset/ActiveRecordObject.php +++ b/tests/TestAsset/ActiveRecordObject.php @@ -8,5 +8,4 @@ */ class ActiveRecordObject extends AbstractActiveRecord { - } diff --git a/tests/TestAsset/ArrayGateway/ArrayGateway.php b/tests/TestAsset/ArrayGateway/ArrayGateway.php index bce296a..a6e4555 100644 --- a/tests/TestAsset/ArrayGateway/ArrayGateway.php +++ b/tests/TestAsset/ArrayGateway/ArrayGateway.php @@ -10,7 +10,7 @@ /** * Class ArrayGateway - * + * * Simple Array datagateway for mock and testing */ class ArrayGateway diff --git a/tests/TestAsset/ArrayObjectIterator.php b/tests/TestAsset/ArrayObjectIterator.php index 9d3e7f9..3da753d 100644 --- a/tests/TestAsset/ArrayObjectIterator.php +++ b/tests/TestAsset/ArrayObjectIterator.php @@ -36,7 +36,7 @@ public function next() public function valid() { $key = key($this->var); - $var = ($key !== NULL && $key !== FALSE); + $var = ($key !== null && $key !== false); return $var; } -} \ No newline at end of file +} diff --git a/tests/TestAsset/ListenerAggregate.php b/tests/TestAsset/ListenerAggregate.php index 930f5ec..a0516d9 100644 --- a/tests/TestAsset/ListenerAggregate.php +++ b/tests/TestAsset/ListenerAggregate.php @@ -11,8 +11,5 @@ class ListenerAggregate implements ListenerAggregateInterface public function attach(EventManagerInterface $events) { - } - - -} \ No newline at end of file +}