Completed
Pull Request — develop (#359)
by Mathias
23:51
created
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
             //$this->serviceManager->get('Core/Log')->warn('Mail failure ' . $e->getMessage());
220 220
         }
221 221
         //}
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/AdminControllerEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      *
62 62
      * @return self
63 63
      */
64
-    public function addViewModel($name, $model, $priority=0)
64
+    public function addViewModel($name, $model, $priority = 0)
65 65
     {
66 66
         $this->models->insert($name, $model, $priority);
67 67
 
Please login to merge, or discard this patch.
module/Core/src/Core/Repository/AbstractRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
 
131 131
     protected function checkEntityType($entity)
132 132
     {
133
-        if ( !($entity instanceOf $this->entityPrototype) ) {
133
+        if (!($entity instanceOf $this->entityPrototype)) {
134 134
             throw new \InvalidArgumentException(sprintf(
135 135
                                                     'Entity must be of type %s but recieved %s instead',
136 136
                                                     get_class($this->entityPrototype),
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/NotificationListener.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
      */
41 41
     public function attachShared(SharedEventManagerInterface $events)
42 42
     {
43
-        $events->attach('*', NotificationEvent::EVENT_NOTIFICATION_ADD, array($this,'add'), 1);
44
-        $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this,'renderJSON'), -240);
45
-        $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this,'renderHTML'), -250);
43
+        $events->attach('*', NotificationEvent::EVENT_NOTIFICATION_ADD, array($this, 'add'), 1);
44
+        $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this, 'renderJSON'), -240);
45
+        $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_DISPATCH, array($this, 'renderHTML'), -250);
46 46
         // Sometimes the Dispatch-Event is not reached, for instance with a route-direct
47 47
         // but also for Events, that are happening after the Dispatch
48
-        $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_FINISH, array($this,'renderHTML'), -250);
48
+        $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_FINISH, array($this, 'renderHTML'), -250);
49 49
         return $this;
50 50
     }
51 51
 
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/ToggleButton.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             if (null === $buttonContent) {
27 27
                 throw new Exception\DomainException(
28 28
                     sprintf(
29
-                        '%s expects either button content as the second argument, ' .
29
+                        '%s expects either button content as the second argument, '.
30 30
                         'or that the element provided has a label value; neither found',
31 31
                         __METHOD__
32 32
                     )
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $checkedBoole   = ($value == 1 || $value == 'on');
47 47
         
48 48
 
49
-        $checkedClass   = $checkedBoole?'active"':'';
49
+        $checkedClass   = $checkedBoole ? 'active"' : '';
50 50
 
51 51
         $hiddenElement = '';
52 52
         if ($element->useHiddenElement()) {
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
             $element->setUseHiddenElement(false);
64 64
         }
65 65
 
66
-        $buttonContent = $hiddenElement . PHP_EOL
67
-                . '<div class="btn-group" data-toggle="buttons">' . PHP_EOL
68
-                . '<label class="btn btn-default ' . $checkedClass . '">' . PHP_EOL
69
-                . parent::render($element) . $buttonContent . PHP_EOL . '</label>' . PHP_EOL
70
-                . '</div>' . PHP_EOL;
66
+        $buttonContent = $hiddenElement.PHP_EOL
67
+                . '<div class="btn-group" data-toggle="buttons">'.PHP_EOL
68
+                . '<label class="btn btn-default '.$checkedClass.'">'.PHP_EOL
69
+                . parent::render($element).$buttonContent.PHP_EOL.'</label>'.PHP_EOL
70
+                . '</div>'.PHP_EOL;
71 71
 
72 72
         return $buttonContent;
73 73
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/EntityInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
      * @throws \Core\Entity\Exception\OutOfBoundsException if the property does not exists.
73 73
      * @since 0.25
74 74
      */
75
-    public function notEmpty($property, array $args=[]);
75
+    public function notEmpty($property, array $args = []);
76 76
 
77 77
     /**
78 78
      * Checks, if this entity has a property.
Please login to merge, or discard this patch.
module/Settings/src/Settings/Controller/IndexController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $mvcEvent->setParam('__settings_active_module', $moduleName);
67 67
         
68 68
         $formManager = $this->serviceLocator->get('FormElementManager');
69
-        $formName = $moduleName . '/SettingsForm';
69
+        $formName = $moduleName.'/SettingsForm';
70 70
         if (!$formManager->has($formName)) {
71 71
             $formName = "Settings/Form";
72 72
         }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $valid   = $form->isValid();
89 89
             $partial = $services->get('viewhelpermanager')->get('partial');
90 90
             $text    = $valid
91
-                     ?  /*@translate*/'Changes successfully saved'
91
+                     ? /*@translate*/'Changes successfully saved'
92 92
                      :  /*@translate*/'Changes could not be saved';
93 93
 
94 94
             $vars = array();
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             return new JsonModel($vars);
109 109
         }
110 110
 
111
-        $vars['form']=$form;
111
+        $vars['form'] = $form;
112 112
         return $vars;
113 113
     }
