Completed
Push — develop ( 39c196...b11cac )
by Carsten
26:33
created
module/Core/src/Core/Repository/Filter/PropertyToKeywords.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@
 block discarded – undo
48 48
         $innerPattern = StringUtils::hasPcreUnicodeSupport()
49 49
                       ? '[^\p{L}]'
50 50
                       : '[^a-z0-9ßäöü ]';
51
-        $pattern      = '~' . $innerPattern . '~isu';
52
-        $stripPattern = '~^' . $innerPattern . '+|' . $innerPattern . '+$~isu';
51
+        $pattern      = '~'.$innerPattern.'~isu';
52
+        $stripPattern = '~^'.$innerPattern.'+|'.$innerPattern.'+$~isu';
53 53
         $parts     = array();
54 54
         $textParts = explode(' ', $string);
55 55
         foreach ($textParts as $part) {
Please login to merge, or discard this patch.
module/Core/src/Core/Repository/DoctrineMongoODM/Event/EventArgs.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function get($key)
23 23
     {
24 24
         if (!isset($this->values[$key])) {
25
-            throw new \OutOfBoundsException('Invalid key "' . $key . '"');
25
+            throw new \OutOfBoundsException('Invalid key "'.$key.'"');
26 26
         }
27 27
         return $this->values[$key];
28 28
     }
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
     
46 46
     public function __call($method, $params)
47 47
     {
48
-        $type   = substr($method, 0, 3);
48
+        $type = substr($method, 0, 3);
49 49
         
50 50
         if ('get' == $type || 'set' == $type) {
51
-            $filter = function ($match) {
52
-                return '_' . strtolower($match[0]);
51
+            $filter = function($match) {
52
+                return '_'.strtolower($match[0]);
53 53
             };
54 54
             $key = lcfirst(substr($method, 3));
55 55
             $key = preg_replace_callback('~([A-Z])~', $filter, $key);
@@ -57,6 +57,6 @@  discard block
 block discarded – undo
57 57
             return 'get' == $type ? $this->get($key) : $this->set($key, (isset($params[0]) ? $params[0] : null));
58 58
         }
59 59
         
60
-        throw new \BadMethodCallException('Unknown method: ' . $method);
60
+        throw new \BadMethodCallException('Unknown method: '.$method);
61 61
     }
62 62
 }
Please login to merge, or discard this patch.
Core/src/Core/Repository/DoctrineMongoODM/Types/TimezoneAwareDate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function closureToDatabase()
72 72
     {
73 73
         return '
74
-            /* CODE FROM: ' . __METHOD__ . ' */
74
+            /* CODE FROM: ' . __METHOD__.' */
75 75
             if (!$value instanceOf \DateTime) return null;
76 76
             $return = array(
77 77
                 "date" => new \MongoDate($value->getTimestamp()), 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function closureToPhp()
114 114
     {
115 115
         return '
116
-            /* CODE FROM: ' . __METHOD__ . ' */
116
+            /* CODE FROM: ' . __METHOD__.' */
117 117
             if (!is_array($value) 
118 118
                 || !isset($value["date"]) 
119 119
                 || !$value["date"] instanceOf \MongoDate
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/NotificationAjaxHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
                 $notifications = $event->getNotifications();
42 42
                 if (is_array($notifications) && !empty($notifications)) {
43 43
                     foreach ($notifications as $notification) {
44
-                        $headScript->appendScript('/* ' . $notification->getNotification() . ' */');
44
+                        $headScript->appendScript('/* '.$notification->getNotification().' */');
45 45
                     }
46 46
                 }
47 47
             }
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/CreatePaginator.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,8 @@
 block discarded – undo
71 71
         /* @var $paginator \Zend\Paginator\Paginator */
72 72
         $paginator = $paginators->get($paginatorName, $params);
73 73
         $paginator->setCurrentPageNumber(isset($params['page']) ? $params['page'] : 1)
74
-                  ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
75
-                  ->setPageRange(isset($params['range']) ? $params['range'] : 5);
74
+                    ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
75
+                    ->setPageRange(isset($params['range']) ? $params['range'] : 5);
76 76
 
77 77
         return $paginator;
78 78
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,16 +90,16 @@
 block discarded – undo
90 90
         /* @var \Zend\Paginator\Paginator $paginator */
91 91
         /* @var CreatePaginatorEvent $event */
92 92
         $events = $this->serviceManager->get('Core/CreatePaginator/Events');
93
-        $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR,$this,[
93
+        $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR, $this, [
94 94
             'paginatorParams' => $params,
95 95
             'paginators' => $paginators,
96 96
             'paginatorName' => $paginatorName
97 97
         ]);
98 98
         $events->trigger($event);
99 99
         $paginator = $event->getPaginator();
100
-        if(!$paginator instanceof Paginator){
100
+        if (!$paginator instanceof Paginator) {
101 101
             // no paginator created by listener, so let's create default paginator
102
-            $paginator = $paginators->get($paginatorName,$params);
102
+            $paginator = $paginators->get($paginatorName, $params);
103 103
         }
104 104
         $paginator->setCurrentPageNumber(isset($params['page']) ? $params['page'] : 1)
105 105
                   ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/Mail.php 3 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -69,18 +69,18 @@  discard block
 block discarded – undo
69 69
         $replyTo = $this->stringFromMailHeader($this->getReplyTo());
70 70
         
71 71
         return str_pad($template, 30)
72
-                . 'to: ' . str_pad($to, 50)
73
-                . 'cc: ' . str_pad($cc, 50)
74
-                . 'bcc: ' . str_pad($bcc, 50)
75
-                . 'from: ' . str_pad($from, 50)
76
-                . 'replyTo: ' . str_pad($replyTo, 50)
72
+                . 'to: '.str_pad($to, 50)
73
+                . 'cc: '.str_pad($cc, 50)
74
+                . 'bcc: '.str_pad($bcc, 50)
75
+                . 'from: '.str_pad($from, 50)
76
+                . 'replyTo: '.str_pad($replyTo, 50)
77 77
                 //. str_pad(implode(',', ArrayUtils::iteratorToArray($this->getSender())),50)
78
-                . 'subject: ' . str_pad($this->getSubject(), 50);
78
+                . 'subject: '.str_pad($this->getSubject(), 50);
79 79
     }
80 80
     
81 81
     public function template($template)
82 82
     {
83
-        $controller =  get_class($this->controller);
83
+        $controller = get_class($this->controller);
84 84
         $services = $this->getController()->getServiceLocator();
85 85
         
86 86
         $event = new Event();
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
         $controllerIdentifier = strtolower(substr($controller, 0, strpos($controller, '\\')));
98 98
         $viewResolver = $this->getController()->getServiceLocator()->get('ViewResolver');
99 99
                 
100
-        $templateHalf = 'mail/' . $template;
100
+        $templateHalf = 'mail/'.$template;
101 101
         $resource = $viewResolver->resolve($templateHalf);
102 102
         
103 103
         if (empty($resource)) {
104
-            $templateFull = $controllerIdentifier . '/mail/' . $template;
104
+            $templateFull = $controllerIdentifier.'/mail/'.$template;
105 105
             $resource = $viewResolver->resolve($templateFull);
106 106
         }
107 107
         
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                     unset($__vars[$key]);
129 129
                 }
130 130
             }
131
-            unset($__vars['content'],$__vars['controllerIdentifier'],$__vars['controller'],$__vars['resource'],$__vars['template'],$__vars['viewResolver']);
131
+            unset($__vars['content'], $__vars['controllerIdentifier'], $__vars['controller'], $__vars['resource'], $__vars['template'], $__vars['viewResolver']);
132 132
             $this->config = $__vars;
133 133
         }
134 134
     }
@@ -153,20 +153,20 @@  discard block
 block discarded – undo
153 153
         if (isset($this->config['from'])) {
154 154
             $from = $this->config['from'];
155 155
         } else {
156
-            $log->err('A from email address must be provided (Variable $from) in Template: ' . $template);
157
-              throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template);
156
+            $log->err('A from email address must be provided (Variable $from) in Template: '.$template);
157
+              throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: '.$template);
158 158
         }
