Completed
Push — master ( 299fb1...80f966 )
by Jean-Christophe
03:11
created
Ajax/php/yii/JsUtils.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
 
7 7
 class JsUtils extends \Ajax\JsUtils{
8 8
 	public function getUrl($url){
9
-		if($url==="")
10
-			$url="/";
9
+		if($url==="") {
10
+					$url="/";
11
+		}
11 12
 		return Url::toRoute($url);
12 13
 	}
13 14
 
Please login to merge, or discard this patch.
Ajax/lib/CDNBase.php 1 patch
Braces   +16 added lines, -12 removed lines patch added patch discarded remove patch
@@ -33,11 +33,13 @@  discard block
 block discarded – undo
33 33
 	}
34 34
 
35 35
 	protected function getUrlOrCss($element, $key) {
36
-		if (isset($element))
37
-			return $element;
36
+		if (isset($element)) {
37
+					return $element;
38
+		}
38 39
 		$version=$this->version;
39
-		if (array_search($version, $this->getVersions())===false)
40
-			$version=$this->getLastVersion();
40
+		if (array_search($version, $this->getVersions())===false) {
41
+					$version=$this->getLastVersion();
42
+		}
41 43
 		return $this->replaceVersion($this->data [$this->provider] [$key], $version);
42 44
 	}
43 45
 
@@ -59,16 +61,17 @@  discard block
 block discarded – undo
59 61
 	}
60 62
 
