Completed
Push — master ( 9d9655...e87f8c )
by Jean-Christophe
02:40
created
Ajax/bootstrap/html/HtmlCarousel.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use Ajax\bootstrap\html\base\CssRef;
8 8
 use Ajax\bootstrap\html\base\HtmlBsDoubleElement;
9 9
 use Ajax\bootstrap\html\content\HtmlCarouselItem;
10
-
11 10
 use Ajax\common\html\BaseHtml;
12 11
 /**
13 12
  * Composant Twitter Bootstrap Carousel
Please login to merge, or discard this patch.
Braces   +10 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,27 +75,30 @@
 block discarded – undo
75 75
 	}
76 76
 
77 77
 	private function getGlyph($sens="left") {
78
-		if (array_key_exists($sens, $this->_glyphs))
79
-			return $this->_glyphs [$sens];
78
+		if (array_key_exists($sens, $this->_glyphs)) {
79
+					return $this->_glyphs [$sens];
80
+		}
80 81
 		return "glyphicon-chevron-".$sens;
81 82
 	}
82 83
 
83 84
 	public function setRightGlyph($glyphicon) {
84 85
 		$glyphs=CssRef::glyphIcons();
85
-		if (array_search($glyphicon, $glyphs)!==false)
86
-			$this->_glyphs ["right"]=$glyphicon;
86
+		if (array_search($glyphicon, $glyphs)!==false) {
87
+					$this->_glyphs ["right"]=$glyphicon;
88
+		}
87 89
 	}
88 90
 
89 91
 	public function setLeftGlyph($glyphicon) {
90 92
 		$glyphs=CssRef::glyphIcons();
91
-		if (array_search($glyphicon, $glyphs)!==false)
92
-			$this->_glyphs ["left"]=$glyphicon;
93
+		if (array_search($glyphicon, $glyphs)!==false) {
94
+					$this->_glyphs ["left"]=$glyphicon;
95
+		}
93 96
 	}
94 97
 
95 98
 	public function addImage($imageSrc, $imageAlt="", $caption=NULL, $description=NULL) {
96 99
 		if(\is_array($imageSrc)){
97 100
 			$this->addImage($imageSrc[0],@$imageSrc[1],@$imageSrc[2],@$imageSrc[3]);
98
-		}else{
101
+		} else{
99 102
 			$image=new HtmlCarouselItem("item-".$this->identifier);
100 103
 			$image->setImageSrc($this->_base.$imageSrc);
101 104
 			$image->setImageAlt($imageAlt);
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlProgressbar.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Ajax\bootstrap\html\base\HtmlBsDoubleElement;
6 6
 use Ajax\JsUtils;
7
-
8 7
 use Ajax\bootstrap\html\base\CssRef;
9 8
 use Ajax\service\JArray;
10 9
 
Please login to merge, or discard this patch.
Braces   +21 added lines, -17 removed lines patch added patch discarded remove patch
@@ -33,11 +33,12 @@  discard block
 block discarded – undo
33 33
 			foreach ($this->content as $pb){
34 34
 				$pb->setActive($value);
35 35
 			}
36
-		}else{
37
-			if ($value===true)
38
-				$this->active="active";
39
-			else
40
-				$this->active="";
36
+		} else{
37
+			if ($value===true) {
38
+							$this->active="active";
39
+			} else {
40
+							$this->active="";
41
+			}
41 42
 		}
42 43
 		return $this;
43 44
 	}
@@ -47,11 +48,12 @@  discard block
 block discarded – undo
47 48
 			foreach ($this->content as $pb){
48 49
 				$pb->setStriped($value);
49 50
 			}
50
-		}else{
51
-			if ($value===true)
52
-				$this->striped="progress-bar-striped";
53
-			else
54
-				$this->striped="";
51
+		} else{
52
+			if ($value===true) {
53
+							$this->striped="progress-bar-striped";
54
+			} else {
55
+							$this->striped="";
56
+			}
55 57
 		}
56 58
 		return $this;
57 59
 	}
@@ -61,11 +63,12 @@  discard block
 block discarded – undo
61 63
 			foreach ($this->content as $pb){
62 64
 				$pb->showCaption($value);
63 65
 			}
64
-		}else{
65
-			if ($value===true)
66
-				$this->caption="%value%%";
67
-			else
68
-				$this->caption='<span class="sr-only">%value%% Complete (%style%)</span>';
66
+		} else{
67
+			if ($value===true) {
68
+							$this->caption="%value%%";
69
+			} else {
70
+							$this->caption='<span class="sr-only">%value%% Complete (%style%)</span>';
71
+			}
69 72
 		}
70 73
 		return $this;
71 74
 	}
@@ -137,8 +140,9 @@  discard block
 block discarded – undo
137 140
 		if(isset($this->styleLimits)&& JArray::isAssociative($this->styleLimits)){
138 141
 			foreach ($this->styleLimits as $k=>$v){
139 142
 				$actualStyle=$k;
140
-				if($v>$this->value)
141
-					break;
143
+				if($v>$this->value) {
144
+									break;
145
+				}
142 146
 			}
143 147
 		}
144 148
 		$this->style=$actualStyle;
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormFields.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Ajax\semantic\html\base\HtmlSemCollection;
6 6
 use Ajax\semantic\html\base\constants\Wide;
7 7
 use Ajax\JsUtils;
8
-
9 8
 use Ajax\semantic\html\base\HtmlSemDoubleElement;
10 9
 use Ajax\semantic\html\collections\form\traits\FieldsTrait;
11 10
 
Please login to merge, or discard this patch.
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,12 +29,14 @@  discard block
 block discarded – undo
29 29
 				if (\is_string($end)) {
30 30
 					$label=$end;
31 31
 					\array_pop($fields);
32
-				} else
33
-					$label=NULL;
32
+				} else {
33
+									$label=NULL;
34
+				}
34 35
 			}
35 36
 		}
36
-		if (isset($label))
37
-			$this->setLabel($label);
37
+		if (isset($label)) {
38
+					$this->setLabel($label);
39
+		}
38 40
 		foreach ( $fields as $field ) {
39 41
 			$this->addItem($field);
40 42
 		}
@@ -57,8 +59,9 @@  discard block
 block discarded – undo
57 59
 
58 60
 	public function addItem($item) {
59 61
 		$item=parent::addItem($item);
60
-		if($item instanceof HtmlFormField)
61
-			$item->setContainer($this);
62
+		if($item instanceof HtmlFormField) {
63
+					$item->setContainer($this);
64
+		}
62 65
 		return $item;
63 66
 	}
64 67
 
@@ -66,8 +69,9 @@  discard block
 block discarded – undo
66 69
 		if ($this->_equalWidth) {
67 70
 			$count=$this->count();
68 71
 			$this->addToProperty("class", Wide::getConstants()["W".$count]." fields");
69
-		} else
70
-			$this->addToProperty("class", "fields");
72
+		} else {
73
+					$this->addToProperty("class", "fields");
74
+		}
71 75
 		return parent::compile($js, $view);
72 76
 	}
73 77
 
@@ -108,8 +112,9 @@  discard block
 block discarded – undo
108 112
 			$fields[]=$itemO;
109 113
 		}
110 114
 		$radios=new HtmlFormFields("fields-".$name, $fields);
111
-		if (isset($label))
112
-			$radios->setLabel($label)->setProperty("for", $name);
115
+		if (isset($label)) {
116
+					$radios->setLabel($label)->setProperty("for", $name);
117
+		}
113 118
 		return $radios;
114 119
 	}
115 120
 
@@ -125,8 +130,9 @@  discard block
 block discarded – undo
125 130
 			$fields[]=$itemO;
126 131
 		}
127 132
 		$checkeds=new HtmlFormFields("fields-".$name, $fields);
128
-		if (isset($label))
129
-			$checkeds->setLabel($label)->setProperty("for", $name);
133
+		if (isset($label)) {
134
+					$checkeds->setLabel($label)->setProperty("for", $name);
135
+		}
130 136
 		return $checkeds;
131 137
 	}
132 138
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlBreadcrumb.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Ajax\semantic\html\base\HtmlSemNavElement;
6 6
 use Ajax\semantic\html\base\HtmlSemDoubleElement;
7
-
8 7
 use Ajax\semantic\html\elements\HtmlIcon;
9 8
 use Ajax\JsUtils;
10 9
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -181,9 +181,9 @@
 block discarded – undo
181 181
 	protected function createItem($value) {
182 182
 		$count=$this->count();
183 183
 		$itemO=new HtmlSemDoubleElement("item-" . $this->identifier . "-" . $count, "a", "section");
184
-		if (\is_array($value))
185
-			$itemO->fromArray($value);
186
-		else {
184
+		if (\is_array($value)) {
185
+					$itemO->fromArray($value);
186
+		} else {
187 187
 			$itemO->setContent($value);
188 188
 		}
189 189
 		return $itemO;
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlAbsractItem.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Ajax\semantic\html\base\HtmlSemDoubleElement;
6 6
 use Ajax\semantic\html\elements\HtmlIcon;
7 7
 use Ajax\JsUtils;
8
-
9 8
 use Ajax\service\JArray;
10 9
 use Ajax\semantic\html\elements\html5\HtmlImg;
11 10
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,8 +24,9 @@  discard block
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	public function removeIcon(){
27
-		if(isset($this->content["icon"]))
28
-			unset($this->content["icon"]);
27
+		if(isset($this->content["icon"])) {
28
+					unset($this->content["icon"]);
29
+		}
29 30
 		return $this;
30 31
 	}
31 32
 
@@ -63,7 +64,7 @@  discard block
 block discarded – undo
63 64
 			$this->setTagName("div");
64 65
 			$this->removeProperty("href");
65 66
 			$this->addToPropertyCtrl("class", "active", array("active"));
66
-		}else{
67
+		} else{
67 68
 			$this->removePropertyValue("class", "active");
68 69
 		}
69 70
 		return $this;
@@ -71,8 +72,9 @@  discard block
 block discarded – undo
71 72
 
72 73
 	public function asLink($href=NULL,$part=NULL){
73 74
 		$this->setTagName("a");
74
-		if(isset($href))
75
-			$this->setProperty("href", $href);
75
+		if(isset($href)) {
76
+					$this->setProperty("href", $href);
77
+		}
76 78
 		return $this;
77 79
 	}
78 80
 
@@ -83,8 +85,9 @@  discard block
 block discarded – undo
83 85
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
84 86
 	 */