159 159
         if (isset($this->config['fromName'])) {
160 160
             $fromName = $this->config['fromName'];
161 161
         } else {
162
-            $log->err('A from name must be provided (Variable $fromName) in Template: ' . $template);
163
-              throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template);
162
+            $log->err('A from name must be provided (Variable $fromName) in Template: '.$template);
163
+              throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: '.$template);
164 164
         }
165 165
         if (isset($this->config['subject'])) {
166 166
             $subject = $this->config['subject'];
167 167
         } else {
168
-            $log->err('A subject must be provided (Variable $subject) in Template: ' . $template);
169
-              throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: ' . $template);
168
+            $log->err('A subject must be provided (Variable $subject) in Template: '.$template);
169
+              throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: '.$template);
170 170
         }
171 171
         $this->setFrom($from, $fromName);
172 172
         $this->setSubject($subject);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
             $erg = true;
189 189
             $log->info($this);
190 190
         } catch (Exception $e) {
191
-            $log->err('Mail failure ' . $e->getMessage());
191
+            $log->err('Mail failure '.$e->getMessage());
192 192
             //$this->getController()->getServiceLocator()->get('Core/Log')->warn('Mail failure ' . $e->getMessage());
193 193
         }
194 194
         //}
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         } elseif (isset($this->config['templateHalf'])) {
169 169
             $template = $this->config['templateHalf'];
170 170
         } else {
171
-              throw new \InvalidArgumentException('Not template provided for Mail.');
171
+                throw new \InvalidArgumentException('Not template provided for Mail.');
172 172
         }