61 63
 	protected function replaceVersionAndTheme($url, $version, $theme) {
62
-		if (isset($theme))
63
-			return str_ireplace(array (
64
+		if (isset($theme)) {
65
+					return str_ireplace(array (
64 66
 					"%theme%",
65 67
 					"%version%" 
66 68
 			), array (
67 69
 					$theme,
68 70
 					$version 
69 71
 			), $url);
70
-		else
71
-			return $this->replaceVersion($url, $version);
72
+		} else {
73
+					return $this->replaceVersion($url, $version);
74
+		}
72 75
 	}
73 76
 
74 77
 	public function getProviders() {
@@ -76,10 +79,11 @@  discard block
 block discarded – undo
76 79
 	}
77 80
 
78 81
 	public function getVersions($provider=NULL) {
79
-		if (isset($provider))
80
-			return $this->data [$provider] ["versions"];
81
-		else
82
-			return $this->data [$this->provider] ["versions"];
82
+		if (isset($provider)) {
83
+					return $this->data [$provider] ["versions"];
84
+		} else {
85
+					return $this->data [$this->provider] ["versions"];
86
+		}
83 87
 	}
84 88
 
85 89
 	public function getLastVersion($provider=NULL) {
Please login to merge, or discard this patch.
Ajax/lib/CDNGuiGen.php 1 patch
Braces   +22 added lines, -16 removed lines patch added patch discarded remove patch
@@ -14,10 +14,11 @@  discard block
 block discarded – undo
14 14
 		$this->data=$this->data ["JQueryUI"];
15 15
 		if (is_int($theme)) {
16 16
 			$themes=$this->getThemes();
17
-			if (sizeof($themes)>$theme-1)
18
-				$this->theme=$themes [$theme-1];
19
-			else
20
-				throw new \Exception("CDNGuiGen : Le numéro de thème demandé n'existe pas");
17
+			if (sizeof($themes)>$theme-1) {
18
+							$this->theme=$themes [$theme-1];
19
+			} else {
20
+							throw new \Exception("CDNGuiGen : Le numéro de thème demandé n'existe pas");
21
+			}
21 22
 		}
22 23
 		$this->theme=$theme;
23 24
 		$this->cssUrl=null;
@@ -28,16 +29,18 @@  discard block
 block discarded – undo
28 29
 	}
29 30
 
30 31
 	public function getThemes($provider=NULL) {
31
-		if (isset($provider))
32
-			return $this->data [$provider] ["themes"];
33
-		else
34
-			return $this->data [$this->provider] ["themes"];
32
+		if (isset($provider)) {
33
+					return $this->data [$provider] ["themes"];
34
+		} else {
35
+					return $this->data [$this->provider] ["themes"];
36
+		}
35 37
 	}
36 38
 
37 39
 	public function getFirstTheme($provider=NULL) {
38 40
 		$themes=$this->getThemes($provider);
39
-		if (sizeof($themes)>0)
40
-			return $themes [0];
41
+		if (sizeof($themes)>0) {
42
+					return $themes [0];
43
+		}
41 44
 		return "";
42 45
 	}
43 46
 
@@ -46,14 +49,17 @@  discard block
 block discarded – undo
46 49
 	}
47 50
 
48 51
 	public function getCss() {
49
-		if (isset($this->cssUrl))
50
-			return $this->cssUrl;
52
+		if (isset($this->cssUrl)) {
53
+					return $this->cssUrl;
54
+		}
51 55
 		$version=$this->version;
52
-		if (array_search($version, $this->getVersions())===false)
53
-			$version=$this->getLastVersion();
56
+		if (array_search($version, $this->getVersions())===false) {
57
+					$version=$this->getLastVersion();
58
+		}
54 59
 		$theme=$this->theme;
55
-		if (array_search($theme, $this->getThemes())===false)
56
-			$theme=$this->getFirstTheme();
60
+		if (array_search($theme, $this->getThemes())===false) {
61
+					$theme=$this->getFirstTheme();
62
+		}
57 63
 		return $this->replaceVersionAndTheme($this->data [$this->provider] ["css"], $version, $theme);
58 64
 	}
59 65
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlAccordionMenu.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,9 @@
 block discarded – undo
62 62
 	 * @see BaseHtml::run()
63 63
 	 */
64 64
 	public function run(JsUtils $js) {
65
-		if(isset($this->_bsComponent)===false)
66
-			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
65
+		if(isset($this->_bsComponent)===false) {
66
+					$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
67
+		}
67 68
 			$this->addEventsOnRun($js);
68 69
 			return $this->_bsComponent;
69 70
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlMenuItem.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 				$title=@$content[1];
18 18
 				$desc=@$content[2];
19 19
 				$status=@$content[3];
20
-			}else{
20
+			} else{
21 21
 				$icon=@$content["icon"];
22 22
 				$title=@$content["title"];
23 23
 				$desc=@$content["description"];
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 			if(isset($title)===true){
33 33
 				$this->setTitle($title,$desc);
34 34
 			}
35
-		}else{
35
+		} else{
36 36
 			$this->setContent($content);
37 37
 		}
38 38
 	}
Please login to merge, or discard this patch.
Ajax/php/cakephp/_JsUtils.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 		$viewVars=$view->viewVars;
14 14
 		if (isset($viewVars["q"]) === false) {
15 15
 			$controls=array ();
16
-		}else{
16
+		} else{
17 17
 			$controls=$viewVars["q"];
18 18
 		}
19 19
 		$controls[$identifier]=$content;
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlStepItem.php 1 patch
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 				$title=@$content[1];
18 18
 				$desc=@$content[2];
19 19
 				$status=@$content[3];
20
-			}else{
20
+			} else{
21 21
 				$icon=@$content["icon"];
22 22
 				$title=@$content["title"];
23 23
 				$desc=@$content["description"];
@@ -32,16 +32,17 @@  discard block
 block discarded – undo
32 32
 			if(isset($title)===true){
33 33
 				$this->setTitle($title,$desc);
34 34
 			}
35
-		}else{
35
+		} else{
36 36
 			$this->setContent($content);
37 37
 		}
38 38
 	}
39 39
 
40 40
 	public function setActive($value=true){
41
-		if($value)
42
-			$this->setStatus(StepStatus::ACTIVE);
43
-		else
44
-			$this->setStatus(StepStatus::NONE);
41
+		if($value) {
42
+					$this->setStatus(StepStatus::ACTIVE);
43
+		} else {
44
+					$this->setStatus(StepStatus::NONE);
45
+		}
45 46
 		return $this;
46 47
 	}
