Test Failed
Pull Request — master (#3)
by
unknown
05:25 queued 03:49
created
module/UIComponents/src/UIComponents/View/Helper/Components/Button.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
     
33 33
     protected $active = false;
34 34
     
35
-    protected $_tags = array('a','input','button');
35
+    protected $_tags = array('a', 'input', 'button');
36 36
     
37
-    protected $_sizes = array('xs','sm','lg');
37
+    protected $_sizes = array('xs', 'sm', 'lg');
38 38
     protected $_foundations_sizes = array(
39 39
         'xs' => 'tiny', 'xs' => 'small', 'lg' => 'large',
40 40
     );
41 41
 
42
-    protected $_types = array('default','primary','success','info','warning','alert','danger','link');
42
+    protected $_types = array('default', 'primary', 'success', 'info', 'warning', 'alert', 'danger', 'link');
43 43
     
44 44
     /**
45 45
      * View helper entry point:
@@ -57,31 +57,31 @@  discard block
 block discarded – undo
57 57
         $component->setHeader('')->setFooter('');
58 58
         
59 59
         // tag options
60
-        if ( isset($options["tagname"]) && in_array(strtolower($options["tagname"]), $component->getTags()) ) {
60
+        if (isset($options["tagname"]) && in_array(strtolower($options["tagname"]), $component->getTags())) {
61 61
             $component->setTagname(strtolower($options["tagname"]));
62 62
         } else {
63 63
             $component->setTagname('a');
64 64
         }
65
-        if ( isset($options["attributes"]) && is_array($options["attributes"]) ) {
65
+        if (isset($options["attributes"]) && is_array($options["attributes"])) {
66 66
             $component->setAttributes($options["attributes"]);
67 67
         }
68 68
         
69 69
         // bootstrap options
70
-        if ( isset($options["size"]) && in_array(strtolower($options["size"]), $component->getSizes()) ) {
70
+        if (isset($options["size"]) && in_array(strtolower($options["size"]), $component->getSizes())) {
71 71
             $component->addClass('btn-'.strtolower($options["size"]).' '.strtolower($this->_foundations_sizes["size"]));
72 72
         }
73
-        if ( isset($options["type"]) && in_array(strtolower($options["type"]), $component->getTypes()) ) {
73
+        if (isset($options["type"]) && in_array(strtolower($options["type"]), $component->getTypes())) {
74 74
             $component->addClass('btn-'.strtolower($options["type"]).' '.strtolower($options["type"]));
75 75
         } else {
76 76
             $component->addClass('btn-default');
77 77
         }
78
-        if ( isset($options["drop"]) ) {
78
+        if (isset($options["drop"])) {
79 79
             $component->setDrop($options["drop"]);
80 80
         }
81
-        if ( isset($options["block"]) ) {
81
+        if (isset($options["block"])) {
82 82
             $component->setBlock($options["block"]);
83 83
         }
84
-        if ( isset($options["active"]) ) {
84
+        if (isset($options["active"])) {
85 85
             $component->setActive($options["active"]);
86 86
         }
87 87
 
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
             $component->setAttributes(array_merge_recursive($component->getAttributes(), array(
93 93
                 'role' => 'button'
94 94
             )));
95
-            if ( isset($options["disabled"]) ) {
95
+            if (isset($options["disabled"])) {
96 96
                 $component->addClass('disabled');
97 97
             }
98 98
         } else {
99 99
             $component->setAttributes(array_merge_recursive($component->getAttributes(), array(
100 100
                 'type' => 'button'
101 101
             )));
102
-            if ( isset($options["disabled"]) ) {
102
+            if (isset($options["disabled"])) {
103 103
                 $component->setAttributes(array_merge_recursive($component->getAttributes(), array(
104 104
                     'disabled' => 'disabled'
105 105
                 )));
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
         }
108 108
         
109 109
         // tag content
110
-        if ( isset($options["label"]) && !empty($options["label"]) ) {
110
+        if (isset($options["label"]) && !empty($options["label"])) {
111 111
             $component->setContent($options["label"]);
112
-        } else if ( isset($options["content"]) && !empty($options["content"]) ) {
112
+        } else if (isset($options["content"]) && !empty($options["content"])) {
113 113
             $component->setContent($options["content"]);
114 114
         }
115 115
         
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      * @param string $drop
185 185
      */
186 186
     public function setDrop($drop) {
187
-        if ( in_array(strtolower($drop), array('up','down'))) {
187
+        if (in_array(strtolower($drop), array('up', 'down'))) {
188 188
             $this->drop = $drop;
189 189
         }
190 190
         return $this;
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/AbstractProxyHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -205,12 +205,12 @@
 block discarded – undo
205 205
             return false;
206 206
         }
207 207
 
208
-        $helper    = $plugins->get($proxy);
208
+        $helper = $plugins->get($proxy);
209 209
 
210 210
         if ($helper && ($helper instanceof \Zend\View\Helper\Navigation\Menu)) {
211 211
             
212 212
             $container = $this->getContainer();
213
-            $hash      = spl_object_hash($container) . spl_object_hash($helper);
213
+            $hash      = spl_object_hash($container).spl_object_hash($helper);
214 214
             if (!isset($this->injected[$hash])) {
215 215
                 $helper->setContainer();
216 216
                 $this->inject($helper);
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/AbstractHelper.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             
152 152
         } catch (\Exception $e) {
153 153
             
154
-            $msg = get_class($e) . ': ' . $e->getMessage() . "\n" . $e->getTraceAsString();
154
+            $msg = get_class($e).': '.$e->getMessage()."\n".$e->getTraceAsString();
155 155
             trigger_error($msg, E_USER_ERROR);
156 156
             return '';
157 157
             
@@ -194,9 +194,9 @@  discard block
 block discarded – undo
194 194
 
195 195
         /** @var \Zend\View\Helper\EscapeHtml $escaper */
196 196
         $escaper = $this->view->plugin('escapeHtml');
197
-        $label    = $escaper($label);
197
+        $label = $escaper($label);
198 198
 
199
-        return '<a' . $this->htmlAttribs($attribs) . '>' . $label . '</a>';
199
+        return '<a'.$this->htmlAttribs($attribs).'>'.$label.'</a>';
200 200
     }
201 201
 
202 202
     /**
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $prefix = get_class($this);
213 213
         $prefix = strtolower(trim(substr($prefix, strrpos($prefix, '\\')), '\\'));
214 214
 
215
-        return $prefix . '-' . $value;
215
+        return $prefix.'-'.$value;
216 216
     }
217 217
 
218 218
     //
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     public function buildComponent() {
226 226
         $html = ' '.__CLASS__.' ';
227
-        if ( empty($this->getTagname()) ) {
227
+        if (empty($this->getTagname())) {
228 228
             return '';
229 229
         }
230 230
         
@@ -235,11 +235,11 @@  discard block
 block discarded – undo
235 235
         $body = $this->getContent();
236 236
         
237 237
         $content = (array($header, $body, $footer));
238
-        if ( is_array($body) && !isset($body["tagname"])) {
238
+        if (is_array($body) && !isset($body["tagname"])) {
239 239
             $content = array_merge(array($header), ($body), array($footer));
240 240
         }
241 241
         
242
-        $component = $this->_createElement($this->getTagname(), $this->getClassnames(), (array)$this->getAttributes(), $content);
242
+        $component = $this->_createElement($this->getTagname(), $this->getClassnames(), (array) $this->getAttributes(), $content);
243 243
 
244 244
         return $component;
245 245
 
@@ -259,29 +259,29 @@  discard block
 block discarded – undo
259 259
         $html = '';
260 260
         $html .= '<'.$tagname.''.((isset($classnames) && !empty($classnames)) ? ' class="'.$classnames.'"' : '').' '.$this->htmlAttribs($attributes).'>';
261 261
         if (!empty($content)) {
262
-            if ( $content instanceof AbstractHelper ) {
262
+            if ($content instanceof AbstractHelper) {
263 263
                 $html .= $content->render();
264
-            } else if ( is_array($content) && isset($content['tagname']) ) {
264
+            } else if (is_array($content) && isset($content['tagname'])) {
265 265
                 $html .= $this->_createElement(
266 266
                     $content['tagname'],
267 267
                     (isset($content['classnames']) && !empty($content['classnames']) ? $content['classnames'] : (isset($content['class']) && !empty($content['class']) ? $content['class'] : '')),
268 268
                     (isset($content['attributes']) && !empty($content['attributes']) ? $content['attributes'] : (isset($content['attr']) && !empty($content['attr']) ? $content['attr'] : '')),
269 269
                     (isset($content['content']) && !empty($content['content']) ? $content['content'] : '')
270 270
                 );
271
-            } else if ( is_array($content) ) {
271
+            } else if (is_array($content)) {
272 272
                 foreach ($content as $key => $item) {
273
-                    if ( $item instanceof AbstractHelper ) {
273
+                    if ($item instanceof AbstractHelper) {
274 274
                         $html .= $item->render();
275
-                    } else if ( is_array($item) && isset($item['tagname']) ) {
275
+                    } else if (is_array($item) && isset($item['tagname'])) {
276 276
                         $html .= $this->_createElement(
277 277
                             $item['tagname'],
278 278
                             (isset($item['classnames']) && !empty($item['classnames']) ? $item['classnames'] : (isset($item['class']) && !empty($item['class']) ? $item['class'] : '')),
279
-                            (array)(isset($item['attributes']) && !empty($item['attributes']) ? $item['attributes'] : (isset($item['attr']) && !empty($item['attr']) ? $item['attr'] : '')),
279
+                            (array) (isset($item['attributes']) && !empty($item['attributes']) ? $item['attributes'] : (isset($item['attr']) && !empty($item['attr']) ? $item['attr'] : '')),
280 280
                             (isset($item['content']) && !empty($item['content']) ? $item['content'] : '')
281 281
                         );
282
-                    } else if ( is_array($item) ) {
282
+                    } else if (is_array($item)) {
283 283
                         foreach ($content as $key => $value) {
284
-                            $html .= (string)$value;
284
+                            $html .= (string) $value;
285 285
                         }
286 286
                     } else {
287 287
                         $html .= $item;
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
      * @param string $tagname
317 317
      */
318 318
     public function setTagname($tagname) {
319
-        if ( null !== $tagname ) {
319
+        if (null !== $tagname) {
320 320
             $this->tagname = $tagname;
321 321
         }
322 322
         return $this;
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
      * @param mixed $header
338 338
      */
339 339
     public function setHeader($header) {
340
-        if ( null !== $header ) {
340
+        if (null !== $header) {
341 341
             $this->header = $header;
342 342
         }
343 343
         return $this;
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
      * @param mixed $footer
359 359
      */
360 360
     public function setFooter($footer = null) {
361
-        if ( null !== $footer ) {
361
+        if (null !== $footer) {
362 362
             $this->footer = $footer;
363 363
         }
364 364
         return $this;
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
      * @return the $_DOMDoc
389 389
      */
390 390
     public function getDOMDoc() {
391
-        if ( ! $this->_DOMDoc instanceof \DOMDocument ) {
391
+        if (!$this->_DOMDoc instanceof \DOMDocument) {
392 392
             $this->_DOMDoc = new \DOMDocument();
393 393
         }
394 394
         return $this->_DOMDoc;
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Utilities/AppLogo.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
      */
42 42
     public function render($container = null)
43 43
     {
44
-        $config = new \Zend\Config\Config( $this->getServiceLocator()->getServiceLocator()->get('Config') );
44
+        $config = new \Zend\Config\Config($this->getServiceLocator()->getServiceLocator()->get('Config'));
45 45
         return $config->get('app')->get('logo');
46 46
     }
47 47
     
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Utilities/Framework.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
      * @param  string $framework [optional] framework classnames collection to relate to
39 39
      * @return \Zend\Config\Config
40 40
      */
41
-    public function __invoke( $framework = null )
41
+    public function __invoke($framework = null)
42 42
     {
43 43
         if ($framework !== null) {
44
-            $classname = $this->NS . "\\" . $framework;
44
+            $classname = $this->NS."\\".$framework;
45 45
             if (!class_exists($classname)) {
46 46
                 throw new \Zend\View\Exception\InvalidArgumentException(sprintf( 
47 47
                     $this->translate("Invalid framework collection '%s' specified"),
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function getCollection()
63 63
     {
64
-        $classname = $this->NS . "\\" . $this->framework;
64
+        $classname = $this->NS."\\".$this->framework;
65 65
         if (!class_exists($classname)) {
66 66
             throw new \Zend\View\Exception\InvalidArgumentException(sprintf( 
67 67
                 $this->translate("Invalid framework collection '%s' specified"),
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Utilities/AppTitle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function render($short = null)
44 44
     {
45
-        $config = new \Zend\Config\Config( $this->getServiceLocator()->getServiceLocator()->get('Config') );
45
+        $config = new \Zend\Config\Config($this->getServiceLocator()->getServiceLocator()->get('Config'));
46 46
         if ($short === true) {
47 47
             return $config->get('app')->get('short_title');
48 48
         }
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Utilities/AppFavicon.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
      */
42 42
     public function render($container = null)
43 43
     {
44
-        $config = new \Zend\Config\Config( $this->getServiceLocator()->getServiceLocator()->get('Config') );
44
+        $config = new \Zend\Config\Config($this->getServiceLocator()->getServiceLocator()->get('Config'));
45 45
         return $config->get('app')->get('favicon');
46 46
     }
47 47
     
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Utilities/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function render($container = null)
44 44
     {
45
-        $config = new \Zend\Config\Config( $this->getServiceLocator()->getServiceLocator()->get('Config') );
45
+        $config = new \Zend\Config\Config($this->getServiceLocator()->getServiceLocator()->get('Config'));
46 46
         return $config;
47 47
     }
48 48
     
Please login to merge, or discard this patch.
UIComponents/src/UIComponents/Framework/ClassnameCollectionAbstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
 	 * @see \Zend\Config\Config
119 119
 	 */
120 120
 	public function __contruct() {
121
-	    return new \Zend\Config\Config( get_object_vars($this) );
121
+	    return new \Zend\Config\Config(get_object_vars($this));
122 122
 	}
123 123
 		
124 124
 }
Please login to merge, or discard this patch.