Completed
Push — master ( e04e71...98392d )
by Jean-Christophe
03:50
created
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
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@
 block discarded – undo
13 13
 	}
14 14
 
15 15
 	protected function createItem($value) {
16
-		$result=new HtmlCard("card-" . $this->count());
16
+		$result=new HtmlCard("card-".$this->count());
17 17
 		if (\is_array($value)) {
18 18
 			$header=JArray::getValue($value, "header", 0);
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
22
+		}else
23 23
 			$result->addCardContent($value);
24 24
 		return $result;
25 25
 	}
Please login to merge, or discard this patch.
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.
Ajax/semantic/html/views/HtmlCard.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -16,19 +16,19 @@  discard block
 block discarded – undo
16 16
 class HtmlCard extends HtmlSemDoubleElement {
17 17
 
18 18
 	public function __construct($identifier) {
19
-		parent::__construct($identifier, "div", "ui card", array ());
19
+		parent::__construct($identifier, "div", "ui card", array());
20 20
 	}
21 21
 
22 22
 	private function createContent($content, $baseClass="content") {
23 23
 		$count=\sizeof($this->content);
24
-		$result=new HtmlCardContent("content-" . $count . "-" . $this->identifier, $content);
24
+		$result=new HtmlCardContent("content-".$count."-".$this->identifier, $content);
25 25
 		$result->setClass($baseClass);
26 26
 		return $result;
27 27
 	}
28 28
 
29 29
 	private function addElementInContent($key, $element) {
30
-		if (\array_key_exists($key, $this->content) === false) {
31
-			$this->content[$key]=array ();
30
+		if (\array_key_exists($key, $this->content)===false) {
31
+			$this->content[$key]=array();
32 32
 		}
33 33
 		$this->content[$key][]=$element;
34 34
 		return $element;
@@ -36,14 +36,14 @@  discard block
 block discarded – undo
36 36
 
37 37
 	public function addHeader($header, $niveau=4, $type="page") {
38 38
 		if (!$header instanceof HtmlHeader) {
39
-			$header=new HtmlHeader("header-" . $this->identifier, $niveau, $header, $type);
39
+			$header=new HtmlHeader("header-".$this->identifier, $niveau, $header, $type);
40 40
 		}
41 41
 		$this->content["header"]=$this->createContent($header);
42 42
 	}
43 43
 
44 44
 	public function addImage($image, $title="") {
45 45
 		if (!$image instanceof HtmlImage) {
46
-			$image=new HtmlImage("image-" . $this->identifier, $image, $title);
46
+			$image=new HtmlImage("image-".$this->identifier, $image, $title);
47 47
 		}
48 48
 		$image->setClass("image");
49 49
 		return $this->addElementInContent("content", $image);
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	public function addReveal($visibleContent, $hiddenContent=NULL, $type=RevealType::FADE, $attributeType=NULL) {
53 53
 		$reveal=$visibleContent;
54 54
 		if (!$visibleContent instanceof HtmlReveal) {
55
-			$reveal=new HtmlReveal("reveral-" . $this->identifier, $visibleContent, $hiddenContent, $type, $attributeType);
55
+			$reveal=new HtmlReveal("reveral-".$this->identifier, $visibleContent, $hiddenContent, $type, $attributeType);
56 56
 		}
57 57
 		return $this->addElementInContent("content", $reveal);
58 58
 	}
@@ -78,15 +78,15 @@  discard block
 block discarded – undo
78 78
 
79 79
 	public function addCardHeaderContent($header, $metas=array(), $description=NULL) {
80 80
 		$count=\sizeof($this->content);
81
-		return $this->addElementInContent("content", new HtmlCardHeaderContent("content-" . $count . "-" . $this->identifier, $header, $metas, $description));
81
+		return $this->addElementInContent("content", new HtmlCardHeaderContent("content-".$count."-".$this->identifier, $header, $metas, $description));
82 82
 	}
83 83
 
84 84
 	public function addCardContent($content=array()) {
85 85
 		$count=\sizeof($this->content);
86
-		return $this->addElementInContent("content", new HtmlCardContent("content-" . $count . "-" . $this->identifier, $content));
86
+		return $this->addElementInContent("content", new HtmlCardContent("content-".$count."-".$this->identifier, $content));
87 87
 	}
88 88
 
89
-	public function getCardContent($index){
89
+	public function getCardContent($index) {
90 90
 		return $this->content["content"][$index];
91 91
 	}
92 92
 
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
98 98
 	 */
99 99
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
100
-		$this->content=JArray::sortAssociative($this->content, [ "header","image","content","extra-content" ]);
100
+		$this->content=JArray::sortAssociative($this->content, ["header", "image", "content", "extra-content"]);
101 101
 		return parent::compile($js, $view);
102 102
 	}
103 103
 
104 104
 	public function asLink($href="") {
105 105
 		$this->addToProperty("class", "link");
106
-		if ($href !== "") {
106
+		if ($href!=="") {
107 107
 			$this->setProperty("href", $href);
108 108
 		}
109 109
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlMenuItem.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/semantic/html/content/card/HtmlCardHeaderContent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 class HtmlCardHeaderContent extends HtmlCardContent {
11 11
 
12 12
 	public function __construct($identifier, $header=NULL, $metas=array(), $description=NULL) {
13
-		parent::__construct($identifier, array ());
13
+		parent::__construct($identifier, array());
14 14
 		if (isset($header)) {
15 15
 			$this->setHeader($header);
16 16
 		}
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 	}
22 22
 
23 23
 	public function setDescription($value) {
24
-		$this->content["description"]=new HtmlSemDoubleElement("description-" . $this->identifier, "div", "description", $value);
24
+		$this->content["description"]=new HtmlSemDoubleElement("description-".$this->identifier, "div", "description", $value);
25 25
 	}
26 26
 
27 27
 	public function setHeader($value) {
28
-		$this->content["header"]=new HtmlSemDoubleElement("header-" . $this->identifier, "a", "header", $value);
28
+		$this->content["header"]=new HtmlSemDoubleElement("header-".$this->identifier, "a", "header", $value);
29 29
 	}
30 30
 
31 31
 	/**
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
36 36
 	 */
37 37
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
38
-		$this->content=JArray::sortAssociative($this->content, [ "image","header","meta","description" ]);
38
+		$this->content=JArray::sortAssociative($this->content, ["image", "header", "meta", "description"]);
39 39
 		return parent::compile($js, $view);
40 40
 	}
41 41
 }
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/content/card/HtmlCardContent.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,16 +15,16 @@  discard block
 block discarded – undo
15 15
 
16 16
 	private function addElement($content, $baseClass) {
17 17
 		$count=\sizeof($this->content);
18
-		$result=new HtmlSemDoubleElement("element-" . $count . "-" . $this->identifier, "div", $baseClass, $content);
18
+		$result=new HtmlSemDoubleElement("element-".$count."-".$this->identifier, "div", $baseClass, $content);
19 19
 		$this->addContent($result);
20 20
 		return $result;
21 21
 	}
22 22
 
23 23
 	public function addMeta($value, $direction=Direction::LEFT) {
24
-		if (\array_key_exists("meta", $this->content) === false) {
25
-			$this->content["meta"]=new HtmlSemDoubleElement("meta-" . $this->identifier, "div", "meta", array ());
24
+		if (\array_key_exists("meta", $this->content)===false) {
25
+			$this->content["meta"]=new HtmlSemDoubleElement("meta-".$this->identifier, "div", "meta", array());
26 26
 		}
27
-		if ($direction === Direction::RIGHT) {
27
+		if ($direction===Direction::RIGHT) {
28 28
 			$value=new HtmlSemDoubleElement("", "span", "", $value);
29 29
 			$value->setFloated($direction);
30 30
 		}
@@ -42,26 +42,26 @@  discard block
 block discarded – undo
42 42
 
43 43
 	public function addMetas($metas) {
44 44
 		if (\is_array($metas)) {
45
-			foreach ( $metas as $meta ) {
45
+			foreach ($metas as $meta) {
46 46
 				$this->addMeta($meta);
47 47
 			}
48
-		} else
48
+		}else
49 49
 			$this->addMeta($metas);
50 50
 		return $this;
51 51
 	}
52 52
 
53 53
 	public function addContentIcon($icon, $caption=NULL, $direction=Direction::LEFT) {
54
-		if ($direction === Direction::RIGHT) {
54
+		if ($direction===Direction::RIGHT) {
55 55
 			if (isset($caption)) {
56 56
 				$result=new HtmlSemDoubleElement("", "span", "", $caption);
57 57
 				$result->addIcon($icon);
58 58
 				$this->addContent($result);
59
-			} else {
59
+			}else {
60 60
 				$result=new HtmlIcon("", $icon);
61 61
 				$this->addContent($result);
62 62
 			}
63 63
 			$result->setFloated($direction);
64
-		} else {
64
+		}else {
65 65
 			$this->addIcon($icon);
66 66
 			$result=$this->addContent($caption);
67 67
 		}
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	}
70 70
 
71 71
 	public function addContentIcons($icons, $direction=Direction::LEFT) {
72
-		foreach ( $icons as $icon ) {
72
+		foreach ($icons as $icon) {
73 73
 			$this->addContentIcon($icon, NULL, $direction);
74 74
 		}
75 75
 		return $this;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@  discard block
 block discarded – undo
34 34
 
35 35
 	public function addImage($src="", $alt="", $size=NULL) {
36 36
 		$image=new HtmlImg("img-", $src, $alt);
37
-		if (isset($size))
38
-			$image->setSize($size);
37
+		if (isset($size)) {
38
+					$image->setSize($size);
39
+		}
39 40
 		$this->content["image"]=$image;
40 41
 		return $image;
41 42
 	}
@@ -45,8 +46,9 @@  discard block
 block discarded – undo
45 46
 			foreach ( $metas as $meta ) {
46 47
 				$this->addMeta($meta);
47 48
 			}
48
-		} else
49
-			$this->addMeta($metas);
49
+		} else {
50
+					$this->addMeta($metas);
51
+		}
50 52
 		return $this;
51 53
 	}
52 54
 
Please login to merge, or discard this patch.