Completed
Push — master ( 29801f...fdca69 )
by Jean-Christophe
03:11
created
Ajax/semantic/html/content/HtmlListItem.php 1 patch
Spacing   +15 added lines, -15 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,21 +25,21 @@  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
 	}
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
 		return $list;
51 51
 	}
52 52
 
53
-	public function getList(){
53
+	public function getList() {
54 54
 		return $this->content["list"];
55 55
 	}
56 56
 
57
-	public function getItem($index){
57
+	public function getItem($index) {
58 58
 		return $this->getList()->getItem($index);
59 59
 	}
60 60
 }
61 61
\ No newline at end of file
Please login to merge, or discard this patch.