Completed
Push — develop ( 06c328...a78ff6 )
by Carsten
17:00 queued 08:38
created
module/Core/src/Core/Entity/Hydrator/AnonymEntityHydrator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
             $setterMethods = $object->getSetters();
44 44
         }
45 45
         foreach ($data as $key => $value) {
46
-            $setter = 'set' . ucfirst($key);
46
+            $setter = 'set'.ucfirst($key);
47 47
             if (in_array($setter, $setterMethods)) {
48 48
                 $object->$setter($value);
49 49
             } else {
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Hydrator/EntityHydrator.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
         
33 33
         $getters = array_filter(
34 34
             get_class_methods($object),
35
-            function ($methodName) use ($object) {
35
+            function($methodName) use ($object) {
36 36
                 return "get" === substr($methodName, 0, 3)
37
-                && method_exists($object, 's' . substr($methodName, 1));
37
+                && method_exists($object, 's'.substr($methodName, 1));
38 38
             }
39 39
         );
40 40
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         }
62 62
         $setters = array_filter(
63 63
             get_class_methods($object),
64
-            function ($methodName) {
64
+            function($methodName) {
65 65
                 return "set" === substr($methodName, 0, 3);
66 66
             }
67 67
         );
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
     /**
90 90
      * exclude methods from the automatism
91 91
      *
92
-     * @param $methods
92
+     * @param string[] $methods
93 93
      */
94 94
     public function setExcludeMethods($methods)
95 95
     {
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Permissions.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -149,21 +149,21 @@  discard block
 block discarded – undo
149 149
         }
150 150
 
151 151
         if (preg_match('~^is(View|Change|None|All)Granted$~', $method, $match)) {
152
-            $permission = constant('self::PERMISSION_' . strtoupper($match[1]));
152
+            $permission = constant('self::PERMISSION_'.strtoupper($match[1]));
153 153
             return $this->isGranted($params[0], $permission);
154 154
         }
155 155
         
156 156
         if (preg_match('~^grant(View|Change|None|All)$~', $method, $match)) {
157
-            $permission = constant('self::PERMISSION_' . strtoupper($match[1]));
157
+            $permission = constant('self::PERMISSION_'.strtoupper($match[1]));
158 158
             return $this->grant($params[0], $permission);
159 159
         }
160 160
         
161 161
         if (preg_match('~^revoke(View|Change|None|All)$~', $method, $match)) {
162
-            $permission = constant('self::PERMISSION_' . strtoupper($match[1]));
162
+            $permission = constant('self::PERMISSION_'.strtoupper($match[1]));
163 163
             return $this->revoke($params[0], $permission);
164 164
         }
165 165
         
166
-        throw new \BadMethodCallException('Unknown method "' . $method . '"');
166
+        throw new \BadMethodCallException('Unknown method "'.$method.'"');
167 167
     }
168 168
 
169 169
     /**
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
         if ($build) {
312 312
             $this->build();
313 313
         }
314
-        $this->hasChanged= true;
314
+        $this->hasChanged = true;
315 315
 
316 316
         // restore orginial permissions type
317 317
         $this->type = $oldType;
@@ -444,10 +444,10 @@  discard block
 block discarded – undo
444 444
         }
445 445
         
446 446
         if ($resource instanceof UserInterface) {
447
-            return 'user:' . $resource->getId();
447
+            return 'user:'.$resource->getId();
448 448
         }
449 449
         
450
-        return 'user:' . $resource;
450
+        return 'user:'.$resource;
451 451
     }
452 452
 
453 453
     /**
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
         );
468 468
         if (!in_array($permission, $perms)) {
469 469
             throw new \InvalidArgumentException(
470
-                'Invalid permission. Must be one of ' . implode(', ', $perms)
470
+                'Invalid permission. Must be one of '.implode(', ', $perms)
471 471
             );
472 472
         }
473 473
     }
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -354,6 +354,9 @@
 block discarded – undo
354 354
         return $this;
355 355
     }
356 356
     
357
+    /**
358
+     * @param string $permission
359
+     */
357 360
     private function checkIsGranted($userId, $permission)
358 361
     {
359 362
         if (!$userId) { return false; }
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/AbstractEntity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             return $this->$method($value);
50 50
         }
51 51
         
52
-        throw new OutOfBoundsException("'$property' is not a valid property of '" . get_class($this). "'");
52
+        throw new OutOfBoundsException("'$property' is not a valid property of '".get_class($this)."'");
53 53
     }
54 54
     
55 55
     /**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         if (method_exists($this, $method)) {
77 77
             return $this->$method();
78 78
         }
79
-        throw new OutOfBoundsException("'$property' is not a valid property of '" . get_class($this) . "'");
79
+        throw new OutOfBoundsException("'$property' is not a valid property of '".get_class($this)."'");
80 80
     }
81 81
     
82 82
     /**
Please login to merge, or discard this patch.
module/Core/src/Core/View/Helper/Rating.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,13 +66,13 @@
 block discarded – undo
66 66
         }
67 67
         
68 68
         $output = '<div class="br-widget br-readonly '
69
-                . ('compact' == $mode ? ' br-compact' : '' )
70
-                . '" title="' . $this->getView()->translate(self::$ratingValueMap[$rating]) . '">';
71
-        for ($i=1; $i<6; $i++) {
69
+                . ('compact' == $mode ? ' br-compact' : '')
70
+                . '" title="'.$this->getView()->translate(self::$ratingValueMap[$rating]).'">';
71
+        for ($i = 1; $i < 6; $i++) {
72 72
             $class = $i <= $rating ? 'br-selected' : '';
73 73
             $class .= $i == $rating ? ' br-current' : '';
74 74
             
75
-            $output .= '<a class="' . $class . '"></a>';
75
+            $output .= '<a class="'.$class.'"></a>';
76 76
         }
77 77
         $output .= '</div>';
78 78
         
Please login to merge, or discard this patch.
module/Core/src/Core/View/Helper/Link.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                        : '';
59 59
         
60 60
         if (false !== strpos($urlOrEmail, '@')) {
61
-            $urlOrEmail = 'mailto:' . $urlOrEmail;
61
+            $urlOrEmail = 'mailto:'.$urlOrEmail;
62 62
         }
63 63
         
64 64
         return sprintf('<a %s href="%s">%s</a>', $attributesStr, $urlOrEmail, $label);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $attr       = array();
74 74
         
75 75
         foreach ($attributes as $name => $value) {
76
-            $attr[] = $escape($name) . '="' . $escapeAttr($value) . '"';
76
+            $attr[] = $escape($name).'="'.$escapeAttr($value).'"';
77 77
         }
78 78
         
79 79
         return implode(' ', $attr);
Please login to merge, or discard this patch.
module/Core/src/Core/Decorator/Decorator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     protected function checkObjectType($object)
58 58
     {
59 59
         if (!$object instanceof $this->objectType) {
60
-            throw new \InvalidArgumentException('Wrapped entity must be of type ' . $this->objectType);
60
+            throw new \InvalidArgumentException('Wrapped entity must be of type '.$this->objectType);
61 61
         }
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FilterForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@
 block discarded – undo
39 39
                     $element->setLabel('');
40 40
                     $element->setAttribute('placeholder', $label);
41 41
                 }
42
-                $formContent .= $this->getView()->formRow($element, null, null, Form::LAYOUT_BARE) . ' ';
42
+                $formContent .= $this->getView()->formRow($element, null, null, Form::LAYOUT_BARE).' ';
43 43
             }
44 44
         }
45 45
         
46 46
         
47
-        return $this->openTag($form) . $formContent . $this->closeTag();
47
+        return $this->openTag($form).$formContent.$this->closeTag();
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FormRow.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 
53 53
         if ($element instanceof ViewPartialProviderInterface && !$ignoreViewPartial) {
54 54
             return $this->getView()->partial($element->getViewPartial(),
55
-                                             array(
56
-                                                 'element' => $element,
57
-                                                 'labelWitdh' => $labelWidth,
58
-                                                 'label_attributes' => $labelAttributes
55
+                                                array(
56
+                                                    'element' => $element,
57
+                                                    'labelWitdh' => $labelWidth,
58
+                                                    'label_attributes' => $labelAttributes
59 59
                                                             )
60 60
             );
61 61
         }
@@ -107,10 +107,10 @@  discard block
 block discarded – undo
107 107
         $desc = $element->getOption('description', false);
108 108
         if ($desc && $this->layout != Form::LAYOUT_BARE) {
109 109
             if (null !== ($translator = $this->getTranslator())) {
110
-                             $desc = $translator->translate(
111
-                                 $desc,
112
-                                 $this->getTranslatorTextDomain()
113
-                             );
110
+                                $desc = $translator->translate(
111
+                                    $desc,
112
+                                    $this->getTranslatorTextDomain()
113
+                                );
114 114
             }
115 115
             $elementString .= sprintf(
116 116
                 '<div id="%s-desc" class="cam-description alert alert-info">%s</div>',
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
         
77 77
         // Does this element have errors ?
78 78
         if (!empty($elementErrors) && !empty($inputErrorClass) && $this->layout != Form::LAYOUT_BARE) {
79
-            $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class') . ' ' : '');
80
-            $classAttributes = $classAttributes . $inputErrorClass;
79
+            $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class').' ' : '');
80
+            $classAttributes = $classAttributes.$inputErrorClass;
81 81
     
82 82
             $element->setAttribute('class', $classAttributes);
83 83
         }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         if (!$element->hasAttribute('id')) {
86 86
             $elementId = preg_replace(
87 87
                 array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'),
88
-                array('-'             , '-',     ''),
88
+                array('-', '-', ''),
89 89
                 $element->getName()
90 90
             );
91 91
             $element->setAttribute('id', $elementId);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         }
132 132
         
133 133
         // moved label here so we can change it in the ElementViewHelper
134
-        $label           = $element->getLabel();
134
+        $label = $element->getLabel();
135 135
         if (isset($label) && '' !== $label && !$element instanceof \Zend\Form\Element\Button) {
136 136
             // Translate the label
137 137
             if (null !== ($translator = $this->getTranslator())) {
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
                     }
174 174
                     $element->setLabelAttributes($labelAttributes);
175 175
 
176
-                    $label = $labelHelper($element,$label);
176
+                    $label = $labelHelper($element, $label);
177 177
                     if ($this->shouldWrap) {
178 178
                         $spanWidth = 12 - $labelWidth;
179 179
                         $elementString = sprintf(
180
-                            '<div class="col-md-%d%s" id="' . $elementId . '-span">%s</div>',
180
+                            '<div class="col-md-%d%s" id="'.$elementId.'-span">%s</div>',
181 181
                             $spanWidth,
182 182
                             $elementErrors ? " $inputErrorClass" : '',
183 183
                             $elementString
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                         );
190 190
 
191 191
                     }
192
-                        $markup = $label . $elementString;
192
+                        $markup = $label.$elementString;
193 193
                 }
194 194
             }
195 195
         } else {
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             && !$element instanceof \Zend\Form\Element\Button
211 211
             && $this->layout != Form::LAYOUT_BARE
212 212
             ) {
213
-            $markup = sprintf('<div class="controls controls-row ' . $form_row_class . '">%s</div>', $markup);
213
+            $markup = sprintf('<div class="controls controls-row '.$form_row_class.'">%s</div>', $markup);
214 214
         }
215 215
     
216 216
         return $markup;
Please login to merge, or discard this patch.