Completed
Push — master ( 8310f7...eb7f5d )
by Jean-Christophe
02:57
created
Ajax/semantic/html/content/HtmlListItem.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,15 +9,15 @@  discard block
 block discarded – undo
9 9
 	protected $image;
10 10
 
11 11
 	public function __construct($identifier, $content=NULL) {
12
-		parent::__construct($identifier,"item",$content);
12
+		parent::__construct($identifier, "item", $content);
13 13
 	}
14
-	protected function initContent($content){
15
-		if(\is_array($content)){
16
-			if(JArray::isAssociative($content)===false){
14
+	protected function initContent($content) {
15
+		if (\is_array($content)) {
16
+			if (JArray::isAssociative($content)===false) {
17 17
 				$icon=@$content[0];
18 18
 				$title=@$content[1];
19 19
 				$desc=@$content[2];
20
-			}else{
20
+			} else {
21 21
 				$icon=@$content["icon"];
22 22
 				$image=@$content["image"];
23 23
 				$title=@$content["title"];
@@ -25,38 +25,38 @@  discard block
 block discarded – undo
25 25
 				$desc=@$content["description"];
26 26
 				$items=@$content["items"];
27 27
 			}
28
-			if(isset($icon)){
28
+			if (isset($icon)) {
29 29
 				$this->setIcon($icon);
30 30
 			}
31
-			if(isset($image)){
31
+			if (isset($image)) {
32 32
 				$this->setImage($image);
33 33
 			}
34
-			if(isset($title)){
35
-				$this->setTitle($title,$desc);
36
-			}elseif (isset($header)){
37
-				$this->setTitle($header,$desc,"header");
34
+			if (isset($title)) {
35
+				$this->setTitle($title, $desc);
36
+			}elseif (isset($header)) {
37
+				$this->setTitle($header, $desc, "header");
38 38
 			}
39
-			if(isset($items)){
39
+			if (isset($items)) {
40 40
 				$this->addList($items);
41 41
 			}
42
-		}else{
42
+		} else {
43 43
 			$this->setContent($content);
44 44
 		}
45 45
 	}
46
-	public function addList($items=array(),$ordered=false) {
46
+	public function addList($items=array(), $ordered=false) {
47 47
 		$list=new HtmlList("", $items);
48
-		if($ordered)
48
+		if ($ordered)
49 49
 			$list->setOrdered();
50 50
 		$list->setClass("list");
51 51
 		$this->content["list"]=$list;
52 52
 		return $list;
53 53
 	}
54 54
 
55
-	public function getList(){
55
+	public function getList() {
56 56
 		return $this->content["list"];
57 57
 	}
58 58
 
59
-	public function getItem($index){
59
+	public function getItem($index) {
60 60
 		return $this->getList()->getItem($index);
61 61
 	}
62 62
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 				$icon=@$content[0];
18 18
 				$title=@$content[1];
19 19
 				$desc=@$content[2];
20
-			}else{
20
+			} else{
21 21
 				$icon=@$content["icon"];
22 22
 				$image=@$content["image"];
23 23
 				$title=@$content["title"];
@@ -33,20 +33,21 @@  discard block
 block discarded – undo
33 33
 			}
34 34
 			if(isset($title)){
35 35
 				$this->setTitle($title,$desc);
36
-			}elseif (isset($header)){
36
+			} elseif (isset($header)){
37 37
 				$this->setTitle($header,$desc,"header");
38 38
 			}
39 39
 			if(isset($items)){
40 40
 				$this->addList($items);
41 41
 			}
42
-		}else{
42
+		} else{
43 43
 			$this->setContent($content);
44 44
 		}
45 45
 	}
46 46
 	public function addList($items=array(),$ordered=false) {
47 47
 		$list=new HtmlList("", $items);
48
-		if($ordered)
49
-			$list->setOrdered();
48
+		if($ordered) {
49
+					$list->setOrdered();
50
+		}
50 51
 		$list->setClass("list");
51 52
 		$this->content["list"]=$list;
52 53
 		return $list;
Please login to merge, or discard this patch.