Completed
Push — develop ( e70242...efddeb )
by Mathias
65:39 queued 53:48
created
module/Core/src/Core/Controller/Plugin/CreatePaginator.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,6 @@
 block discarded – undo
128 128
     }
129 129
     
130 130
     /**
131
-     * @param ControllerManager $controllerManager
132 131
      * @return CreatePaginator
133 132
      * @codeCoverageIgnore
134 133
      */
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
      */
45 45
     protected $request;
46 46
 	
47
-	/**
48
-	 * CreatePaginator constructor.
49
-	 *
50
-	 * @param ContainerInterface $container
51
-	 * @param HttpRequest $request
52
-	 */
47
+    /**
48
+     * CreatePaginator constructor.
49
+     *
50
+     * @param ContainerInterface $container
51
+     * @param HttpRequest $request
52
+     */
53 53
     public function __construct(ContainerInterface $container, HttpRequest $request)
54 54
     {
55 55
         $this->serviceManager = $container->get('ServiceManager');
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
         /* @var \Core\EventManager\EventManager $events */
106 106
         /* @var \Zend\Paginator\Paginator $paginator */
107 107
         /* @var CreatePaginatorEvent $event */
108
-	    $events = $this->serviceManager->get('Core/CreatePaginator/Events');
108
+        $events = $this->serviceManager->get('Core/CreatePaginator/Events');
109 109
 
110
-	    $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR,$this,[
110
+        $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR,$this,[
111 111
             'paginatorParams' => $params,
112 112
             'paginators' => $paginators,
113 113
             'paginatorName' => $paginatorName
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
             $paginator = $paginators->get($paginatorName,$params);
122 122
         }
123 123
         $paginator->setCurrentPageNumber(isset($params['page']) ? $params['page'] : 1)
124
-                  ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
125
-                  ->setPageRange(isset($params['range']) ? $params['range'] : 5);
124
+                    ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
125
+                    ->setPageRange(isset($params['range']) ? $params['range'] : 5);
126 126
 
127 127
         return $paginator;
128 128
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         /* @var CreatePaginatorEvent $event */
108 108
 	    $events = $this->serviceManager->get('Core/CreatePaginator/Events');
109 109
 
110
-	    $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR,$this,[
110
+	    $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR, $this, [
111 111
             'paginatorParams' => $params,
112 112
             'paginators' => $paginators,
113 113
             'paginatorName' => $paginatorName
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 
117 117
         $paginator = $event->getPaginator();
118 118
 
119
-        if(!$paginator instanceof Paginator){
119
+        if (!$paginator instanceof Paginator) {
120 120
             // no paginator created by listener, so let's create default paginator
121
-            $paginator = $paginators->get($paginatorName,$params);
121
+            $paginator = $paginators->get($paginatorName, $params);
122 122
         }
123 123
         $paginator->setCurrentPageNumber(isset($params['page']) ? $params['page'] : 1)
124 124
                   ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
Please login to merge, or discard this patch.
module/Core/src/Core/Factory/Service/RestClientFactory.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     }
59 59
 
60 60
     /**
61
-     * @return mixed
61
+     * @return null|string
62 62
      */
63 63
     abstract protected function getUri();
64 64
 
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -38,15 +38,15 @@
 block discarded – undo
38 38
      */
39 39
     protected $serviceLocator;
40 40
 	
41
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
42
-	{
43
-		$this->serviceLocator = $container;
44
-		$service = new RestClient($this->getUri(), $this->getConfig());
45
-		return $service;
46
-	}
41
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
42
+    {
43
+        $this->serviceLocator = $container;
44
+        $service = new RestClient($this->getUri(), $this->getConfig());
45
+        return $service;
46
+    }
47 47
 	
48 48
 	
49
-	/**
49
+    /**
50 50
      * Create the settings service
51 51
      *
52 52
      * @param  ServiceLocatorInterface $serviceLocator
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     protected $serviceLocator;
40 40
 	
41
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
41
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
42 42
 	{
43 43
 		$this->serviceLocator = $container;
44 44
 		$service = new RestClient($this->getUri(), $this->getConfig());
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function createService(ServiceLocatorInterface $serviceLocator)
56 56
     {
57
-        return $this($serviceLocator,RestClient::class);
57
+        return $this($serviceLocator, RestClient::class);
58 58
     }
59 59
 
60 60
     /**
Please login to merge, or discard this patch.
module/Core/src/Core/I18n/LocaleFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      * @param  string             $requestedName
32 32
      * @param  null|array         $options
33 33
      *
34
-     * @return object
34
+     * @return Locale
35 35
      * @throws ServiceNotFoundException if unable to resolve the service.
36 36
      * @throws ServiceNotCreatedException if an exception is raised when
37 37
      *     creating a service.
Please login to merge, or discard this patch.
module/Core/src/Core/Paginator/PaginatorFactoryAbstract.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,6 @@
 block discarded – undo
41 41
     }
42 42
 	
43 43
 	/**
44
-     * @param ContainerInterface $serviceLocator
45 44
      * @return mixed|Paginator
46 45
      */
47 46
     public function createService(ContainerInterface $container)
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,19 +28,19 @@
 block discarded – undo
28 28
 
29 29
     public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
30 30
     {
31
-	    /* @var PaginatorService $paginatorService */
32
-	    /* @var RepositoryService $repositories */
33
-	    $repositories   = $container->get('repositories');
34
-	    $repository     = $repositories->get($this->getRepository());
35
-	    $queryBuilder   = $repository->createQueryBuilder();
36
-	    $filter         = $container->get('FilterManager')->get($this->getFilter());
37
-	    $adapter        = new \Core\Paginator\Adapter\DoctrineMongoLateCursor($queryBuilder, $filter, $options);
38
-	    $service        = new Paginator($adapter);
31
+        /* @var PaginatorService $paginatorService */
32
+        /* @var RepositoryService $repositories */
33
+        $repositories   = $container->get('repositories');
34
+        $repository     = $repositories->get($this->getRepository());
35
+        $queryBuilder   = $repository->createQueryBuilder();
36
+        $filter         = $container->get('FilterManager')->get($this->getFilter());
37
+        $adapter        = new \Core\Paginator\Adapter\DoctrineMongoLateCursor($queryBuilder, $filter, $options);
38
+        $service        = new Paginator($adapter);
39 39
 	
40
-	    return $service;
40
+        return $service;
41 41
     }
42 42
 	
43
-	/**
43
+    /**
44 44
      * @param ContainerInterface $serviceLocator
45 45
      * @return mixed|Paginator
46 46
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 abstract class PaginatorFactoryAbstract implements FactoryInterface
27 27
 {
28 28
 
29
-    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
29
+    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
30 30
     {
31 31
 	    /* @var PaginatorService $paginatorService */
32 32
 	    /* @var RepositoryService $repositories */
Please login to merge, or discard this patch.
module/Core/src/Core/View/Helper/Services.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,6 @@
 block discarded – undo
86 86
     }
87 87
     
88 88
     /**
89
-     * @param HelperPluginManager $helperPluginManager
90 89
      * @return Services
91 90
      */
92 91
     public static function factory($sm)
Please login to merge, or discard this patch.
config/common.modules.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -11,23 +11,23 @@
 block discarded – undo
11 11
  */
12 12
 
13 13
 return array(
14
-	'Zend\ServiceManager\Di',
15
-	'Zend\Session',
16
-	'Zend\Router',
17
-	'Zend\Navigation',
18
-	'Zend\I18n',
19
-	'Zend\Filter',
20
-	'Zend\InputFilter',
21
-	'Zend\Form',
22
-	'Zend\Validator',
23
-	'Zend\Log',
24
-	'Zend\Mvc\Plugin\Prg',
25
-	'Zend\Mvc\Plugin\Identity',
26
-	'Zend\Mvc\Plugin\FlashMessenger',
27
-	'Zend\Mvc\I18n',
28
-	'Zend\Mvc\Console',
29
-	'Zend\Hydrator',
30
-	'Zend\Serializer',
31
-	'DoctrineModule',
32
-	'DoctrineMongoODMModule',
14
+    'Zend\ServiceManager\Di',
15
+    'Zend\Session',
16
+    'Zend\Router',
17
+    'Zend\Navigation',
18
+    'Zend\I18n',
19
+    'Zend\Filter',
20
+    'Zend\InputFilter',
21
+    'Zend\Form',
22
+    'Zend\Validator',
23
+    'Zend\Log',
24
+    'Zend\Mvc\Plugin\Prg',
25
+    'Zend\Mvc\Plugin\Identity',
26
+    'Zend\Mvc\Plugin\FlashMessenger',
27
+    'Zend\Mvc\I18n',
28
+    'Zend\Mvc\Console',
29
+    'Zend\Hydrator',
30
+    'Zend\Serializer',
31
+    'DoctrineModule',
32
+    'DoctrineMongoODMModule',
33 33
 );
34 34
\ No newline at end of file
Please login to merge, or discard this patch.
module/Install/src/Tracy.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -26,18 +26,18 @@
 block discarded – undo
26 26
      */
27 27
     public function register(array $config)
28 28
     {
29
-    	try{
30
-		    // enable logging of all error types globally
31
-		    Debugger::enable($config['mode'], $config['log'], $config['email']);
32
-		    Debugger::$strictMode = $config['strict'];
33
-		    Debugger::$showBar = $config['bar'];
29
+        try{
30
+            // enable logging of all error types globally
31
+            Debugger::enable($config['mode'], $config['log'], $config['email']);
32
+            Debugger::$strictMode = $config['strict'];
33
+            Debugger::$showBar = $config['bar'];
34 34
 		
35
-		    /** @var \Tracy\Logger $logger */
36
-		    $logger = Debugger::getLogger();
37
-		    $logger->emailSnooze = $config['email_snooze'];
38
-	    }catch (\Exception $e){
39
-    		throw $e;
40
-	    }
35
+            /** @var \Tracy\Logger $logger */
36
+            $logger = Debugger::getLogger();
37
+            $logger->emailSnooze = $config['email_snooze'];
38
+        }catch (\Exception $e){
39
+            throw $e;
40
+        }
41 41
      
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function register(array $config)
28 28
     {
29
-    	try{
29
+    	try {
30 30
 		    // enable logging of all error types globally
31 31
 		    Debugger::enable($config['mode'], $config['log'], $config['email']);
32 32
 		    Debugger::$strictMode = $config['strict'];
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		    /** @var \Tracy\Logger $logger */
36 36
 		    $logger = Debugger::getLogger();
37 37
 		    $logger->emailSnooze = $config['email_snooze'];
38
-	    }catch (\Exception $e){
38
+	    } catch (\Exception $e) {
39 39
     		throw $e;
40 40
 	    }
41 41
      
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 		    /** @var \Tracy\Logger $logger */
36 36
 		    $logger = Debugger::getLogger();
37 37
 		    $logger->emailSnooze = $config['email_snooze'];
38
-	    }catch (\Exception $e){
38
+	    } catch (\Exception $e){
39 39
     		throw $e;
40 40
 	    }
41 41
      
Please login to merge, or discard this patch.
module/Install/src/Listener/TracyListener.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -23,31 +23,31 @@
 block discarded – undo
23 23
  */
24 24
 class TracyListener implements ListenerAggregateInterface
25 25
 {
26
-	use ListenerAggregateTrait;
26
+    use ListenerAggregateTrait;
27 27
 	
28
-	/**
29
-	 * {@inheritDoc}
30
-	 * @see \Zend\EventManager\ListenerAggregateInterface::attach()
31
-	 */
32
-	public function attach(EventManagerInterface $events, $priority = 1)
33
-	{
34
-		$this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, [$this, 'handleError'], $priority);
35
-		$this->listeners[] = $events->attach(MvcEvent::EVENT_RENDER_ERROR, [$this, 'handleError'], $priority);
36
-	}
28
+    /**
29
+     * {@inheritDoc}
30
+     * @see \Zend\EventManager\ListenerAggregateInterface::attach()
31
+     */
32
+    public function attach(EventManagerInterface $events, $priority = 1)
33
+    {
34
+        $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, [$this, 'handleError'], $priority);
35
+        $this->listeners[] = $events->attach(MvcEvent::EVENT_RENDER_ERROR, [$this, 'handleError'], $priority);
36
+    }
37 37
 	
38
-	/**
39
-	 * @param MvcEvent $e
40
-	 */
41
-	public function handleError(MvcEvent $e)
42
-	{
43
-		if ($e->getError() == \Zend\Mvc\Application::ERROR_EXCEPTION) {
44
-			if (Debugger::$productionMode) {
45
-				// log an exception in production environment (this will send email as well if email address is set)
46
-				Debugger::log($e->getParam('exception'), Debugger::ERROR);
47
-			} else {
48
-				// just re-throw an exception in non-production environment to let tracy display so called blue screen
49
-				throw $e->getParam('exception');
50
-			}
51
-		}
52
-	}
38
+    /**
39
+     * @param MvcEvent $e
40
+     */
41
+    public function handleError(MvcEvent $e)
42
+    {
43
+        if ($e->getError() == \Zend\Mvc\Application::ERROR_EXCEPTION) {
44
+            if (Debugger::$productionMode) {
45
+                // log an exception in production environment (this will send email as well if email address is set)
46
+                Debugger::log($e->getParam('exception'), Debugger::ERROR);
47
+            } else {
48
+                // just re-throw an exception in non-production environment to let tracy display so called blue screen
49
+                throw $e->getParam('exception');
50
+            }
51
+        }
52
+    }
53 53
 }
Please login to merge, or discard this patch.
module/Install/src/Factory/Controller/LazyControllerFactory.php 3 patches
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -22,55 +22,55 @@
 block discarded – undo
22 22
  */
23 23
 class LazyControllerFactory implements AbstractFactoryInterface
24 24
 {
25
-	protected $aliases = [
26
-		FormElementManager::class => 'FormElementManager',
27
-		ValidatorPluginManager::class => 'ValidatorManager',
28
-		Translator::class => 'translator',
29
-	];
25
+    protected $aliases = [
26
+        FormElementManager::class => 'FormElementManager',
27
+        ValidatorPluginManager::class => 'ValidatorManager',
28
+        Translator::class => 'translator',
29
+    ];
30 30
 	
31
-	public function canCreate( ContainerInterface $container, $requestedName )
32
-	{
33
-		list( $module, ) = explode( '\\', __NAMESPACE__, 2 );
34
-		return strstr( $requestedName, $module . '\Controller') !== false;
35
-	}
31
+    public function canCreate( ContainerInterface $container, $requestedName )
32
+    {
33
+        list( $module, ) = explode( '\\', __NAMESPACE__, 2 );
34
+        return strstr( $requestedName, $module . '\Controller') !== false;
35
+    }
36 36
 	
37
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
38
-	{
39
-		$class = new \ReflectionClass($requestedName);
40
-		$parentLocator = $container;
41
-		if( $constructor = $class->getConstructor() )
42
-		{
43
-			if( $params = $constructor->getParameters() )
44
-			{
45
-				$parameter_instances = [];
46
-				foreach( $params as $p )
47
-				{
37
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
38
+    {
39
+        $class = new \ReflectionClass($requestedName);
40
+        $parentLocator = $container;
41
+        if( $constructor = $class->getConstructor() )
42
+        {
43
+            if( $params = $constructor->getParameters() )
44
+            {
45
+                $parameter_instances = [];
46
+                foreach( $params as $p )
47
+                {
48 48
 					
49
-					if( $p->getClass() ) {
50
-						$cn = $p->getClass()->getName();
51
-						if (array_key_exists($cn, $this->aliases)) {
52
-							$cn = $this->aliases[$cn];
53
-						}
49
+                    if( $p->getClass() ) {
50
+                        $cn = $p->getClass()->getName();
51
+                        if (array_key_exists($cn, $this->aliases)) {
52
+                            $cn = $this->aliases[$cn];
53
+                        }
54 54
 						
55
-						try {
56
-							$parameter_instances[] = $parentLocator->get($cn);
57
-						}
58
-						catch (\Exception $x) {
59
-							echo __CLASS__
60
-							     . " couldn't create an instance of $cn to satisfy the constructor for $requestedName.";
61
-							exit;
62
-						}
63
-					}
64
-					else{
65
-						if( $p->isArray() && $p->getName() == 'config' )
66
-							$parameter_instances[] = $parentLocator->get('config');
67
-					}
55
+                        try {
56
+                            $parameter_instances[] = $parentLocator->get($cn);
57
+                        }
58
+                        catch (\Exception $x) {
59
+                            echo __CLASS__
60
+                                    . " couldn't create an instance of $cn to satisfy the constructor for $requestedName.";
61
+                            exit;
62
+                        }
63
+                    }
64
+                    else{
65
+                        if( $p->isArray() && $p->getName() == 'config' )
66
+                            $parameter_instances[] = $parentLocator->get('config');
67
+                    }
68 68
 					
69
-				}
70
-				return $class->newInstanceArgs($parameter_instances);
71
-			}
72
-		}
69
+                }
70
+                return $class->newInstanceArgs($parameter_instances);
71
+            }
72
+        }
73 73
 		
74
-		return new $requestedName;
75
-	}
74
+        return new $requestedName;
75
+    }
76 76
 }
77 77
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,25 +28,25 @@  discard block
 block discarded – undo
28 28
 		Translator::class => 'translator',
29 29
 	];
30 30
 	
31
-	public function canCreate( ContainerInterface $container, $requestedName )
31
+	public function canCreate(ContainerInterface $container, $requestedName)
32 32
 	{
33
-		list( $module, ) = explode( '\\', __NAMESPACE__, 2 );
34
-		return strstr( $requestedName, $module . '\Controller') !== false;
33
+		list($module,) = explode('\\', __NAMESPACE__, 2);
34
+		return strstr($requestedName, $module.'\Controller') !== false;
35 35
 	}
36 36
 	
37
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
37
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
38 38
 	{
39 39
 		$class = new \ReflectionClass($requestedName);
40 40
 		$parentLocator = $container;
41
-		if( $constructor = $class->getConstructor() )
41
+		if ($constructor = $class->getConstructor())
42 42
 		{
43
-			if( $params = $constructor->getParameters() )
43
+			if ($params = $constructor->getParameters())
44 44
 			{
45 45
 				$parameter_instances = [];
46
-				foreach( $params as $p )
46
+				foreach ($params as $p)
47 47
 				{
48 48
 					
49
-					if( $p->getClass() ) {
49
+					if ($p->getClass()) {
50 50
 						$cn = $p->getClass()->getName();
51 51
 						if (array_key_exists($cn, $this->aliases)) {
52 52
 							$cn = $this->aliases[$cn];
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
 							exit;
62 62
 						}
63 63
 					}
64
-					else{
65
-						if( $p->isArray() && $p->getName() == 'config' )
64
+					else {
65
+						if ($p->isArray() && $p->getName() == 'config')
66 66
 							$parameter_instances[] = $parentLocator->get('config');
67 67
 					}
68 68
 					
Please login to merge, or discard this patch.
Braces   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,16 +54,15 @@
 block discarded – undo
54 54
 						
55 55
 						try {
56 56
 							$parameter_instances[] = $parentLocator->get($cn);
57
-						}
58
-						catch (\Exception $x) {
57
+						} catch (\Exception $x) {
59 58
 							echo __CLASS__
60 59
 							     . " couldn't create an instance of $cn to satisfy the constructor for $requestedName.";
61 60
 							exit;
62 61
 						}
63
-					}
64
-					else{
65
-						if( $p->isArray() && $p->getName() == 'config' )
66
-							$parameter_instances[] = $parentLocator->get('config');
62
+					} else{
63
+						if( $p->isArray() && $p->getName() == 'config' ) {
64
+													$parameter_instances[] = $parentLocator->get('config');
65
+						}
67 66
 					}
68 67
 					
69 68
 				}
Please login to merge, or discard this patch.