Completed
Pull Request — develop (#455)
by ANTHONIUS
24:00
created
module/Core/src/Core/Paginator/PaginatorFactoryAbstract.php 1 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/Paginator/PaginatorService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 	    array $configuration = array()
40 40
     )
41 41
     {
42
-        parent::__construct($container,$configuration);
42
+        parent::__construct($container, $configuration);
43 43
         $this->container = $container;
44 44
     }
45 45
 	
Please login to merge, or discard this patch.
module/Core/src/Core/Service/Tracy.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         /** @var Logger $logger */
37 37
         $logger = Debugger::getLogger();
38 38
         $logger->emailSnooze = $config['email_snooze'];
39
-        $logger->mailer = function ($message, $email) use ($logger)
39
+        $logger->mailer = function($message, $email) use ($logger)
40 40
         {
41 41
             $exceptionFile = null;
42 42
             
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
                 $tmp = [];
46 46
                 while ($message) {
47 47
                     $tmp[] = ($message instanceof \ErrorException
48
-                        ? Helpers::errorTypeToString($message->getSeverity()) . ': ' . $message->getMessage()
49
-                        : Helpers::getClass($message) . ': ' . $message->getMessage() . ($message->getCode() ? ' #' . $message->getCode() : '')
50
-                    ) . ' in ' . $message->getFile() . ':' . $message->getLine();
48
+                        ? Helpers::errorTypeToString($message->getSeverity()).': '.$message->getMessage()
49
+                        : Helpers::getClass($message).': '.$message->getMessage().($message->getCode() ? ' #'.$message->getCode() : '')
50
+                    ).' in '.$message->getFile().':'.$message->getLine();
51 51
                     $message = $message->getPrevious();
52 52
                 }
53 53
                 $message = implode("\ncaused by ", $tmp);
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             $host = preg_replace('#[^\w.-]+#', '', isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : php_uname('n'));
65 65
             $mimeMessage = new Mime\Message();
66 66
             
67
-            $text = new Mime\Part($message . "\n\nsource: " . Helpers::getSource());
67
+            $text = new Mime\Part($message."\n\nsource: ".Helpers::getSource());
68 68
             $text->type = Mime\Mime::TYPE_TEXT;
69 69
             $text->charset = 'utf-8';
70 70
             $mimeMessage->addPart($text);
Please login to merge, or discard this patch.
module/Core/src/Core/EventManager/ListenerAggregateTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 {
51 51
     use ZfListenerAggregateTrait;
52 52
 
53
-    public function attach(EventManagerInterface $events, $priority=1)
53
+    public function attach(EventManagerInterface $events, $priority = 1)
54 54
     {
55 55
         return $this->attachEvents($events);
56 56
     }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             $method = $spec[1];
90 90
             $priority = isset($spec[2]) ? $spec[2] : 0;
91 91
 
92
-            $this->listeners[] = $events->attach($event, [ $this, $method ], $priority);
92
+            $this->listeners[] = $events->attach($event, [$this, $method], $priority);
93 93
         }
94 94
 
95 95
         return $this;
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/FileController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		$repositories = $container->get('repositories');
44 44
 		$coreFileEvents = $container->get('Core/File/Events');
45 45
 		
46
-		return new static($repositories,$coreFileEvents);
46
+		return new static($repositories, $coreFileEvents);
47 47
 	}
48 48
 	
