Completed
Push — master ( 8b7375...189ad5 )
by Jean-Christophe
03:49
created
Ajax/semantic/html/modules/HtmlDimmer.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 class HtmlDimmer extends HtmlSemDoubleElement {
11 11
 	private $_container;
12
-	private $_params=array ();
12
+	private $_params=array();
13 13
 	private $_inverted;
14 14
 
15 15
 	public function __construct($identifier, $content=NULL) {
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
 	}
20 20
 
21 21
 	public function setContent($content) {
22
-		$this->content=new HtmlSemDoubleElement("content-" . $this->identifier, "div", "content", new HtmlSemDoubleElement("", "div", "center", $content));
22
+		$this->content=new HtmlSemDoubleElement("content-".$this->identifier, "div", "content", new HtmlSemDoubleElement("", "div", "center", $content));
23 23
 		return $this;
24 24
 	}
25 25
 
26 26
 	public function asIcon($icon, $title, $subHeader=NULL) {
27
-		$header=new HtmlHeader("header-" . $this->identifier);
27
+		$header=new HtmlHeader("header-".$this->identifier);
28 28
 		$header->asIcon($icon, $title, $subHeader);
29
-		if ($this->_inverted === false)
29
+		if ($this->_inverted===false)
30 30
 			$header->setInverted();
31 31
 		return $this->setContent($header);
32 32
 	}
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 
44 44
 	public function run(JsUtils $js) {
45 45
 		if ($this->_container instanceof HtmlSingleElement)
46
-			$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
46
+			$this->_bsComponent=$js->semantic()->dimmer("#".$this->_container->getIdentifier(), $this->_params);
47 47
 		return parent::run($js);
48 48
 	}
49 49
 
50 50
 	public function jsShow() {
51
-		if (isset($this->_container) === true)
52
-			return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
51
+		if (isset($this->_container)===true)
52
+			return '$("#.'.$this->_container->getIdentifier().').dimmer("show");';
53 53
 	}
54 54
 
55 55
 	public function setBlurring() {
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@  discard block
 block discarded – undo
26 26
 	public function asIcon($icon, $title, $subHeader=NULL) {
27 27
 		$header=new HtmlHeader("header-" . $this->identifier);
28 28
 		$header->asIcon($icon, $title, $subHeader);
29
-		if ($this->_inverted === false)
30
-			$header->setInverted();
29
+		if ($this->_inverted === false) {
30
+					$header->setInverted();
31
+		}
31 32
 		return $this->setContent($header);
32 33
 	}
33 34
 
@@ -42,14 +43,16 @@  discard block
 block discarded – undo
42 43
 	}
43 44
 
44 45
 	public function run(JsUtils $js) {
45
-		if ($this->_container instanceof HtmlSingleElement)
46
-			$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
46
+		if ($this->_container instanceof HtmlSingleElement) {
47
+					$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
48
+		}
47 49
 		return parent::run($js);
48 50
 	}
49 51
 
50 52
 	public function jsShow() {
51
-		if (isset($this->_container) === true)
52
-			return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
53
+		if (isset($this->_container) === true) {
54
+					return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
55
+		}
53 56
 	}
54 57
 
55 58
 	public function setBlurring() {
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,16 +46,16 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	public function addDimmer($content=NULL) {
49
-		$dimmer=new HtmlDimmer("dimmer-" . $this->identifier, $content);
49
+		$dimmer=new HtmlDimmer("dimmer-".$this->identifier, $content);
50 50
 		$this->addContent($dimmer);
51 51
 		return $dimmer;
52 52
 	}
53 53
 
54 54
 	public function jsShowDimmer($show=true) {
55 55
 		$status="hide";
56
-		if ($show === true)
56
+		if ($show===true)
57 57
 			$status="show";
58
-		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
58
+		return '$("#.'.$this->identifier.').dimmer("'.$status.'");';
59 59
 	}
60 60
 
61 61
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	}
66 66
 
67 67
 	public function run(JsUtils $js) {
68
-		$this->_bsComponent=$js->semantic()->generic("#" . $this->identifier);
68
+		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
69 69
 		parent::run($js);
70 70
 		$this->addEventsOnRun($js);
71 71
 		if (isset($this->_popup)) {
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,8 +29,9 @@  discard block
 block discarded – undo
29 29
 	}
30 30
 
31 31
 	public function setPopupAttributes($variation=NULL, $popupEvent=NULL) {
32
-		if (isset($this->_popup))
33
-			$this->_popup->setAttributes($variation, $popupEvent);
32
+		if (isset($this->_popup)) {
33
+					$this->_popup->setAttributes($variation, $popupEvent);
34
+		}
34 35
 	}
35 36
 
36 37
 	public function addPopup($title="", $content="", $variation=NULL, $params=array()) {
@@ -53,14 +54,16 @@  discard block
 block discarded – undo
53 54
 
54 55
 	public function jsShowDimmer($show=true) {
55 56
 		$status="hide";
56
-		if ($show === true)
57
-			$status="show";
57
+		if ($show === true) {
58
+					$status="show";
59
+		}
58 60
 		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
59 61
 	}
60 62
 
61 63
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
62
-		if (isset($this->_popup))
63
-			$this->_popup->compile();
64
+		if (isset($this->_popup)) {
65
+					$this->_popup->compile();
66
+		}
64 67
 		return parent::compile($js, $view);
65 68
 	}
66 69
 
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlImage.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@  discard block
 block discarded – undo
11 11
 	public function __construct($identifier, $src="", $alt="", $size=NULL) {
12 12
 		$image=new HtmlImg("img-", $src, $alt);
13 13
 		parent::__construct($identifier, "div", "ui image", $image);
14
-		if (isset($size))
15
-			$this->setSize($size);
14
+		if (isset($size)) {
15
+					$this->setSize($size);
16
+		}
16 17
 	}
17 18
 
18 19
 	public function setCircular() {
@@ -20,8 +21,9 @@  discard block
 block discarded – undo
20 21
 	}
21 22
 
22 23
 	public function asAvatar($caption=NULL) {
23
-		if (isset($caption))
24
-			$this->wrap("", $caption);
24
+		if (isset($caption)) {
25
+					$this->wrap("", $caption);
26
+		}
25 27
 		return $this->addToProperty("class", "avatar");
26 28
 	}
27 29
 
Please login to merge, or discard this patch.
Ajax/common/html/PropertyWrapper.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
 			$output=$input;
13 13
 		}
14 14
 		if (is_array($input)) {
15
-			if (sizeof($input) > 0) {
16
-				if (self::containsElement($input) === false) {
15
+			if (sizeof($input)>0) {
16
+				if (self::containsElement($input)===false) {
17 17
 					$output=self::wrapStrings($input, $js, $separator=' ', $valueQuote='"');
18
-				} else {
18
+				}else {
19 19
 					$output=self::wrapObjects($input, $js, $separator, $valueQuote);
20 20
 				}
21 21
 			}
@@ -24,31 +24,31 @@  discard block
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	private static function containsElement($input) {
27
-		foreach ( $input as $v ) {
28
-			if (\is_object($v) === true || \is_array($v))
27
+		foreach ($input as $v) {
28
+			if (\is_object($v)===true || \is_array($v))
29 29
 				return true;
30 30
 		}
31 31
 		return false;
32 32
 	}
33 33
 
34 34
 	public static function wrapStrings($input, $js, $separator=' ', $valueQuote='"') {
35
-		if (JArray::isAssociative($input) === true) {
36
-			$result=implode($separator, array_map(function ($v, $k) use($valueQuote) {
37
-				return $k . '=' . $valueQuote . $v . $valueQuote;
35
+		if (JArray::isAssociative($input)===true) {
36
+			$result=implode($separator, array_map(function($v, $k) use($valueQuote) {
37
+				return $k.'='.$valueQuote.$v.$valueQuote;
38 38
 			}, $input, array_keys($input)));
39
-		} else {
39
+		}else {
40 40
 			$result=implode($separator, array_values($input));
41 41
 		}
42 42
 		return $result;
43 43
 	}
44 44
 
45 45
 	public static function wrapObjects($input, $js=NULL, $separator=' ', $valueQuote='"') {
46
-		return implode($separator, array_map(function ($v) use($js, $separator, $valueQuote) {
46
+		return implode($separator, array_map(function($v) use($js, $separator, $valueQuote) {
47 47
 			if (is_object($v))
48 48
 				return $v->compile($js);
49 49
 			elseif (\is_array($v)) {
50 50
 				return self::wrap($v, $js, $separator, $valueQuote);
51
-			} else
51
+			}else
52 52
 				return $v;
53 53
 		}, $input));
54 54
 	}
Please login to merge, or discard this patch.
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 	private static function containsElement($input) {
27 27
 		foreach ( $input as $v ) {
28
-			if (\is_object($v) === true || \is_array($v))
29
-				return true;
28
+			if (\is_object($v) === true || \is_array($v)) {
29
+							return true;
30
+			}
30 31
 		}
31 32
 		return false;
32 33
 	}
@@ -44,12 +45,13 @@  discard block
 block discarded – undo
44 45
 
45 46
 	public static function wrapObjects($input, $js=NULL, $separator=' ', $valueQuote='"') {
46 47
 		return implode($separator, array_map(function ($v) use($js, $separator, $valueQuote) {
47
-			if (is_object($v))
48
-				return $v->compile($js);
49
-			elseif (\is_array($v)) {
48
+			if (is_object($v)) {
49
+							return $v->compile($js);
50
+			} elseif (\is_array($v)) {
50 51
 				return self::wrap($v, $js, $separator, $valueQuote);
51
-			} else
52
-				return $v;
52
+			} else {
53
+							return $v;
54
+			}
53 55
 		}, $input));
54 56
 	}
55 57
 }
56 58
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/Semantic.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 use Ajax\semantic\traits\SemanticHtmlViewsTrait;
25 25
 
26 26
 class Semantic extends BaseGui {
27
-	use SemanticComponentsTrait,SemanticHtmlElementsTrait,SemanticHtmlCollectionsTrait,
28
-	SemanticHtmlModulesTrait,SemanticHtmlViewsTrait;
27
+	use SemanticComponentsTrait, SemanticHtmlElementsTrait, SemanticHtmlCollectionsTrait,
28
+	SemanticHtmlModulesTrait, SemanticHtmlViewsTrait;
29 29
 
30 30
 	public function __construct($autoCompile=true) {
31 31
 		parent::__construct($autoCompile=true);
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/html5/HtmlLink.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@
 block discarded – undo
21 21
 	 * @see \Ajax\bootstrap\html\base\HtmlSingleElement::run()
22 22
 	 */
23 23
 	public function run(JsUtils $js) {
24
-		$this->_bsComponent=$js->semantic()->generic("#" . $this->identifier);
24
+		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
25 25
 		$this->addEventsOnRun($js);
26 26
 		return $this->_bsComponent;
27 27
 	}
28 28
 
29 29
 	public function addIcon($icon, $before=true) {
30
-		return $this->addContent(new HtmlIcon("icon-" . $this->identifier, $icon), $before);
30
+		return $this->addContent(new HtmlIcon("icon-".$this->identifier, $icon), $before);
31 31
 	}
32 32
 
33 33
 	public static function icon($identifier, $icon, $href="#", $label=NULL) {
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlListItem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@
 block discarded – undo
16 16
 
17 17
 	public function addIcon($icon, $before=true) {
18 18
 		$content=$this->content;
19
-		$this->content=new HtmlSemDoubleElement("content-" . $this->identifier, "div", "content");
19
+		$this->content=new HtmlSemDoubleElement("content-".$this->identifier, "div", "content");
20 20
 		$this->content->setContent($content);
21
-		$this->content->addContent(new HtmlIcon("icon" . $this->identifier, $icon), $before);
21
+		$this->content->addContent(new HtmlIcon("icon".$this->identifier, $icon), $before);
22 22
 	}
23 23
 }
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/BaseEnum.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 	private static $constCacheArray=NULL;
13 13
 
14 14
 	public static function getConstants() {
15
-		if (self::$constCacheArray == NULL) {
16
-			self::$constCacheArray=[ ];
15
+		if (self::$constCacheArray==NULL) {
16
+			self::$constCacheArray=[];
17 17
 		}
18 18
 		$calledClass=get_called_class();
19 19
 		if (!array_key_exists($calledClass, self::$constCacheArray)) {
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	public static function getConstantValues($postFix="") {
27
-		if ($postFix == "")
27
+		if ($postFix=="")
28 28
 			return \array_values(self::getConstants());
29 29
 		else {
30
-			return \array_map(function ($elem) use($postFix) {
31
-				return $elem . " " . $postFix;
30
+			return \array_map(function($elem) use($postFix) {
31
+				return $elem." ".$postFix;
32 32
 			}, \array_values(self::getConstants()));
33 33
 		}
34 34
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	public static function getConstantValues($postFix="") {
27
-		if ($postFix == "")
28
-			return \array_values(self::getConstants());
29
-		else {
27
+		if ($postFix == "") {
28
+					return \array_values(self::getConstants());
29
+		} else {
30 30
 			return \array_map(function ($elem) use($postFix) {
31 31
 				return $elem . " " . $postFix;
32 32
 			}, \array_values(self::getConstants()));
Please login to merge, or discard this patch.
Ajax/semantic/html/views/HtmlCardGroups.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@
 block discarded – undo
19 19
 			$metas=JArray::getValue($value, "metas", 1);
20 20
 			$description=JArray::getValue($value, "description", 2);
21 21
 			$result->addCardHeaderContent($header, $metas, $description);
22
-		} else
23
-			$result->addCardContent($value);
22
+		} else {
23
+					$result->addCardContent($value);
24
+		}
24 25
 		return $result;
25 26
 	}
26 27
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	}
15 15
 
16 16
 	protected function createItem($value) {
17
-		$result=new HtmlCard("card-" . $this->count());
17
+		$result=new HtmlCard("card-".$this->count());
18 18
 		if (\is_array($value)) {
19 19
 			$header=JArray::getValue($value, "header", 0);
20 20
 			$metas=JArray::getValue($value, "metas", 1);
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 			if (isset($extra)) {
29 29
 				$result->addExtraContent($extra);
30 30
 			}
31
-		} else
31
+		}else
32 32
 			$result->addCardContent($value);
33 33
 		return $result;
34 34
 	}
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 * @param int $wide
39 39
 	 */
40 40
 	public function setWide($wide) {
41
-		$wide=Wide::getConstants()["W" . $wide];
41
+		$wide=Wide::getConstants()["W".$wide];
42 42
 		return $this->addToPropertyCtrl("class", $wide, Wide::getConstants());
43 43
 	}
44 44
 
Please login to merge, or discard this patch.