From faab6ddd3a0a3e0164e07d51af089e6ed07c7ddc Mon Sep 17 00:00:00 2001 From: Toon Verwerft Date: Fri, 12 Sep 2014 16:49:41 +0200 Subject: [PATCH] Fix CS --- .../Phpro/SmartCrud/Console/ApplicationFactorySpec.php | 1 - .../Console/Command/Controller/GenerateSpec.php | 1 - .../SmartCrud/Console/Helper/AbstractHelperSpec.php | 2 -- .../SmartCrud/Console/Helper/ConfigHelperSpec.php | 1 - .../SmartCrud/Console/Helper/GatewayListHelperSpec.php | 1 - .../SmartCrud/Console/Helper/ModuleListHelperSpec.php | 1 - .../Console/Helper/ServiceManagerHelperSpec.php | 1 - .../Controller/AbstractCrudControllerFactorySpec.php | 2 -- spec/Phpro/SmartCrud/Controller/CrudControllerSpec.php | 1 - spec/Phpro/SmartCrud/Event/CrudEventSpec.php | 1 - .../SmartCrud/Gateway/AbstractGatewayFactorySpec.php | 2 -- .../SmartCrud/Gateway/DoctrineCrudGatewaySpec.php | 2 -- spec/Phpro/SmartCrud/Gateway/ZendDbCrudGatewaySpec.php | 1 - spec/Phpro/SmartCrud/Listener/BjyAuthorizeSpec.php | 1 - spec/Phpro/SmartCrud/Listener/FlashMessengerSpec.php | 3 --- spec/Phpro/SmartCrud/ModuleSpec.php | 2 -- spec/Phpro/SmartCrud/Query/DoctrineProviderSpec.php | 1 - .../Service/AbstractSmartServiceFactorySpec.php | 3 --- .../SmartCrud/Service/AbstractSmartServiceSpec.php | 2 -- spec/Phpro/SmartCrud/Service/CreateServiceSpec.php | 10 ++++++---- spec/Phpro/SmartCrud/Service/DeleteServiceSpec.php | 7 ++++--- spec/Phpro/SmartCrud/Service/ListServiceSpec.php | 5 ++--- .../SmartCrud/Service/PaginatorServiceFactorySpec.php | 1 - spec/Phpro/SmartCrud/Service/ParametersServiceSpec.php | 2 -- spec/Phpro/SmartCrud/Service/ReadServiceSpec.php | 5 ++--- .../Phpro/SmartCrud/Service/SmartServiceResultSpec.php | 1 - spec/Phpro/SmartCrud/Service/UpdateServiceSpec.php | 7 ++++--- src/Phpro/SmartCrud/Console/ApplicationFactory.php | 2 -- .../SmartCrud/Console/Command/Controller/Generate.php | 2 -- src/Phpro/SmartCrud/Console/Helper/ConfigHelper.php | 1 - .../SmartCrud/Console/Helper/GatewayListHelper.php | 1 - .../SmartCrud/Console/Helper/ModuleListHelper.php | 9 ++++----- .../Controller/AbstractCrudControllerFactory.php | 3 --- src/Phpro/SmartCrud/Controller/CrudController.php | 8 ++++---- .../SmartCrud/Controller/CrudControllerInterface.php | 2 +- src/Phpro/SmartCrud/Event/CrudEvent.php | 2 -- .../SmartCrud/Exception/InvalidArgumentException.php | 1 - src/Phpro/SmartCrud/Exception/SmartCrudException.php | 1 - src/Phpro/SmartCrud/Gateway/AbstractGatewayFactory.php | 1 - src/Phpro/SmartCrud/Gateway/CrudGatewayInterface.php | 3 +-- src/Phpro/SmartCrud/Gateway/DoctrineCrudGateway.php | 2 -- src/Phpro/SmartCrud/Gateway/ZendDbCrudGateway.php | 3 +-- src/Phpro/SmartCrud/Listener/BjyAuthorize.php | 2 -- src/Phpro/SmartCrud/Listener/FlashMessenger.php | 2 -- src/Phpro/SmartCrud/Module.php | 3 --- src/Phpro/SmartCrud/Query/DoctrineProvider.php | 3 +-- .../SmartCrud/Query/QueryProviderAwareInterface.php | 2 -- src/Phpro/SmartCrud/Query/QueryProviderInterface.php | 2 -- src/Phpro/SmartCrud/Service/AbstractSmartService.php | 3 --- .../SmartCrud/Service/AbstractSmartServiceFactory.php | 3 --- src/Phpro/SmartCrud/Service/CreateService.php | 4 ---- src/Phpro/SmartCrud/Service/DeleteService.php | 2 -- src/Phpro/SmartCrud/Service/ListService.php | 3 --- .../Service/PaginatorFactoryAwareInterface.php | 2 -- .../SmartCrud/Service/PaginatorServiceFactory.php | 2 -- src/Phpro/SmartCrud/Service/ParametersService.php | 1 - src/Phpro/SmartCrud/Service/ReadService.php | 1 - src/Phpro/SmartCrud/Service/SmartServiceInterface.php | 2 -- src/Phpro/SmartCrud/Service/UpdateService.php | 3 --- src/Phpro/SmartCrud/View/Model/ViewModelBuilder.php | 1 - 60 files changed, 30 insertions(+), 119 deletions(-) diff --git a/spec/Phpro/SmartCrud/Console/ApplicationFactorySpec.php b/spec/Phpro/SmartCrud/Console/ApplicationFactorySpec.php index 2bd202a..50958e8 100644 --- a/spec/Phpro/SmartCrud/Console/ApplicationFactorySpec.php +++ b/spec/Phpro/SmartCrud/Console/ApplicationFactorySpec.php @@ -27,5 +27,4 @@ public function it_should_extend_Symfony_Console_Application() { $this->shouldHaveType('\Zend\ServiceManager\FactoryInterface'); } - } diff --git a/spec/Phpro/SmartCrud/Console/Command/Controller/GenerateSpec.php b/spec/Phpro/SmartCrud/Console/Command/Controller/GenerateSpec.php index 5172c8d..5c8905d 100644 --- a/spec/Phpro/SmartCrud/Console/Command/Controller/GenerateSpec.php +++ b/spec/Phpro/SmartCrud/Console/Command/Controller/GenerateSpec.php @@ -27,5 +27,4 @@ public function it_should_extend_Symfony_Console_Command() { $this->shouldBeAnInstanceOf('Symfony\Component\Console\Command\Command'); } - } diff --git a/spec/Phpro/SmartCrud/Console/Helper/AbstractHelperSpec.php b/spec/Phpro/SmartCrud/Console/Helper/AbstractHelperSpec.php index 70d3148..af90166 100644 --- a/spec/Phpro/SmartCrud/Console/Helper/AbstractHelperSpec.php +++ b/spec/Phpro/SmartCrud/Console/Helper/AbstractHelperSpec.php @@ -7,7 +7,6 @@ abstract class AbstractHelperSpec extends ObjectBehavior { - public function it_should_extend_from_symfony_helper() { $this->shouldBeAnInstanceOf('Symfony\Component\Console\Helper\Helper'); @@ -34,5 +33,4 @@ protected function mockConfig($config) $helperSet->get('Config')->willReturn($helper); $this->setHelperSet($helperSet); } - } diff --git a/spec/Phpro/SmartCrud/Console/Helper/ConfigHelperSpec.php b/spec/Phpro/SmartCrud/Console/Helper/ConfigHelperSpec.php index 318656d..5fa9ce6 100644 --- a/spec/Phpro/SmartCrud/Console/Helper/ConfigHelperSpec.php +++ b/spec/Phpro/SmartCrud/Console/Helper/ConfigHelperSpec.php @@ -39,5 +39,4 @@ public function it_should_load_application_config_from_servicemanager() $this->mockApplicationConfig('ApplicationConfig', $config); $this->getApplicationConfig()->shouldBe($config); } - } diff --git a/spec/Phpro/SmartCrud/Console/Helper/GatewayListHelperSpec.php b/spec/Phpro/SmartCrud/Console/Helper/GatewayListHelperSpec.php index 52d42a7..942b44a 100644 --- a/spec/Phpro/SmartCrud/Console/Helper/GatewayListHelperSpec.php +++ b/spec/Phpro/SmartCrud/Console/Helper/GatewayListHelperSpec.php @@ -40,5 +40,4 @@ public function it_should_know_the_default_gateway() ); $this->getDefault()->shouldBe('default.key'); } - } diff --git a/spec/Phpro/SmartCrud/Console/Helper/ModuleListHelperSpec.php b/spec/Phpro/SmartCrud/Console/Helper/ModuleListHelperSpec.php index a745dba..37d402d 100644 --- a/spec/Phpro/SmartCrud/Console/Helper/ModuleListHelperSpec.php +++ b/spec/Phpro/SmartCrud/Console/Helper/ModuleListHelperSpec.php @@ -21,5 +21,4 @@ public function it_should_load_a_modules_list() $list->shouldBeArray(); $list[0]->shouldBe('SampleModule'); } - } diff --git a/spec/Phpro/SmartCrud/Console/Helper/ServiceManagerHelperSpec.php b/spec/Phpro/SmartCrud/Console/Helper/ServiceManagerHelperSpec.php index 2eaa723..967d552 100644 --- a/spec/Phpro/SmartCrud/Console/Helper/ServiceManagerHelperSpec.php +++ b/spec/Phpro/SmartCrud/Console/Helper/ServiceManagerHelperSpec.php @@ -4,7 +4,6 @@ class ServiceManagerHelperSpec extends AbstractHelperSpec { - /** * @param \Zend\ServiceManager\ServiceManager $serviceManager */ diff --git a/spec/Phpro/SmartCrud/Controller/AbstractCrudControllerFactorySpec.php b/spec/Phpro/SmartCrud/Controller/AbstractCrudControllerFactorySpec.php index 775b53c..261d070 100644 --- a/spec/Phpro/SmartCrud/Controller/AbstractCrudControllerFactorySpec.php +++ b/spec/Phpro/SmartCrud/Controller/AbstractCrudControllerFactorySpec.php @@ -9,7 +9,6 @@ class AbstractCrudControllerFactorySpec extends ObjectBehavior { - /** * @param \Zend\Mvc\Controller\ControllerManager $controllerManager * @param \Zend\ServiceManager\ServiceLocatorInterface $serviceLocator @@ -193,5 +192,4 @@ public function it_should_throw_exception_when_service_does_not_exist($controlle $this->shouldThrow('Phpro\SmartCrud\Exception\SmartCrudException') ->duringCreateServiceWithName($controllerManager, $name, $name); } - } diff --git a/spec/Phpro/SmartCrud/Controller/CrudControllerSpec.php b/spec/Phpro/SmartCrud/Controller/CrudControllerSpec.php index c962718..c3ad873 100644 --- a/spec/Phpro/SmartCrud/Controller/CrudControllerSpec.php +++ b/spec/Phpro/SmartCrud/Controller/CrudControllerSpec.php @@ -20,7 +20,6 @@ */ class CrudControllerSpec extends ObjectBehavior { - public function let() { $this->setIdentifierName('id'); diff --git a/spec/Phpro/SmartCrud/Event/CrudEventSpec.php b/spec/Phpro/SmartCrud/Event/CrudEventSpec.php index be6c2b0..b11a7c3 100644 --- a/spec/Phpro/SmartCrud/Event/CrudEventSpec.php +++ b/spec/Phpro/SmartCrud/Event/CrudEventSpec.php @@ -18,7 +18,6 @@ */ class CrudEventSpec extends ObjectBehavior { - /** * @param \stdClass $entity */ diff --git a/spec/Phpro/SmartCrud/Gateway/AbstractGatewayFactorySpec.php b/spec/Phpro/SmartCrud/Gateway/AbstractGatewayFactorySpec.php index bc84606..5bdd349 100644 --- a/spec/Phpro/SmartCrud/Gateway/AbstractGatewayFactorySpec.php +++ b/spec/Phpro/SmartCrud/Gateway/AbstractGatewayFactorySpec.php @@ -63,7 +63,6 @@ public function mockBaseGateway($serviceLocator, $gateway) */ public function it_should_be_able_to_create_gateway_services($serviceLocator) { - $this->mockConfiguration($serviceLocator); $name = 'custom-gateway'; $this->canCreateServiceWithName($serviceLocator, $name, $name)->shouldReturn(true); @@ -107,5 +106,4 @@ public function it_should_throw_exception_when_base_gateway_does_not_exist($serv $this->shouldThrow('Phpro\SmartCrud\Exception\SmartCrudException') ->duringCreateServiceWithName($serviceLocator, $name, $name); } - } diff --git a/spec/Phpro/SmartCrud/Gateway/DoctrineCrudGatewaySpec.php b/spec/Phpro/SmartCrud/Gateway/DoctrineCrudGatewaySpec.php index 3bb231d..f161d8f 100644 --- a/spec/Phpro/SmartCrud/Gateway/DoctrineCrudGatewaySpec.php +++ b/spec/Phpro/SmartCrud/Gateway/DoctrineCrudGatewaySpec.php @@ -19,7 +19,6 @@ */ class DoctrineCrudGatewaySpec extends ObjectBehavior { - public function it_is_initializable() { $this->shouldHaveType('Phpro\SmartCrud\Gateway\DoctrineCrudGateway'); @@ -180,5 +179,4 @@ public function it_should_not_delete_invalid_entity($objectManager, $entity) $this->delete($entity, array())->shouldReturn(false); } - } diff --git a/spec/Phpro/SmartCrud/Gateway/ZendDbCrudGatewaySpec.php b/spec/Phpro/SmartCrud/Gateway/ZendDbCrudGatewaySpec.php index eb5134a..8ba8da1 100644 --- a/spec/Phpro/SmartCrud/Gateway/ZendDbCrudGatewaySpec.php +++ b/spec/Phpro/SmartCrud/Gateway/ZendDbCrudGatewaySpec.php @@ -27,5 +27,4 @@ public function it_should_implement_Phpro_SmartCrud_CrudGatewayInterface() { $this->shouldBeAnInstanceOf('Phpro\SmartCrud\Gateway\CrudGatewayInterface'); } - } diff --git a/spec/Phpro/SmartCrud/Listener/BjyAuthorizeSpec.php b/spec/Phpro/SmartCrud/Listener/BjyAuthorizeSpec.php index 9710822..5a93b24 100644 --- a/spec/Phpro/SmartCrud/Listener/BjyAuthorizeSpec.php +++ b/spec/Phpro/SmartCrud/Listener/BjyAuthorizeSpec.php @@ -10,7 +10,6 @@ class BjyAuthorizeSpec extends ObjectBehavior { - /** * @param \BjyAuthorize\Service\Authorize $authorizeService */ diff --git a/spec/Phpro/SmartCrud/Listener/FlashMessengerSpec.php b/spec/Phpro/SmartCrud/Listener/FlashMessengerSpec.php index 0866cec..89c5aec 100644 --- a/spec/Phpro/SmartCrud/Listener/FlashMessengerSpec.php +++ b/spec/Phpro/SmartCrud/Listener/FlashMessengerSpec.php @@ -14,7 +14,6 @@ */ class FlashMessengerSpec extends ObjectBehavior { - /** * Mock the flashmessenger * @@ -125,7 +124,6 @@ public function it_should_add_delete_succeeded_message($flashMessenger, $event) $this->deleteSucceeded($event); $flashMessenger->addSuccessMessage(Argument::type('string'))->shouldBeCalled(); - } /** @@ -163,5 +161,4 @@ public function it_should_add_delete_failed_message($flashMessenger, $event) $this->deleteFailed($event); $flashMessenger->addErrorMessage(Argument::type('string'))->shouldBeCalled(); } - } diff --git a/spec/Phpro/SmartCrud/ModuleSpec.php b/spec/Phpro/SmartCrud/ModuleSpec.php index d17bd1d..32da851 100644 --- a/spec/Phpro/SmartCrud/ModuleSpec.php +++ b/spec/Phpro/SmartCrud/ModuleSpec.php @@ -7,7 +7,6 @@ class ModuleSpec extends ObjectBehavior { - public function it_is_initializable() { $this->shouldHaveType('Phpro\SmartCrud\Module'); @@ -71,5 +70,4 @@ public function it_should_configure_cli($event, $cli, $serviceManager, $helperSe $cli->addCommands(Argument::type('array'))->shouldBeCalled(); $helperSet->set(Argument::cetera())->shouldBeCalled(); } - } diff --git a/spec/Phpro/SmartCrud/Query/DoctrineProviderSpec.php b/spec/Phpro/SmartCrud/Query/DoctrineProviderSpec.php index bc9f3b4..b6e8b2b 100644 --- a/spec/Phpro/SmartCrud/Query/DoctrineProviderSpec.php +++ b/spec/Phpro/SmartCrud/Query/DoctrineProviderSpec.php @@ -37,5 +37,4 @@ public function it_should_create_a_list($repository, $queryBuilder, $query) $this->createQuery(array())->shouldReturn($query); } - } diff --git a/spec/Phpro/SmartCrud/Service/AbstractSmartServiceFactorySpec.php b/spec/Phpro/SmartCrud/Service/AbstractSmartServiceFactorySpec.php index cd2ce40..e1fb6dc 100644 --- a/spec/Phpro/SmartCrud/Service/AbstractSmartServiceFactorySpec.php +++ b/spec/Phpro/SmartCrud/Service/AbstractSmartServiceFactorySpec.php @@ -160,7 +160,6 @@ public function it_should_check_if_service_can_be_created($serviceLocator) public function it_should_create_a_service_and_inject_the_dependencies( $serviceLocator, $smartService, $eventManager, $listener, $crudGateway, $form, $parameterService) { - $name = "Create service"; $requestedName = 'key_in_configuration'; $serviceKey = 'module/service'; @@ -205,7 +204,5 @@ public function it_should_create_a_service_and_inject_the_dependencies( $eventManager->attach($listener)->shouldBeCalled(); $this->createServiceWithName($serviceLocator, $name, $requestedName . '::' . 'create')->shouldReturn($smartService); - } - } diff --git a/spec/Phpro/SmartCrud/Service/AbstractSmartServiceSpec.php b/spec/Phpro/SmartCrud/Service/AbstractSmartServiceSpec.php index 8856a59..8f95f85 100644 --- a/spec/Phpro/SmartCrud/Service/AbstractSmartServiceSpec.php +++ b/spec/Phpro/SmartCrud/Service/AbstractSmartServiceSpec.php @@ -20,7 +20,6 @@ */ abstract class AbstractSmartServiceSpec extends ObjectBehavior { - /** * @param array $paramsData * @@ -127,5 +126,4 @@ public function it_should_create_crud_event($entity) $crudEvent->getTarget()->shouldReturn($entity); $crudEvent->getParams()->shouldReturn($this->getParameters()); } - } diff --git a/spec/Phpro/SmartCrud/Service/CreateServiceSpec.php b/spec/Phpro/SmartCrud/Service/CreateServiceSpec.php index f2cf8a7..c805820 100644 --- a/spec/Phpro/SmartCrud/Service/CreateServiceSpec.php +++ b/spec/Phpro/SmartCrud/Service/CreateServiceSpec.php @@ -19,7 +19,6 @@ */ class CreateServiceSpec extends AbstractSmartServiceSpec { - public function it_is_initializable() { $this->shouldHaveType('Phpro\SmartCrud\Service\CreateService'); @@ -53,7 +52,8 @@ public function it_should_handle_no_data($gateway, $eventManager, $form, $result $this->setGateway($gateway); $this->setForm($form); - $this->run(null,null)->shouldReturnAnInstanceOf('Phpro\SmartCrud\Service\SmartServiceResult');; + $this->run(null,null)->shouldReturnAnInstanceOf('Phpro\SmartCrud\Service\SmartServiceResult'); + ; $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_DATA_VALIDATION))->shouldNotBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::INVALID_CREATE))->shouldNotBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_CREATE))->shouldNotBeCalled(); @@ -83,7 +83,8 @@ public function it_should_handle_invalid_data($gateway, $eventManager, $form, $r $this->setGateway($gateway); $this->setForm($form); - $this->run(null,$this->getMockPostData())->shouldReturnAnInstanceOf('Phpro\SmartCrud\Service\SmartServiceResult');; + $this->run(null,$this->getMockPostData())->shouldReturnAnInstanceOf('Phpro\SmartCrud\Service\SmartServiceResult'); + ; $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_DATA_VALIDATION))->shouldBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::INVALID_CREATE))->shouldBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_CREATE))->shouldNotBeCalled(); @@ -119,7 +120,8 @@ public function it_should_handle_valid_data($gateway, $eventManager, $form, $res $this->setResult($result); $this->setForm($form); - $this->run(null,$this->getMockPostData())->shouldReturn($result);; + $this->run(null,$this->getMockPostData())->shouldReturn($result); + ; $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_DATA_VALIDATION))->shouldBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::INVALID_CREATE))->shouldNotBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_CREATE))->shouldBeCalled(); diff --git a/spec/Phpro/SmartCrud/Service/DeleteServiceSpec.php b/spec/Phpro/SmartCrud/Service/DeleteServiceSpec.php index 8c4f8cb..a85edc5 100644 --- a/spec/Phpro/SmartCrud/Service/DeleteServiceSpec.php +++ b/spec/Phpro/SmartCrud/Service/DeleteServiceSpec.php @@ -19,7 +19,6 @@ */ class DeleteServiceSpec extends AbstractSmartServiceSpec { - public function it_is_initializable() { $this->shouldHaveType('Phpro\SmartCrud\Service\DeleteService'); @@ -46,7 +45,8 @@ public function it_should_handle_invalid_data($gateway, $eventManager, $form, $r $this->setGateway($gateway); $this->setForm($form); - $this->run(null,$this->getMockPostData())->shouldReturnAnInstanceOf('Phpro\SmartCrud\Service\SmartServiceResult');; + $this->run(null,$this->getMockPostData())->shouldReturnAnInstanceOf('Phpro\SmartCrud\Service\SmartServiceResult'); + ; $eventManager->trigger(Argument::which('getName', CrudEvent::INVALID_DELETE))->shouldBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_DELETE))->shouldNotBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::AFTER_DELETE))->shouldNotBeCalled(); @@ -74,7 +74,8 @@ public function it_should_handle_valid_data($gateway, $eventManager, $form, $res $this->setResult($result); $this->setForm($form); - $this->run(null,$this->getMockPostData())->shouldReturn($result);; + $this->run(null,$this->getMockPostData())->shouldReturn($result); + ; $eventManager->trigger(Argument::which('getName', CrudEvent::INVALID_DELETE))->shouldNotBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_DELETE))->shouldBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::AFTER_DELETE))->shouldBeCalled(); diff --git a/spec/Phpro/SmartCrud/Service/ListServiceSpec.php b/spec/Phpro/SmartCrud/Service/ListServiceSpec.php index 281a5f1..c6c3fa5 100644 --- a/spec/Phpro/SmartCrud/Service/ListServiceSpec.php +++ b/spec/Phpro/SmartCrud/Service/ListServiceSpec.php @@ -19,7 +19,6 @@ */ class ListServiceSpec extends AbstractSmartServiceSpec { - /** * @param \Phpro\SmartCrud\Gateway\CrudGatewayInterface $gateway * @param \Zend\EventManager\EventManager $eventManager @@ -99,7 +98,8 @@ public function it_should_return_a_result($gateway, $eventManager, $paginatorFac $this->setGateway($gateway); $this->setResult($result); - $this->run(Argument::any(), $getData)->shouldReturn($result);; + $this->run(Argument::any(), $getData)->shouldReturn($result); + ; $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_LIST))->shouldBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::AFTER_LIST))->shouldBeCalled(); } @@ -117,5 +117,4 @@ public function it_should_create_paginator($paginatorFactory, $paginator) $this->getPaginator($records, $params)->shouldReturn($paginator); } - } diff --git a/spec/Phpro/SmartCrud/Service/PaginatorServiceFactorySpec.php b/spec/Phpro/SmartCrud/Service/PaginatorServiceFactorySpec.php index b5ca8fb..51c5ab5 100644 --- a/spec/Phpro/SmartCrud/Service/PaginatorServiceFactorySpec.php +++ b/spec/Phpro/SmartCrud/Service/PaginatorServiceFactorySpec.php @@ -37,5 +37,4 @@ public function it_should_create_paginator() $paginator->getCurrentPageNumber()->shouldReturn($pageNumber); $paginator->getItemCountPerPage()->shouldReturn($itemCount); } - } diff --git a/spec/Phpro/SmartCrud/Service/ParametersServiceSpec.php b/spec/Phpro/SmartCrud/Service/ParametersServiceSpec.php index 5daeb02..0042376 100644 --- a/spec/Phpro/SmartCrud/Service/ParametersServiceSpec.php +++ b/spec/Phpro/SmartCrud/Service/ParametersServiceSpec.php @@ -61,7 +61,6 @@ public function it_should_return_params_plugin($serviceLocator, $request, $contr $this->mockServiceLocator($serviceLocator, $request, $controller, $params); $this->createService($serviceLocator)->shouldReturn($this); $controller->plugin('params')->shouldBeCalled(); - } /** @@ -164,5 +163,4 @@ public function it_should_load_route_data_from_plugin($serviceLocator, $request, $this->fromRoute('key', 'default'); $params->fromRoute('key', 'default')->shouldBeCalled(); } - } diff --git a/spec/Phpro/SmartCrud/Service/ReadServiceSpec.php b/spec/Phpro/SmartCrud/Service/ReadServiceSpec.php index e971a7e..3e70a5d 100644 --- a/spec/Phpro/SmartCrud/Service/ReadServiceSpec.php +++ b/spec/Phpro/SmartCrud/Service/ReadServiceSpec.php @@ -19,7 +19,6 @@ */ class ReadServiceSpec extends AbstractSmartServiceSpec { - public function it_is_initializable() { $this->shouldHaveType('Phpro\SmartCrud\Service\ReadService'); @@ -51,10 +50,10 @@ public function it_should_return_a_result($gateway, $eventManager, $result) $this->setGateway($gateway); $this->setResult($result); - $this->run($entity->id, $postData)->shouldReturn($result);; + $this->run($entity->id, $postData)->shouldReturn($result); + ; $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_DATA_VALIDATION))->shouldNotBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_READ))->shouldBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::AFTER_READ))->shouldBeCalled(); } - } diff --git a/spec/Phpro/SmartCrud/Service/SmartServiceResultSpec.php b/spec/Phpro/SmartCrud/Service/SmartServiceResultSpec.php index ebf0514..247b0ba 100644 --- a/spec/Phpro/SmartCrud/Service/SmartServiceResultSpec.php +++ b/spec/Phpro/SmartCrud/Service/SmartServiceResultSpec.php @@ -18,7 +18,6 @@ */ class SmartServiceResultSpec extends ObjectBehavior { - public function it_is_initializable() { $this->shouldHaveType('Phpro\SmartCrud\Service\SmartServiceResult'); diff --git a/spec/Phpro/SmartCrud/Service/UpdateServiceSpec.php b/spec/Phpro/SmartCrud/Service/UpdateServiceSpec.php index 626568e..a118b5a 100644 --- a/spec/Phpro/SmartCrud/Service/UpdateServiceSpec.php +++ b/spec/Phpro/SmartCrud/Service/UpdateServiceSpec.php @@ -19,7 +19,6 @@ */ class UpdateServiceSpec extends AbstractSmartServiceSpec { - public function it_is_initializable() { $this->shouldHaveType('Phpro\SmartCrud\Service\UpdateService'); @@ -54,7 +53,8 @@ public function it_should_handle_no_data($gateway, $eventManager, $form, $result $this->setGateway($gateway); $this->setForm($form); - $this->run($entity->id,null)->shouldReturnAnInstanceOf('Phpro\SmartCrud\Service\SmartServiceResult');; + $this->run($entity->id,null)->shouldReturnAnInstanceOf('Phpro\SmartCrud\Service\SmartServiceResult'); + ; $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_DATA_VALIDATION))->shouldNotBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::INVALID_UPDATE))->shouldNotBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_UPDATE))->shouldNotBeCalled(); @@ -91,7 +91,8 @@ public function it_should_handle_invalid_data($gateway, $eventManager,$form, $re $this->setResult($result); $this->setForm($form); - $this->run($entity->id, $this->getMockPostData())->shouldReturn($result);; + $this->run($entity->id, $this->getMockPostData())->shouldReturn($result); + ; $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_DATA_VALIDATION))->shouldBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::INVALID_UPDATE))->shouldBeCalled(); $eventManager->trigger(Argument::which('getName', CrudEvent::BEFORE_UPDATE))->shouldNotBeCalled(); diff --git a/src/Phpro/SmartCrud/Console/ApplicationFactory.php b/src/Phpro/SmartCrud/Console/ApplicationFactory.php index 38ac63e..9a4450e 100644 --- a/src/Phpro/SmartCrud/Console/ApplicationFactory.php +++ b/src/Phpro/SmartCrud/Console/ApplicationFactory.php @@ -22,7 +22,6 @@ */ class ApplicationFactory implements FactoryInterface { - /** * @var \Zend\EventManager\EventManagerInterface */ @@ -69,5 +68,4 @@ public function createService(ServiceLocatorInterface $sl) return $cli; } - } diff --git a/src/Phpro/SmartCrud/Console/Command/Controller/Generate.php b/src/Phpro/SmartCrud/Console/Command/Controller/Generate.php index 787eaa8..32eae2b 100644 --- a/src/Phpro/SmartCrud/Console/Command/Controller/Generate.php +++ b/src/Phpro/SmartCrud/Console/Command/Controller/Generate.php @@ -196,7 +196,6 @@ protected function getGatewayClass(OutputInterface $output) */ protected function parseConfig($gateway, $routePrefix, $controller, $entity, $form) { - $entitySuffix = ltrim($entity, '\\'); $serviceKey = 'SmartCrudService\\' . $entitySuffix; $controllerKey = 'SmartCrudController\\' . $entitySuffix; @@ -293,5 +292,4 @@ protected function writeConfig($module, $config) return $file; } - } diff --git a/src/Phpro/SmartCrud/Console/Helper/ConfigHelper.php b/src/Phpro/SmartCrud/Console/Helper/ConfigHelper.php index 65d7c09..4fde609 100644 --- a/src/Phpro/SmartCrud/Console/Helper/ConfigHelper.php +++ b/src/Phpro/SmartCrud/Console/Helper/ConfigHelper.php @@ -18,7 +18,6 @@ */ class ConfigHelper extends Helper { - /** * @return array */ diff --git a/src/Phpro/SmartCrud/Console/Helper/GatewayListHelper.php b/src/Phpro/SmartCrud/Console/Helper/GatewayListHelper.php index ef3c1e1..990e381 100644 --- a/src/Phpro/SmartCrud/Console/Helper/GatewayListHelper.php +++ b/src/Phpro/SmartCrud/Console/Helper/GatewayListHelper.php @@ -20,7 +20,6 @@ */ class GatewayListHelper extends Helper { - /** * @return string */ diff --git a/src/Phpro/SmartCrud/Console/Helper/ModuleListHelper.php b/src/Phpro/SmartCrud/Console/Helper/ModuleListHelper.php index f00d91a..aa1ff7e 100644 --- a/src/Phpro/SmartCrud/Console/Helper/ModuleListHelper.php +++ b/src/Phpro/SmartCrud/Console/Helper/ModuleListHelper.php @@ -18,16 +18,15 @@ */ class ModuleListHelper extends Helper { - /** * @return array */ public function getList() - { - $config = $this->getHelperSet()->get('Config')->getApplicationConfig(); + { + $config = $this->getHelperSet()->get('Config')->getApplicationConfig(); - return isset($config['modules']) ? $config['modules'] : array(); - } + return isset($config['modules']) ? $config['modules'] : array(); + } /** * Get the canonical name of this helper. diff --git a/src/Phpro/SmartCrud/Controller/AbstractCrudControllerFactory.php b/src/Phpro/SmartCrud/Controller/AbstractCrudControllerFactory.php index 859b458..0b61579 100644 --- a/src/Phpro/SmartCrud/Controller/AbstractCrudControllerFactory.php +++ b/src/Phpro/SmartCrud/Controller/AbstractCrudControllerFactory.php @@ -26,7 +26,6 @@ class AbstractCrudControllerFactory implements AbstractFactoryInterface, ServiceLocatorAwareInterface { - const FACTORY_NAMESPACE = 'phpro-smartcrud-controller'; const CONFIG_CONTROLLER = 'controller'; @@ -179,7 +178,6 @@ public function createServiceWithName(ServiceLocatorInterface $controllers, $nam $this->injectDependencies($controller, $config); return $controller; - } /** @@ -275,5 +273,4 @@ protected function injectIdentifierName(CrudControllerInterface $controller, $id return $this; } - } diff --git a/src/Phpro/SmartCrud/Controller/CrudController.php b/src/Phpro/SmartCrud/Controller/CrudController.php index 4a0cf70..ecb1a0f 100644 --- a/src/Phpro/SmartCrud/Controller/CrudController.php +++ b/src/Phpro/SmartCrud/Controller/CrudController.php @@ -8,6 +8,7 @@ */ namespace Phpro\SmartCrud\Controller; + use Phpro\SmartCrud\Service\SmartServiceInterface; use Zend\Mvc\Controller\AbstractActionController; use Phpro\SmartCrud\View\Model\ViewModelBuilder; @@ -19,7 +20,6 @@ class CrudController extends AbstractActionController implements CrudControllerInterface { - /** * @var SmartServiceInterface */ @@ -126,7 +126,7 @@ public function createAction() { $data = $this->getRequest()->isPost() ? $this->getRequest()->getPost() : null; $result = $this->getSmartService()->run(null, $data); - if($this->getRequest()->isPost() && $result->isSuccessFull()) { + if ($this->getRequest()->isPost() && $result->isSuccessFull()) { return $this->redirect()->toRoute(null, array('action' => 'list'), true); } return $this->getViewModelBuilder()->build($this->getRequest(), $result, 'create'); @@ -139,7 +139,7 @@ public function updateAction() { $data = $this->getRequest()->isPost() ? $this->getRequest()->getPost() : null; $result = $this->getSmartService()->run($this->getEntityId(), $data); - if($this->getRequest()->isPost() && $result->isSuccessFull()) { + if ($this->getRequest()->isPost() && $result->isSuccessFull()) { return $this->redirect()->toRoute(null, array('action' => 'update', $this->getIdentifierName() => $this->getEntityId()), true); } return $this->getViewModelBuilder()->build($this->getRequest(), $result, 'update'); @@ -161,7 +161,7 @@ public function deleteAction() { $data = $this->getRequest()->isPost() ? $this->getRequest()->getPost() : null; $result = $this->getSmartService()->run($this->getEntityId(), $data); - if($this->getRequest()->isPost() && $result->isSuccessFull()) { + if ($this->getRequest()->isPost() && $result->isSuccessFull()) { return $this->redirect()->toRoute(null, array('action' => 'list'), true); } return $this->getViewModelBuilder()->build($this->getRequest(), $result, 'delete'); diff --git a/src/Phpro/SmartCrud/Controller/CrudControllerInterface.php b/src/Phpro/SmartCrud/Controller/CrudControllerInterface.php index a12c754..c78ba47 100644 --- a/src/Phpro/SmartCrud/Controller/CrudControllerInterface.php +++ b/src/Phpro/SmartCrud/Controller/CrudControllerInterface.php @@ -8,6 +8,7 @@ */ namespace Phpro\SmartCrud\Controller; + use Phpro\SmartCrud\Service\SmartServiceInterface; use Phpro\SmartCrud\View\Model\ViewModelBuilder; /** @@ -17,7 +18,6 @@ */ interface CrudControllerInterface { - /** * @param string $name * diff --git a/src/Phpro/SmartCrud/Event/CrudEvent.php b/src/Phpro/SmartCrud/Event/CrudEvent.php index d17efd9..26feffe 100644 --- a/src/Phpro/SmartCrud/Event/CrudEvent.php +++ b/src/Phpro/SmartCrud/Event/CrudEvent.php @@ -18,7 +18,6 @@ */ class CrudEvent extends Event { - const BEFORE_LIST = 'before-list'; const AFTER_LIST = 'after-list'; const BEFORE_DATA_VALIDATION = 'before-data-validation'; @@ -46,5 +45,4 @@ public function getEntity() { return $this->getTarget(); } - } diff --git a/src/Phpro/SmartCrud/Exception/InvalidArgumentException.php b/src/Phpro/SmartCrud/Exception/InvalidArgumentException.php index 11dede9..fc03347 100644 --- a/src/Phpro/SmartCrud/Exception/InvalidArgumentException.php +++ b/src/Phpro/SmartCrud/Exception/InvalidArgumentException.php @@ -9,5 +9,4 @@ */ class InvalidArgumentException extends \InvalidArgumentException { - } diff --git a/src/Phpro/SmartCrud/Exception/SmartCrudException.php b/src/Phpro/SmartCrud/Exception/SmartCrudException.php index 331c7e0..9908eb4 100644 --- a/src/Phpro/SmartCrud/Exception/SmartCrudException.php +++ b/src/Phpro/SmartCrud/Exception/SmartCrudException.php @@ -16,5 +16,4 @@ */ class SmartCrudException extends \Exception { - } diff --git a/src/Phpro/SmartCrud/Gateway/AbstractGatewayFactory.php b/src/Phpro/SmartCrud/Gateway/AbstractGatewayFactory.php index f2e3223..d38f402 100644 --- a/src/Phpro/SmartCrud/Gateway/AbstractGatewayFactory.php +++ b/src/Phpro/SmartCrud/Gateway/AbstractGatewayFactory.php @@ -10,7 +10,6 @@ class AbstractGatewayFactory implements AbstractFactoryInterface { - const FACTORY_NAMESPACE = 'phpro-smartcrud-gateway'; /** diff --git a/src/Phpro/SmartCrud/Gateway/CrudGatewayInterface.php b/src/Phpro/SmartCrud/Gateway/CrudGatewayInterface.php index a2bb273..3e60bc6 100644 --- a/src/Phpro/SmartCrud/Gateway/CrudGatewayInterface.php +++ b/src/Phpro/SmartCrud/Gateway/CrudGatewayInterface.php @@ -8,6 +8,7 @@ */ namespace Phpro\SmartCrud\Gateway; + use Phpro\SmartCrud\Query\QueryProviderInterface; /** @@ -17,7 +18,6 @@ */ interface CrudGatewayInterface { - /** * @param $entityKey * @param null $id @@ -66,5 +66,4 @@ public function update($entity, $parameters); * @return bool */ public function delete($entity, $id); - } diff --git a/src/Phpro/SmartCrud/Gateway/DoctrineCrudGateway.php b/src/Phpro/SmartCrud/Gateway/DoctrineCrudGateway.php index 4a0362e..237c985 100644 --- a/src/Phpro/SmartCrud/Gateway/DoctrineCrudGateway.php +++ b/src/Phpro/SmartCrud/Gateway/DoctrineCrudGateway.php @@ -24,7 +24,6 @@ class DoctrineCrudGateway implements ObjectManagerAwareInterface, CrudGatewayInterface { - /** * @var ObjectManager */ @@ -181,5 +180,4 @@ public function getRepository($classNameOrEntity) return $this->getObjectManager()->getRepository($className); } - } diff --git a/src/Phpro/SmartCrud/Gateway/ZendDbCrudGateway.php b/src/Phpro/SmartCrud/Gateway/ZendDbCrudGateway.php index da17ddb..e53f9a9 100644 --- a/src/Phpro/SmartCrud/Gateway/ZendDbCrudGateway.php +++ b/src/Phpro/SmartCrud/Gateway/ZendDbCrudGateway.php @@ -8,6 +8,7 @@ */ namespace Phpro\SmartCrud\Gateway; + use Phpro\SmartCrud\Query\QueryProviderInterface; /** @@ -17,7 +18,6 @@ */ class ZendDbCrudGateway implements CrudGatewayInterface { - /** * @param $entityKey * @param null $id @@ -84,5 +84,4 @@ public function delete($entity, $id) { // TODO: Implement delete() method. } - } diff --git a/src/Phpro/SmartCrud/Listener/BjyAuthorize.php b/src/Phpro/SmartCrud/Listener/BjyAuthorize.php index 579b11e..bf1408e 100644 --- a/src/Phpro/SmartCrud/Listener/BjyAuthorize.php +++ b/src/Phpro/SmartCrud/Listener/BjyAuthorize.php @@ -22,7 +22,6 @@ class BjyAuthorize extends AbstractListenerAggregate implements FactoryInterface { - /** * Set the priority of the listeners */ @@ -149,5 +148,4 @@ public function isAllowed($resource, $privilege) return $allowed; } - } diff --git a/src/Phpro/SmartCrud/Listener/FlashMessenger.php b/src/Phpro/SmartCrud/Listener/FlashMessenger.php index c7e104c..f8fd511 100644 --- a/src/Phpro/SmartCrud/Listener/FlashMessenger.php +++ b/src/Phpro/SmartCrud/Listener/FlashMessenger.php @@ -16,7 +16,6 @@ class FlashMessenger extends AbstractListenerAggregate implements FactoryInterface { - /** * Set the priority of the listeners */ @@ -111,5 +110,4 @@ public function deleteFailed(CrudEvent $e) { $this->getFlashMessenger()->addErrorMessage('Could not delete the record.'); } - } diff --git a/src/Phpro/SmartCrud/Module.php b/src/Phpro/SmartCrud/Module.php index 57607a0..0476221 100644 --- a/src/Phpro/SmartCrud/Module.php +++ b/src/Phpro/SmartCrud/Module.php @@ -22,9 +22,7 @@ class Module implements AutoloaderProviderInterface, BootstrapListenerInterface, ConfigProviderInterface - { - /** * @inheritdoc */ @@ -81,5 +79,4 @@ public function loadCli(EventInterface $event) $helperSet->set(new \Phpro\SmartCrud\Console\Helper\GatewayListHelper()); $helperSet->set(new \Phpro\SmartCrud\Console\Helper\ModuleListHelper()); } - } diff --git a/src/Phpro/SmartCrud/Query/DoctrineProvider.php b/src/Phpro/SmartCrud/Query/DoctrineProvider.php index 5ce5566..e362384 100644 --- a/src/Phpro/SmartCrud/Query/DoctrineProvider.php +++ b/src/Phpro/SmartCrud/Query/DoctrineProvider.php @@ -2,6 +2,7 @@ namespace Phpro\SmartCrud\Query; + use Doctrine\Common\Persistence\ObjectRepository; /** @@ -11,7 +12,6 @@ */ class DoctrineProvider implements QueryProviderInterface { - /** * @var ObjectRepository */ @@ -34,5 +34,4 @@ public function createQuery($data) $query = $qb->getQuery(); return $query; } - } diff --git a/src/Phpro/SmartCrud/Query/QueryProviderAwareInterface.php b/src/Phpro/SmartCrud/Query/QueryProviderAwareInterface.php index 8b5f924..7d32278 100644 --- a/src/Phpro/SmartCrud/Query/QueryProviderAwareInterface.php +++ b/src/Phpro/SmartCrud/Query/QueryProviderAwareInterface.php @@ -5,7 +5,6 @@ interface QueryProviderAwareInterface { - /** * @param QueryProviderInterface $queryProvider */ @@ -15,5 +14,4 @@ public function setQueryProvider($queryProvider); * @return QueryProviderInterface */ public function getQueryProvider(); - } diff --git a/src/Phpro/SmartCrud/Query/QueryProviderInterface.php b/src/Phpro/SmartCrud/Query/QueryProviderInterface.php index 21bad7a..0add472 100644 --- a/src/Phpro/SmartCrud/Query/QueryProviderInterface.php +++ b/src/Phpro/SmartCrud/Query/QueryProviderInterface.php @@ -9,7 +9,6 @@ */ interface QueryProviderInterface { - /** * This method creates a query * @@ -17,5 +16,4 @@ interface QueryProviderInterface * @return mixed */ public function createQuery($data); - } diff --git a/src/Phpro/SmartCrud/Service/AbstractSmartService.php b/src/Phpro/SmartCrud/Service/AbstractSmartService.php index 0830bac..651f888 100644 --- a/src/Phpro/SmartCrud/Service/AbstractSmartService.php +++ b/src/Phpro/SmartCrud/Service/AbstractSmartService.php @@ -229,7 +229,6 @@ public function setForm($form) */ public function getForm($entity) { - if ($this->form->hasValidated()) { return $this->form; } @@ -268,6 +267,4 @@ public function getOptions() { return $this->options; } - - } diff --git a/src/Phpro/SmartCrud/Service/AbstractSmartServiceFactory.php b/src/Phpro/SmartCrud/Service/AbstractSmartServiceFactory.php index 109fb4c..6e5ae3f 100644 --- a/src/Phpro/SmartCrud/Service/AbstractSmartServiceFactory.php +++ b/src/Phpro/SmartCrud/Service/AbstractSmartServiceFactory.php @@ -16,7 +16,6 @@ class AbstractSmartServiceFactory implements AbstractFactoryInterface, ServiceLocatorAwareInterface { - /** * The config key in the service manager */ @@ -135,7 +134,6 @@ public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator */ public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) { - $this->setServiceLocator($serviceLocator); $serviceAndAction = explode('::',$requestedName); @@ -339,5 +337,4 @@ public function getServiceLocator() { return $this->serviceLocator; } - } diff --git a/src/Phpro/SmartCrud/Service/CreateService.php b/src/Phpro/SmartCrud/Service/CreateService.php index 01e9f52..cc374f0 100644 --- a/src/Phpro/SmartCrud/Service/CreateService.php +++ b/src/Phpro/SmartCrud/Service/CreateService.php @@ -18,7 +18,6 @@ */ class CreateService extends AbstractSmartService { - /** * @param $id * @param array $data @@ -27,7 +26,6 @@ class CreateService extends AbstractSmartService */ public function run($id = null, $data = null) { - $result = $this->getResult(); $em = $this->getEventManager(); $entity = $this->loadEntity($id); @@ -42,7 +40,6 @@ public function run($id = null, $data = null) $result->setSuccess($this->getGateway()->create($entity, $data)); $em->trigger($this->createEvent(CrudEvent::AFTER_CREATE, $entity)); } else { - $em->trigger($this->createEvent(CrudEvent::INVALID_CREATE, $form)); } } @@ -51,5 +48,4 @@ public function run($id = null, $data = null) $result->setForm($form); return $result; } - } diff --git a/src/Phpro/SmartCrud/Service/DeleteService.php b/src/Phpro/SmartCrud/Service/DeleteService.php index 47b835f..061e25a 100644 --- a/src/Phpro/SmartCrud/Service/DeleteService.php +++ b/src/Phpro/SmartCrud/Service/DeleteService.php @@ -18,7 +18,6 @@ */ class DeleteService extends AbstractSmartService { - /** * @param null $id * @param null $data @@ -46,5 +45,4 @@ public function run($id = null, $data = null) $result->setSuccess($deleted); return $result; } - } diff --git a/src/Phpro/SmartCrud/Service/ListService.php b/src/Phpro/SmartCrud/Service/ListService.php index 2fd3fa6..90ae82b 100644 --- a/src/Phpro/SmartCrud/Service/ListService.php +++ b/src/Phpro/SmartCrud/Service/ListService.php @@ -25,7 +25,6 @@ class ListService extends AbstractSmartService PaginatorFactoryAwareInterface, QueryProviderAwareInterface { - /** * @var PaginatorServiceFactory */ @@ -78,7 +77,6 @@ public function getQueryProvider() */ public function run($id, $data) { - $result = $this->getResult(); $em = $this->getEventManager(); $em->trigger($this->createEvent(CrudEvent::BEFORE_LIST, null)); @@ -103,7 +101,6 @@ public function run($id, $data) */ public function getPaginator($records, $data) { - $options = $this->getOptions(); if (!isset($options['paginator'])) { throw new SmartCrudException('The CRUD list service needs paginator configuration.'); diff --git a/src/Phpro/SmartCrud/Service/PaginatorFactoryAwareInterface.php b/src/Phpro/SmartCrud/Service/PaginatorFactoryAwareInterface.php index 12291bc..a05e643 100644 --- a/src/Phpro/SmartCrud/Service/PaginatorFactoryAwareInterface.php +++ b/src/Phpro/SmartCrud/Service/PaginatorFactoryAwareInterface.php @@ -9,7 +9,6 @@ */ interface PaginatorFactoryAwareInterface { - /** * @param PaginatorServiceFactory $paginatorFactory * @@ -21,5 +20,4 @@ public function setPaginatorFactory($paginatorFactory); * @return PaginatorServiceFactory */ public function getPaginatorFactory(); - } diff --git a/src/Phpro/SmartCrud/Service/PaginatorServiceFactory.php b/src/Phpro/SmartCrud/Service/PaginatorServiceFactory.php index 68899a1..79a91e2 100644 --- a/src/Phpro/SmartCrud/Service/PaginatorServiceFactory.php +++ b/src/Phpro/SmartCrud/Service/PaginatorServiceFactory.php @@ -12,7 +12,6 @@ */ class PaginatorServiceFactory { - const CONFIG_ADAPTER_CLASS = 'adapter_class'; const CONFIG_PAGE_SIZE = 'page_size'; const CONFIG_QUERY_KEY = 'query_key'; @@ -68,5 +67,4 @@ public function createPaginator($resultSet, $options, $params) return $paginator; } - } diff --git a/src/Phpro/SmartCrud/Service/ParametersService.php b/src/Phpro/SmartCrud/Service/ParametersService.php index 4c231d7..0d97c32 100644 --- a/src/Phpro/SmartCrud/Service/ParametersService.php +++ b/src/Phpro/SmartCrud/Service/ParametersService.php @@ -131,5 +131,4 @@ public function fromRoute($name = null, $default = null) { return $this->proxyToPlugin('fromRoute', array($name, $default)); } - } diff --git a/src/Phpro/SmartCrud/Service/ReadService.php b/src/Phpro/SmartCrud/Service/ReadService.php index 30affcf..3ca4111 100644 --- a/src/Phpro/SmartCrud/Service/ReadService.php +++ b/src/Phpro/SmartCrud/Service/ReadService.php @@ -18,7 +18,6 @@ */ class ReadService extends AbstractSmartService { - /** * @return mixed */ diff --git a/src/Phpro/SmartCrud/Service/SmartServiceInterface.php b/src/Phpro/SmartCrud/Service/SmartServiceInterface.php index acb9187..21430c4 100644 --- a/src/Phpro/SmartCrud/Service/SmartServiceInterface.php +++ b/src/Phpro/SmartCrud/Service/SmartServiceInterface.php @@ -10,7 +10,6 @@ interface SmartServiceInterface { - /** * @param int $id * @param array|\Traversable $data @@ -51,5 +50,4 @@ public function setGateway($gateway); * @return \Zend\EventManager\EventManager */ public function getEventManager(); - } diff --git a/src/Phpro/SmartCrud/Service/UpdateService.php b/src/Phpro/SmartCrud/Service/UpdateService.php index b74dd04..9412bfb 100644 --- a/src/Phpro/SmartCrud/Service/UpdateService.php +++ b/src/Phpro/SmartCrud/Service/UpdateService.php @@ -26,7 +26,6 @@ class UpdateService extends AbstractSmartService */ public function run($id = null, $data = null) { - $result = $this->getResult(); $em = $this->getEventManager(); $entity = $this->loadEntity($id); @@ -41,7 +40,6 @@ public function run($id = null, $data = null) $result->setSuccess($this->getGateway()->update($entity, $data)); $em->trigger($this->createEvent(CrudEvent::AFTER_UPDATE, $entity)); } else { - $em->trigger($this->createEvent(CrudEvent::INVALID_UPDATE, $form)); } } @@ -50,5 +48,4 @@ public function run($id = null, $data = null) $result->setForm($form); return $result; } - } diff --git a/src/Phpro/SmartCrud/View/Model/ViewModelBuilder.php b/src/Phpro/SmartCrud/View/Model/ViewModelBuilder.php index 62f70ad..d0af913 100644 --- a/src/Phpro/SmartCrud/View/Model/ViewModelBuilder.php +++ b/src/Phpro/SmartCrud/View/Model/ViewModelBuilder.php @@ -13,7 +13,6 @@ */ class ViewModelBuilder { - /** @var string */ private $template = 'phpro-smartcrud/%s';