Passed
Push — master ( 35deb2...555729 )
by Jean-Christophe
03:41
created
Ajax/common/html/html5/HtmlUtils.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@
 block discarded – undo
3 3
 namespace Ajax\common\html\html5;
4 4
 
5 5
 class HtmlUtils {
6
-	public static function javascriptInclude($url){
6
+	public static function javascriptInclude($url) {
7 7
 		return '<script src="'.$url.'"></script>';
8 8
 	}
9 9
 	
10
-	public static function stylesheetInclude($url){
10
+	public static function stylesheetInclude($url) {
11 11
 		return '<link rel="stylesheet" type="text/css" href="'.$url.'">';
12 12
 	}
13 13
 }
Please login to merge, or discard this patch.
Ajax/common/html/traits/BaseHtmlPropertiesTrait.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@  discard block
 block discarded – undo
8 8
  * @author jc
9 9
  * @property BaseWidget $_self
10 10
  */
11
-trait BaseHtmlPropertiesTrait{
11
+trait BaseHtmlPropertiesTrait {
12 12
 
13
-	protected $properties=array ();
13
+	protected $properties=array();
14 14
 	abstract protected function ctrl($name, $value, $typeCtrl);
15 15
 	abstract protected function removeOldValues(&$oldValue, $allValues);
16
-	abstract protected function _getElementBy($callback,$elements);
16
+	abstract protected function _getElementBy($callback, $elements);
17 17
 	public function getProperties() {
18 18
 		return $this->_self->properties;
19 19
 	}
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public function addToProperty($name, $value, $separator=" ") {
47 47
 		if (\is_array($value)) {
48
-			foreach ( $value as $v ) {
48
+			foreach ($value as $v) {
49 49
 				$this->_self->addToProperty($name, $v, $separator);
50 50
 			}
51
-		} else if ($value !== "" && $this->_self->propertyContains($name, $value) === false) {
52
-			if(isset($this->_self->properties[$name])){
51
+		} else if ($value!=="" && $this->_self->propertyContains($name, $value)===false) {
52
+			if (isset($this->_self->properties[$name])) {
53 53
 				$v=$this->_self->properties[$name];
54
-				if (isset($v) && $v !== "")
55
-					$v=$v . $separator . $value;
54
+				if (isset($v) && $v!=="")
55
+					$v=$v.$separator.$value;
56 56
 					else
57 57
 						$v=$value;
58 58
 	
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	}
92 92
 
93 93
 	public function addToPropertyCtrlCheck($name, $value, $typeCtrl) {
94
-		if ($this->_self->ctrl($name, $value, $typeCtrl) === true) {
94
+		if ($this->_self->ctrl($name, $value, $typeCtrl)===true) {
95 95
 			return $this->_self->addToProperty($name, $value);
96 96
 		}
97 97
 		return $this;
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
 	}
113 113
 
114 114
 	protected function setPropertyCtrl($name, $value, $typeCtrl) {
115
-		if ($this->_self->ctrl($name, $value, $typeCtrl) === true)
115
+		if ($this->_self->ctrl($name, $value, $typeCtrl)===true)
116 116
 			return $this->_self->setProperty($name, $value);
117 117
 			return $this;
118 118
 	}
119 119
 
120
-	protected function getElementByPropertyValue($propertyName,$value, $elements) {
121
-		return $this->_self->_getElementBy(function(BaseHtml $element) use ($propertyName,$value){return $element->propertyContains($propertyName, $value) === true;}, $elements);
120
+	protected function getElementByPropertyValue($propertyName, $value, $elements) {
121
+		return $this->_self->_getElementBy(function(BaseHtml $element) use ($propertyName, $value){return $element->propertyContains($propertyName, $value)===true; }, $elements);
122 122
 	}
123 123
 }
Please login to merge, or discard this patch.
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -33,8 +33,9 @@  discard block
 block discarded – undo
33 33
 	}
34 34
 
35 35
 	public function getProperty($name) {
36
-		if (array_key_exists($name, $this->_self->properties))
37
-			return $this->_self->properties[$name];
36
+		if (array_key_exists($name, $this->_self->properties)) {
37
+					return $this->_self->properties[$name];
38
+		}
38 39
 	}
39 40
 
40 41
 	/**
@@ -51,10 +52,11 @@  discard block
 block discarded – undo
51 52
 		} else if ($value !== "" && $this->_self->propertyContains($name, $value) === false) {
52 53
 			if(isset($this->_self->properties[$name])){
53 54
 				$v=$this->_self->properties[$name];
54
-				if (isset($v) && $v !== "")
55
-					$v=$v . $separator . $value;
56
-					else
57
-						$v=$value;
55
+				if (isset($v) && $v !== "") {
56
+									$v=$v . $separator . $value;
57
+				} else {
58
+											$v=$value;
59
+					}
58 60
 	
59 61
 				return $this->_self->setProperty($name, $v);
60 62
 			}
@@ -78,8 +80,9 @@  discard block
 block discarded – undo
78 80
 	}
79 81
 
80 82
 	protected function addToPropertyUnique($name, $value, $typeCtrl) {
81
-		if (is_string($typeCtrl) && @class_exists($typeCtrl, true))
82
-			$typeCtrl=$typeCtrl::getConstants();
83
+		if (is_string($typeCtrl) && @class_exists($typeCtrl, true)) {
84
+					$typeCtrl=$typeCtrl::getConstants();
85
+		}
83 86
 			if (\is_array($typeCtrl)) {
84 87
 				$this->_self->removeOldValues($this->_self->properties[$name], $typeCtrl);
85 88
 			}
@@ -98,8 +101,9 @@  discard block
 block discarded – undo
98 101
 	}
99 102
 
100 103
 	public function removeProperty($name) {
101
-		if (\array_key_exists($name, $this->_self->properties))
102
-			unset($this->_self->properties[$name]);
104
+		if (\array_key_exists($name, $this->_self->properties)) {
105
+					unset($this->_self->properties[$name]);
106
+		}
103 107
 			return $this;
104 108
 	}
105 109
 
@@ -112,8 +116,9 @@  discard block
 block discarded – undo
112 116
 	}
113 117
 
114 118
 	protected function setPropertyCtrl($name, $value, $typeCtrl) {
115
-		if ($this->_self->ctrl($name, $value, $typeCtrl) === true)
116
-			return $this->_self->setProperty($name, $value);
119
+		if ($this->_self->ctrl($name, $value, $typeCtrl) === true) {
120
+					return $this->_self->setProperty($name, $value);
121
+		}
117 122
 			return $this;
118 123
 	}
119 124
 
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlNavbar.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	public function __construct($identifier, $brand="Brand", $brandHref="#") {
33 33
 		parent::__construct($identifier);
34 34
 		$this->_template=include 'templates/tplNavbar.php';
35
-		$this->navZones=array ();
35
+		$this->navZones=array();
36 36
 		$this->class="navbar-default";
37 37
 		$this->brand=$brand;
38 38
 		$this->brandHref=$brandHref;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	}
61 61
 
62 62
 	public function setBrandImage($imageSrc) {
63
-		$this->brandImage=new HtmlImg("brand-img-".$this->_identifier,$imageSrc,$this->brand);
63
+		$this->brandImage=new HtmlImg("brand-img-".$this->_identifier, $imageSrc, $this->brand);
64 64
 		$this->brand="";
65 65
 		return $this;
66 66
 	}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 	public function setNavZones($navZones) {
106 106
 		if (\is_array($navZones)) {
107
-			foreach ( $navZones as $zoneType => $zoneArray ) {
107
+			foreach ($navZones as $zoneType => $zoneArray) {
108 108
 				if (is_string($zoneType)) {
109 109
 					$zone=$this->addZone($zoneType);
110 110
 					$zone->fromArray($zoneArray);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 			if ($index<$nb)
145 145
 				$zone=$this->navZones [$index];
146 146
 		} else {
147
-			for($i=0; $i<$nb; $i++) {
147
+			for ($i=0; $i<$nb; $i++) {
148 148
 				if ($this->navZones [$i]->getIdentifier()===$index) {
149 149
 					$zone=$this->navZones [$i];
150 150
 					break;
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	}
156 156
 
157 157
 	public function run(JsUtils $js) {
158
-		foreach ( $this->navZones as $zone ) {
158
+		foreach ($this->navZones as $zone) {
159 159
 			$zone->run($js);
160 160
 		}
161 161
 		if ($this->hasScrollspy) {
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
 	}
178 178
 
179 179
 	public function setFluid($fluid) {
180
-		if($fluid===true){
180
+		if ($fluid===true) {
181 181
 			$this->fluid="container-fluid";
182
-		}else{
182
+		} else {
183 183
 			$this->fluid="container";
184 184
 		}
185 185
 		return $this;
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlPanel.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,8 +89,9 @@  discard block
 block discarded – undo
89 89
 	 * @return \Ajax\bootstrap\html\HtmlPanel default : "panel-default"
90 90
 	 */
91 91
 	public function setStyle($cssStyle) {
92
-		if (!JString::startsWith($cssStyle, "panel"))
93
-			$cssStyle="panel".$cssStyle;
92
+		if (!JString::startsWith($cssStyle, "panel")) {
93
+					$cssStyle="panel".$cssStyle;
94
+		}
94 95
 		return $this->addToPropertyCtrl("class", $cssStyle, CssRef::Styles("panel"));
95 96
 	}
96 97
 
@@ -132,7 +133,8 @@  discard block
 block discarded – undo
132 133
 	 * @return $this default : false
133 134
 	 */
134 135
 	public function show($value) {
135
-		if ($this->_collapsable)
136
-			$this->_showOnStartup=$value;
136
+		if ($this->_collapsable) {
137
+					$this->_showOnStartup=$value;
138
+		}
137 139
 	}
138 140
 }
Please login to merge, or discard this patch.