49 49
 	public function __construct(
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $response      = $this->getResponse();
79 79
 
80 80
         try {
81
-            $repository = $this->repositories->get($module . '/' . $entityName);
81
+            $repository = $this->repositories->get($module.'/'.$entityName);
82 82
         } catch (\Exception $e) {
83 83
             $response->setStatusCode(404);
84 84
             $this->getEvent()->setParam('exception', $e);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         
113 113
         $this->acl($file);
114 114
 
115
-        $headers=$response->getHeaders();
115
+        $headers = $response->getHeaders();
116 116
 
117 117
         $headers->addHeaderline('Content-Type', $file->getType())
118 118
             ->addHeaderline('Content-Length', $file->getLength());
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/ConfigFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 class ConfigFactory implements FactoryInterface
17 17
 {
18
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
18
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
19 19
 	{
20 20
 		$config = $container->get('Config');
21 21
 		$plugin = new Config($config);
@@ -31,6 +31,6 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function createService(ServiceLocatorInterface $serviceLocator)
33 33
     {
34
-        return $this($serviceLocator,Config::class);
34
+        return $this($serviceLocator, Config::class);
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/Mail.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -96,18 +96,18 @@  discard block
 block discarded – undo
96 96
         $replyTo = $this->stringFromMailHeader($this->getReplyTo());
97 97
         
98 98
         return str_pad($template, 30)
99
-                . 'to: ' . str_pad($to, 50)
100
-                . 'cc: ' . str_pad($cc, 50)
101
-                . 'bcc: ' . str_pad($bcc, 50)
102
-                . 'from: ' . str_pad($from, 50)
103
-                . 'replyTo: ' . str_pad($replyTo, 50)
99
+                . 'to: '.str_pad($to, 50)
100
+                . 'cc: '.str_pad($cc, 50)
101
+                . 'bcc: '.str_pad($bcc, 50)
102
+                . 'from: '.str_pad($from, 50)
103
+                . 'replyTo: '.str_pad($replyTo, 50)
104 104
                 //. str_pad(implode(',', ArrayUtils::iteratorToArray($this->getSender())),50)
105
-                . 'subject: ' . str_pad($this->getSubject(), 50);
105
+                . 'subject: '.str_pad($this->getSubject(), 50);
106 106
     }
107 107
     
108 108
     public function template($template)
109 109
     {
110
-        $controller =  get_class($this->controller);
110
+        $controller = get_class($this->controller);
111 111
         $services = $this->serviceManager;
112 112
         
113 113
         $event = new Event();
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
         $controllerIdentifier = strtolower(substr($controller, 0, strpos($controller, '\\')));
125 125
         $viewResolver = $this->serviceManager->get('ViewResolver');
126 126
                 
127
-        $templateHalf = 'mail/' . $template;
127
+        $templateHalf = 'mail/'.$template;
128 128
         $resource = $viewResolver->resolve($templateHalf);
129 129
         
130 130
         if (empty($resource)) {
131
-            $templateFull = $controllerIdentifier . '/mail/' . $template;
131
+            $templateFull = $controllerIdentifier.'/mail/'.$template;
132 132
             $resource = $viewResolver->resolve($templateFull);
133 133
         }
134 134
         
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                     unset($__vars[$key]);
156 156
                 }
157 157
             }
158
-            unset($__vars['content'],$__vars['controllerIdentifier'],$__vars['controller'],$__vars['resource'],$__vars['template'],$__vars['viewResolver']);
158
+            unset($__vars['content'], $__vars['controllerIdentifier'], $__vars['controller'], $__vars['resource'], $__vars['template'], $__vars['viewResolver']);
159 159
             $this->config = $__vars;
160 160
         }
161 161
     }
@@ -180,20 +180,20 @@  discard block
 block discarded – undo
180 180
         if (isset($this->config['from'])) {
181 181
             $from = $this->config['from'];
182 182
         } else {
183
-            $log->err('A from email address must be provided (Variable $from) in Template: ' . $template);
184
-              throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template);
183
+            $log->err('A from email address must be provided (Variable $from) in Template: '.$template);
184
+              throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: '.$template);
185 185
         }
186 186
         if (isset($this->config['fromName'])) {
187 187
             $fromName = $this->config['fromName'];
188 188
         } else {
189
-            $log->err('A from name must be provided (Variable $fromName) in Template: ' . $template);
190
-              throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template);
189
+            $log->err('A from name must be provided (Variable $fromName) in Template: '.$template);
190
+              throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: '.$template);
191 191
         }
192 192
         if (isset($this->config['subject'])) {
193 193
             $subject = $this->config['subject'];
194 194
         } else {
195
-            $log->err('A subject must be provided (Variable $subject) in Template: ' . $template);
196
-              throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: ' . $template);
195
+            $log->err('A subject must be provided (Variable $subject) in Template: '.$template);
196
+              throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: '.$template);
197 197
         }
198 198
         $this->setFrom($from, $fromName);
199 199
         $this->setSubject($subject);
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
             $erg = true;
216 216
             $log->info($this);
217 217
         } catch (\Exception $e) {
218
-            $log->err('Mail failure ' . $e->getMessage());
218
+            $log->err('Mail failure '.$e->getMessage());
219 219
         }
220 220
         return $erg;
221 221
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/CreatePaginator.php 1 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/Controller/Plugin/Service/EntitySnapshotFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 	 *
28 28
 	 * @return EntitySnapshot
29 29
 	 */
30
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
30
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
31 31
 	{
32 32
 		$entitySnapshotPlugin = new EntitySnapshot();
33 33
 		// @TODO actually we just need...
Please login to merge, or discard this patch.