47 48
 
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlTab.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -67,8 +67,9 @@  discard block
 block discarded – undo
67 67
 		if($index<$menu->count()){
68 68
 			if(isset($this->content[$index])===false){
69 69
 				$this->content[$index]=$this->createSegment($index, $content, $menu->getItem($index)->getIdentifier());
70
-			}else
71
-				$this->content[$index]->setContent($content);
70
+			} else {
71
+							$this->content[$index]->setContent($content);
72
+			}
72 73
 		}
73 74
 		return $this;
74 75
 	}
@@ -228,15 +229,17 @@  discard block
 block discarded – undo
228 229
 	 * @see BaseHtml::run()
229 230
 	 */
230 231
 	public function run(JsUtils $js) {
231
-		if(isset($this->_bsComponent)===false)
232
-			$this->_bsComponent=$js->semantic()->tab("#".$this->identifier." .item",$this->params);
232
+		if(isset($this->_bsComponent)===false) {
233
+					$this->_bsComponent=$js->semantic()->tab("#".$this->identifier." .item",$this->params);
234
+		}
233 235
 			$this->addEventsOnRun($js);
234 236
 			return $this->_bsComponent;
235 237
 	}
236 238
 
237 239
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
238
-		if($this->content["menu"]->count()>0 && \sizeof($this->content)>1)
239
-			$this->activate(0);
240
+		if($this->content["menu"]->count()>0 && \sizeof($this->content)>1) {
241
+					$this->activate(0);
242
+		}
240 243
 		return parent::compile($js,$view);
241 244
 	}
242 245
 }
243 246
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 1 patch
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,8 +32,9 @@  discard block
 block discarded – undo
32 32
 	}
33 33
 
34 34
 	public function setPopupAttributes($variation=NULL, $popupEvent=NULL) {
35
-		if (isset($this->_popup))
36
-			$this->_popup->setAttributes($variation, $popupEvent);
35
+		if (isset($this->_popup)) {
36
+					$this->_popup->setAttributes($variation, $popupEvent);
37
+		}
37 38
 	}
38 39
 
39 40
 	public function addPopup($title="", $content="", $variation=NULL, $params=array()) {
@@ -60,8 +61,9 @@  discard block
 block discarded – undo
60 61
 		$labelO=$label;
61 62
 		if (\is_object($label) === false) {
62 63
 			$labelO=new HtmlLabel("label-" . $this->identifier, $label);
63
-			if (isset($icon))
64
-				$labelO->addIcon($icon);
64
+			if (isset($icon)) {
65
+							$labelO->addIcon($icon);
66
+			}
65 67
 		} else {
66 68
 			$labelO->addToPropertyCtrl("class", "label", array ("label" ));
67 69
 		}
@@ -80,21 +82,24 @@  discard block
 block discarded – undo
80 82
 	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
81 83
 	 */
82 84
 	public function asLink($href=NULL) {
83
-		if (isset($href))
84
-			$this->setProperty("href", $href);
85
+		if (isset($href)) {
86
+					$this->setProperty("href", $href);
87
+		}
85 88
 		return $this->setTagName("a");
86 89
 	}
87 90
 
88 91
 	public function jsShowDimmer($show=true) {
89 92
 		$status="hide";
90
-		if ($show === true)
91
-			$status="show";
93
+		if ($show === true) {
94
+					$status="show";
95
+		}
92 96
 		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
93 97
 	}
94 98
 
95 99
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
96
-	if (isset($this->_popup))
97
-			$this->_popup->compile($js);
100
+	if (isset($this->_popup)) {
101
+				$this->_popup->compile($js);
102
+	}
98 103
 		return parent::compile($js, $view);
99 104
 	}
100 105
 
Please login to merge, or discard this patch.