85 87
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
86
-		if(\is_array($this->content) && JArray::isAssociative($this->content))
87
-			$this->content=JArray::sortAssociative($this->content, [ "icon","image","content" ]);
88
+		if(\is_array($this->content) && JArray::isAssociative($this->content)) {
89
+					$this->content=JArray::sortAssociative($this->content, [ "icon","image","content" ]);
90
+		}
88 91
 		return parent::compile($js, $view);
89 92
 	}
90 93
 }
Please login to merge, or discard this patch.
Ajax/ui/properties/Position.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,9 @@
 block discarded – undo
74 74
 	protected function setParamCtrl($key, $value, $typeCtrl) {
75 75
 		if (!$typeCtrl($value)) {
76 76
 			throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$key." à la position");
77
-		} else
78
-			$this->setParam($key, $value);
77
+		} else {
78
+					$this->setParam($key, $value);
79
+		}
79 80
 	}
80 81
 
81 82
 	/*
Please login to merge, or discard this patch.
Ajax/ui/components/Accordion.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@
 block discarded – undo
49 49
 	 * @return $this
50 50
 	 */
51 51
 	public function setAnimate($value) {
52
-		if ($value instanceof Animation)
53
-			$value=$value->getParams();
54
-		else if (is_string($value)) {
52
+		if ($value instanceof Animation) {
53
+					$value=$value->getParams();
54
+		} else if (is_string($value)) {
55 55
 			$animation=new Animation();
56 56
 			$animation->setEasing($value);
57 57
 		}
Please login to merge, or discard this patch.
Ajax/ui/components/DialogButton.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@
 block discarded – undo
15 15
 class DialogButton extends BaseComponent {
16 16
 
17 17
 	private function addFunction($jsCode) {
18
-		if (!Text::startsWith($jsCode, "function"))
19
-			$jsCode="%function(){" . $jsCode . "}%";
18
+		if (!Text::startsWith($jsCode, "function")) {
19
+					$jsCode="%function(){" . $jsCode . "}%";
20
+		}
20 21
 		return $jsCode;
21 22
 	}
22 23
 
Please login to merge, or discard this patch.
Ajax/semantic/components/search/SearchResult.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,8 +81,9 @@
 block discarded – undo
81 81
 		$vars=get_object_vars($this);
82 82
 		$result=array ();
83 83
 		foreach ( $vars as $k => $v ) {
84
-			if (isset($v))
85
-				$result[$k]=$v;
84
+			if (isset($v)) {
85
+							$result[$k]=$v;
86
+			}
86 87
 		}
87 88
 		return $result;
88 89
 	}
Please login to merge, or discard this patch.