Test Failed
Push — master ( 8a12a1...341f45 )
by Björn
26:21 queued 06:45
created
module/UIComponents/src/UIComponents/Template/TemplateInterface.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -22,44 +22,44 @@
 block discarded – undo
22 22
 interface TemplateInterface
23 23
 {
24 24
 
25
-	/**
26
-	 * Set Templates placeholders and values
27
-	 *
28
-	 * With this method you can replace the placeholders
29
-	 * in the static templates with dynamic data.
30
-	 *
31
-	 * @param $which String 's' for Static or else dynamic
32
-	 * @param $needle String Placeholder
33
-	 * @param $replacement String Replacement String
34
-	 *
35
-	 * @return void
36
-	 */
37
-	public function set($which = 's', $needle, $replacement);
25
+    /**
26
+     * Set Templates placeholders and values
27
+     *
28
+     * With this method you can replace the placeholders
29
+     * in the static templates with dynamic data.
30
+     *
31
+     * @param $which String 's' for Static or else dynamic
32
+     * @param $needle String Placeholder
33
+     * @param $replacement String Replacement String
34
+     *
35
+     * @return void
36
+     */
37
+    public function set($which = 's', $needle, $replacement);
38 38
 
39
-	/**
40
-	 * Iterate internal counter by one
41
-	 *
42
-	 * @return void
43
-	 */
44
-	public function next();
39
+    /**
40
+     * Iterate internal counter by one
41
+     *
42
+     * @return void
43
+     */
44
+    public function next();
45 45
 
46
-	/**
47
-	 * Reset template data
48
-	 *
49
-	 * @return void
50
-	 */
51
-	public function reset();
46
+    /**
47
+     * Reset template data
48
+     *
49
+     * @return void
50
+     */
51
+    public function reset();
52 52
 
53
-	/**
54
-	 * Generate the template and
55
-	 * print/return it. (do translations sequentially to save memory!!!)
56
-	 *
57
-	 * @param $template string/file Template
58
-	 * @param $return bool Return or print template
59
-	 *
60
-	 * @return string complete Template string
61
-	 */
62
-	public function generate($template, $return = 0);
53
+    /**
54
+     * Generate the template and
55
+     * print/return it. (do translations sequentially to save memory!!!)
56
+     *
57
+     * @param $template string/file Template
58
+     * @param $return bool Return or print template
59
+     *
60
+     * @return string complete Template string
61
+     */
62
+    public function generate($template, $return = 0);
63 63
 
64 64
 	
65 65
 }
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/AbstractPluginManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      *
33 33
      * @var    array
34 34
      */
35
-    protected $invokableClasses = [ ];
35
+    protected $invokableClasses = [];
36 36
 
37 37
     /**
38 38
      * Validate the plugin
Please login to merge, or discard this patch.
src/UIComponents/View/Helper/Traits/ComponentClassnamesTrait.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      * @param string $classnames
45 45
      */