114 114
 }
Please login to merge, or discard this patch.
module/Settings/src/Settings/Form/AbstractSettingsForm.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         }
57 57
         $this->setAttribute('method', 'post');
58 58
         $object = $this->getObject();
59
-        $fieldsetName = $object->getModuleName() . '/SettingsFieldset';
59
+        $fieldsetName = $object->getModuleName().'/SettingsFieldset';
60 60
         
61 61
         if ($this->formManager->has($fieldsetName)) {
62 62
             $fieldset = $this->formManager->get($fieldsetName);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $this->add($fieldset);
73 73
         
74 74
         $this->add($this->formManager->get('DefaultButtonsFieldset'));
75
-        $this->isBuild=true;
75
+        $this->isBuild = true;
76 76
     }
77 77
         
78 78
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     
91 91
     public function setName($name)
92 92
     {
93
-        parent::setName(strtolower($name) . '-settings');
93
+        parent::setName(strtolower($name).'-settings');
94 94
         $urlHelper = $this->formManager->getServiceLocator()
95 95
                      ->get('ViewHelperManager')
96 96
                      ->get('url');
Please login to merge, or discard this patch.
module/Settings/src/Settings/Form/SettingsFieldset.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 
75 75
             $inputLabel = isset($this->labelMap[$inputName]) ? $this->labelMap[$inputName] : $inputName;
76 76
 
77
-            if (is_array($inputLabel)){
78
-                $priority = isset($inputLabel[1])?$inputLabel[1]:0;
77
+            if (is_array($inputLabel)) {
78
+                $priority = isset($inputLabel[1]) ? $inputLabel[1] : 0;
79 79
                 $inputLabel = $inputLabel[0];
80
-            }else{
80
+            } else {
81 81
                 $priority = 0;
82 82
             }
83 83
 
@@ -89,19 +89,19 @@  discard block
 block discarded – undo
89 89
                     ),
90 90
             );
91 91
             if (is_bool($value)) {
92
-                $input['type']= 'Checkbox';
92
+                $input['type'] = 'Checkbox';
93 93
                 $input['attributes']['checked'] = $value;
94 94
             } else {
95 95
                 $input['attributes']['value'] = $value;
96 96
             }
97
-            $this->add($input,['priority'=>$priority]);
97
+            $this->add($input, ['priority'=>$priority]);
98 98
             
99 99
         }
100 100
         
101 101
         foreach ($children as $name => $child) {
102 102
             $objectClass  = ltrim(get_class($settings), '\\');
103 103
             $moduleName   = substr($objectClass, 0, strpos($objectClass, '\\'));
104
-            $fieldsetName = $moduleName . '/' . ucfirst($name) . 'SettingsFieldset';
104
+            $fieldsetName = $moduleName.'/'.ucfirst($name).'SettingsFieldset';
105 105
             
106 106
             if ($this->formManager->has($fieldsetName)) {
107 107
                 $fieldset = $this->formManager->get($fieldsetName);
Please login to merge, or discard this patch.