173 173
         return $template;
174 174
     }
@@ -181,19 +181,19 @@  discard block
 block discarded – undo
181 181
             $from = $this->config['from'];
182 182
         } else {
183 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);
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 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);
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 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);
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);
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -72,6 +72,9 @@  discard block
 block discarded – undo
72 72
         return $this;
73 73
     }
74 74
     
75
+    /**
76
+     * @param AddressList $header
77
+     */
75 78
     protected function stringFromMailHeader($header)
76 79
     {
77 80
         $erg = '';
@@ -160,6 +163,9 @@  discard block
 block discarded – undo
160 163
         }
161 164
     }
162 165
     
166
+    /**
167
+     * @return string
168
+     */
163 169
     protected function getTemplate()
164 170
     {
165 171
         $template = null;
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/ContentController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     public function indexAction()
29 29
     {
30 30
         $view = $this->params('view');
31
-        $view = 'content/' . $view;
31
+        $view = 'content/'.$view;
32 32
 
33 33
         $viewModel = new ViewModel();
34 34
         $viewModel->setTemplate($view);
Please login to merge, or discard this patch.
module/Core/src/Core/Factory/Paginator/RepositoryAbstractFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,10 +93,10 @@
 block discarded – undo
93 93
         $queryBuilder->find($this->getEntityClassName($requestedName));
94 94
 
95 95
         $filterManager = $services->get('FilterManager');
96
-        $filterName    = 'PaginationQuery/' . $requestedName;
96
+        $filterName    = 'PaginationQuery/'.$requestedName;
97 97
 
98 98
         if ($filterManager->has($filterName)) {
99
-            $filter       = $filterManager->get('PaginationQuery/' . $requestedName);
99
+            $filter       = $filterManager->get('PaginationQuery/'.$requestedName);
100 100
             $queryBuilder = $filter->filter($this->options, $queryBuilder);
101 101
         }
102 102
 
Please login to merge, or discard this patch.
module/Core/src/Core/Mail/StringTemplateMessage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                 throw new \InvalidArgumentException(
40 40
                     sprintf(
41 41
                         'Expect an array or an instance of \Traversable, but received %s',
42
-                        is_object($variables) ? 'instance of ' . get_class($variables) : 'skalar'
42
+                        is_object($variables) ? 'instance of '.get_class($variables) : 'skalar'
43 43
                     )
44 44
                 );
45 45
             }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 throw new \InvalidArgumentException(
70 70
                     sprintf(
71 71
                         'Expect an array or an instance of \Traversable, but received %s',
72
-                        is_object($callbacks) ? 'instance of ' . get_class($callbacks) : 'skalar'
72
+                        is_object($callbacks) ? 'instance of '.get_class($callbacks) : 'skalar'
73 73
                     )
74 74
                 );
75 75
             }
@@ -141,6 +141,6 @@  discard block
 block discarded – undo
141 141
     
142 142
     protected function getNamePattern($name)
143 143
     {
144
-        return '~##' . preg_quote($name) . '##~is';
144
+        return '~##'.preg_quote($name).'##~is';
145 145
     }
146 146
 }
Please login to merge, or discard this patch.