46 46
     public function setClassnames($classnames) {
47
-        if ( null !== $classnames ) {
47
+        if (null !== $classnames) {
48 48
             $this->classnames = $classnames;
49 49
         }
50 50
         return $this;
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      * @param string $classname
57 57
      * @return boolean 
58 58
      */
59
-    public function hasClass ($classname) {
59
+    public function hasClass($classname) {
60 60
         $classname = trim($classname);
61 61
         if (!empty($classname)) {
62 62
             $classes = explode(" ", $this->getClassnames());
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * 
71 71
      * @param string $classname
72 72
      */
73
-    public function addClass ($classname) {
73
+    public function addClass($classname) {
74 74
         $classname = trim($classname);
75 75
         if (!empty($classname)) {
76 76
             $classes = explode(" ", $this->getClassnames());
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      * 
88 88
      * @param string $classname
89 89
      */
90
-    public function removeClass ($classname) {
90
+    public function removeClass($classname) {
91 91
         $classname = trim($classname);
92 92
         if (!empty($classname) && $this->hasClass($classname)) {
93 93
             $classes = explode(" ", $this->getClassnames());
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
  */
23 23
 trait ControllerTranslatorTrait {
24 24
 
25
-	/**
25
+    /**
26 26
      * 
27 27
      * @var \Zend\I18n\Translator\Translator
28 28
      */
Please login to merge, or discard this patch.
src/UIComponents/View/Helper/Traits/ComponentAttributesTrait.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @return the $attribute 
37 37
      */
38 38
     public function getAttribute($name) {
39
-        return ( isset($this->attributes[$name]) ? $this->attributes[$name] : null );
39
+        return (isset($this->attributes[$name]) ? $this->attributes[$name] : null);
40 40
     }
41 41
 
42 42
     /**
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param mixed $value
47 47
      */
48 48
     public function setAttribute($attribute, $value = "") {
49
-        if ( null !== $attribute ) {
49
+        if (null !== $attribute) {
50 50
             $this->attributes[$attribute] = $value;
51 51
         }
52 52
         return $this;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @param array $attributes
68 68
      */
69 69
     public function setAttributes($attributes) {
70
-        if ( is_array($attributes) ) {
70
+        if (is_array($attributes)) {
71 71
             $this->attributes = array_merge_recursive($this->attributes, $attributes);
72 72
         }
73 73
         return $this;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         // except for "data-" and "aria-" attributes
89 89
         foreach ($attribs as $key => $value) {
90 90
             if ($value === null || (is_string($value) && !strlen($value))) {
91
-                if ( (strpos($key, "data") === false) && (strpos($key, "aria") === false) ) {
91
+                if ((strpos($key, "data") === false) && (strpos($key, "aria") === false)) {
92 92
                     unset($attribs[$key]);
93 93
                 }
94 94
             }
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
 
97 97
         $xhtml = '';
98 98
         $oView = $this->getView();
99
-        $escaper        = function ($val) { return $val; };
100
-        $escapeHtmlAttr = function ($val) { return $val; };
101
-        if ( ($oView instanceof \Zend\View\Renderer\RendererInterface) ) {
99
+        $escaper        = function($val) { return $val; };
100
+        $escapeHtmlAttr = function($val) { return $val; };
101
+        if (($oView instanceof \Zend\View\Renderer\RendererInterface)) {
102 102
             $escaper        = $oView->plugin('escapehtml');
103 103
             $escapeHtmlAttr = $oView->plugin('escapehtmlattr');
104 104
         }
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Components/Void.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@
 block discarded – undo
33 33
      */
34 34
     public function __invoke($options = array())
35 35
     {
36
-        if ( is_object($options) && method_exists($options, 'toArray') ) {
36
+        if (is_object($options) && method_exists($options, 'toArray')) {
37 37
             $options = $options->toArray();
38
-        } else if ( is_object($options) ) {
39
-            $options = (array)$options;
38
+        } else if (is_object($options)) {
39
+            $options = (array) $options;
40 40
         }
41 41
         
42 42
         if (isset($options['container']) && (null !== $options['container'])) {
Please login to merge, or discard this patch.
UIComponents/src/UIComponents/View/Helper/Components/PluginManager.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected $invokableClasses = [
35 35
 
36
-    	// panels
37
-    	//
36
+        // panels
37
+        //
38 38
         'void'              => 'UIComponents\View\Helper\Components\Void',
39 39
         'block'             => 'UIComponents\View\Helper\Components\Block',
40 40
         //'well'              => 'UIComponents\View\Helper\Components\Well',
@@ -43,33 +43,33 @@  discard block
 block discarded – undo
43 43
         'widget'            => 'UIComponents\View\Helper\Components\Widget',
44 44
         'dashboard'         => 'UIComponents\View\Helper\Components\Dashboard',
45 45
 
46
-    	// page components
47
-    	//
46
+        // page components
47
+        //
48 48
         'nav'               => 'UIComponents\View\Helper\Components\Navbar', // set 'alias to' or combine with 'Navbars' !
49 49
         'topbar'            => 'UIComponents\View\Helper\Components\Navbar', // set 'alias to' or combine with 'Navbars' !
50 50
         'breadcrumbs'       => 'UIComponents\View\Helper\Components\Breadcrumbs',
51 51
         'languagemenu'      => 'UIComponents\View\Helper\Components\Languagemenu',
52
-    	'toolbar'           => 'UIComponents\View\Helper\Components\Toolbar',
52
+        'toolbar'           => 'UIComponents\View\Helper\Components\Toolbar',
53 53
         
54 54
         // controls
55 55
         //
56 56
         'button'            => 'UIComponents\View\Helper\Components\Button', // default, drop-down/up, splitted
57 57
         'buttongroup'       => 'UIComponents\View\Helper\Components\Buttongroup',
58
-    	//'inputgroup'        => 'UIComponents\View\Helper\Components\Inputgroup',
58
+        //'inputgroup'        => 'UIComponents\View\Helper\Components\Inputgroup',
59 59
         //'progressbar'       => 'UIComponents\View\Helper\Components\Progressbar',
60 60
 
61
-    	// forms
62
-    	//
61
+        // forms
62
+        //
63 63
         'formgroup'         => 'UIComponents\View\Helper\Components\Formgroup',
64 64
     	
65
-    	// lists/tables
66
-    	//
65
+        // lists/tables
66
+        //
67 67
         //'listgroup'         => 'UIComponents\View\Helper\Components\Listgroup',
68 68
         'table'         	=> 'UIComponents\View\Helper\Components\Listgroup',
69
-    	//'pagination'        => 'UIComponents\View\Helper\Components\Pagination',
69
+        //'pagination'        => 'UIComponents\View\Helper\Components\Pagination',
70 70
     	
71
-    	// widgets
72
-    	//
71
+        // widgets
72
+        //
73 73
         //'label'             => 'UIComponents\View\Helper\Components\Label',
74 74
         //'badge'             => 'UIComponents\View\Helper\Components\Badge',
75 75
         //'pageheader'        => 'UIComponents\View\Helper\Components\Pageheader',
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Components/Panel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      * @return string the assemled component rendered to HTML
50 50
      */
51 51
     public function buildComponent() {
52
-        if ( empty($this->getTagname()) ) {
52
+        if (empty($this->getTagname())) {
53 53
             $this->setTagname('div');
54 54
             // return '';
55 55
         }
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
         }
71 71
         
72 72
         $content = (array($header, $body, $footer));
73
-        if ( is_array($body) && !isset($body["tagname"])) {
73
+        if (is_array($body) && !isset($body["tagname"])) {
74 74
             $content = array_merge(array($header), ($body), array($footer));
75 75
         }
76 76
         
77
-        $component = $this->_createElement($this->getTagname(), $this->getClassnames(), (array)$this->getAttributes(), $content);
77
+        $component = $this->_createElement($this->getTagname(), $this->getClassnames(), (array) $this->getAttributes(), $content);
78 78
 
79 79
         return $component;
80 80
 
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Components/Formgroup.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,38 +39,38 @@
 block discarded – undo
39 39
     public function __invoke($formoptions = array(), $field = null) {
40 40
         parent::__invoke(array());
41 41
         $form = null; 
42
-        if ( !is_array($formoptions) && ($formoptions instanceof \Zend\Form\Form) && (func_num_args() == 2) ) {
42
+        if (!is_array($formoptions) && ($formoptions instanceof \Zend\Form\Form) && (func_num_args() == 2)) {
43 43
             $form    = $formoptions;
44 44
             $field    = func_get_arg(1);
45
-        } else if ( isset($formoptions["form"]) && isset($formoptions["field"]) && ($formoptions["form"] instanceof \Zend\Form\Form) ) {
45
+        } else if (isset($formoptions["form"]) && isset($formoptions["field"]) && ($formoptions["form"] instanceof \Zend\Form\Form)) {
46 46
             $form    = $formoptions["form"];
47 47
             $field    = $formoptions["field"];
48 48
         } else
49
-        if ( !($form instanceof \Zend\Form\Form) || empty($field) ) {
49
+        if (!($form instanceof \Zend\Form\Form) || empty($field)) {
50 50
             return "";
51 51
         }
52 52
         $this->setForm($form);
53 53
 
54
-        if ( is_string($field) ) {
54
+        if (is_string($field)) {
55 55
             $field = $form->get($field);
56 56
             if (!$field) {
57 57
                 return "";
58 58
             }
59
-        } else if ( !($field instanceof \Zend\Form\Element) ) {
59
+        } else if (!($field instanceof \Zend\Form\Element)) {
60 60
             return "";
61 61
         }
62
-        if ( !empty($this->getView()->formElementErrors($field)) ) {
62
+        if (!empty($this->getView()->formElementErrors($field))) {
63 63
             $this->addClass('has-error');
64 64
         }
65
-        $this->setHeader( $this->getView()->formLabel($field) );
65
+        $this->setHeader($this->getView()->formLabel($field));
66 66
         /** @var \Zend\Form\View\HelperConfig $formPlugins */
67 67
         $formPlugins = $this->getView();
68
-        if ( $field->getAttribute('type') == 'select' ) {
69
-            $this->setContent( $formPlugins->formSelect($field->setAttributes(array('class' => 'form-control'))) );
68
+        if ($field->getAttribute('type') == 'select') {
69
+            $this->setContent($formPlugins->formSelect($field->setAttributes(array('class' => 'form-control'))));
70 70
         } else {
71
-            $this->setContent( $formPlugins->formInput($field->setAttributes(array('class' => 'form-control'))) );
71
+            $this->setContent($formPlugins->formInput($field->setAttributes(array('class' => 'form-control'))));
72 72
         }
73
-        $this->setFooter( $formPlugins->formElementErrors($field) );
73
+        $this->setFooter($formPlugins->formElementErrors($field));
74 74
         
75 75
         $component = clone $this;
76 76
         return $component;
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Components/Modal.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      * @return string the assemled component rendered to HTML
55 55
      */
56 56
     public function buildComponent() {
57
-        if ( empty($this->getTagname()) ) {
57
+        if (empty($this->getTagname())) {
58 58
             $this->setTagname('div');
59 59
             // return '';
60 60
         }
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
         }
76 76
         
77 77
         $content = (array($header, $body, $footer));
78
-        if ( is_array($body) && !isset($body["tagname"])) {
78
+        if (is_array($body) && !isset($body["tagname"])) {
79 79
             $content = array_merge(array($header), ($body), array($footer));
80 80
         }
81 81
         
82
-        $contentElement = $this->_createElement($this->getTagname(), $this->getClassnamesContent(), (array)$this->getAttributes(), $content);
82
+        $contentElement = $this->_createElement($this->getTagname(), $this->getClassnamesContent(), (array) $this->getAttributes(), $content);
83 83
         $dialogElement = $this->_createElement($this->getTagname(), $this->getClassnamesDialog(), [], $contentElement);
84 84
         $component = $this->_createElement($this->getTagname(), $this->getClassnames(), [], $dialogElement);
85 85
         return $component;
Please login to merge, or discard this patch.