Completed
Push — master ( 9e0835...2461e8 )
by Jean-Christophe
03:27
created
Ajax/semantic/components/Dropdown.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 	 * @param string $action one of "select","auto","activate","combo","nothing","hide"
18 18
 	 * @return \Ajax\semantic\components\Dropdown
19 19
 	 */
20
-	public function setAction($action){
21
-		return $this->setParamCtrl("action", $action,array("select","auto","activate","combo","nothing","hide"));
20
+	public function setAction($action) {
21
+		return $this->setParamCtrl("action", $action, array("select", "auto", "activate", "combo", "nothing", "hide"));
22 22
 	}
23 23
 
24 24
 	/**
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 	 * @param string $event Event used to trigger dropdown (Hover, Click, Custom Event)
27 27
 	 * @return \Ajax\semantic\components\Dropdown
28 28
 	 */
29
-	public function setOn($event){
29
+	public function setOn($event) {
30 30
 		return $this->setParam("on", $event);
31 31
 	}
32 32
 
33
-	public function setFullTextSearch($value){
33
+	public function setFullTextSearch($value) {
34 34
 		return $this->setParam("fullTextSearch", $value);
35 35
 	}
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/lib/CDN.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2
-return array (
3
-		"JQuery" => array (
4
-				"MaxCDN" => array (
2
+return array(
3
+		"JQuery" => array(
4
+				"MaxCDN" => array(
5 5
 						"url" => "http://code.jquery.com/jquery-%version%.min.js",
6
-						"versions" => array (
6
+						"versions" => array(
7 7
 								"2.2.3",
8 8
 								"2.2.1",
9 9
 								"2.1.4",
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
 								"1.11.2"
12 12
 						)
13 13
 				),
14
-				"Google" => array (
14
+				"Google" => array(
15 15
 						"url" => "https://ajax.googleapis.com/ajax/libs/jquery/%version%/jquery.min.js",
16
-						"versions" => array (
16
+						"versions" => array(
17 17
 								"2.2.2",
18 18
 								"2.2.1",
19 19
 								"2.2.0",
@@ -25,17 +25,17 @@  discard block
 block discarded – undo
25 25
 						)
26 26
 				)
27 27
 		),
28
-		"JQueryUI" => array (
29
-				"MaxCDN" => array (
28
+		"JQueryUI" => array(
29
+				"MaxCDN" => array(
30 30
 						"core" => "http://code.jquery.com/ui/%version%/jquery-ui.min.js",
31 31
 						"css" => "http://code.jquery.com/ui/%version%/themes/%theme%/jquery-ui.css",
32
-						"versions" => array (
32
+						"versions" => array(
33 33
 								"1.11.4",
34 34
 								"1.11.3",
35 35
 								"1.11.2",
36 36
 								"1.10.4"
37 37
 						),
38
-						"themes" => array (
38
+						"themes" => array(
39 39
 								"black-tie",
40 40
 								"blitzer",
41 41
 								"cupertino",
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 								"vader"
63 63
 						)
64 64
 				),
65
-				"Google" => array (
65
+				"Google" => array(
66 66
 						"core" => "https://ajax.googleapis.com/ajax/libs/jqueryui/%version%/jquery-ui.min.js",
67 67
 						"css" => "https://ajax.googleapis.com/ajax/libs/jqueryui/%version%/themes/%theme%/jquery-ui.css",
68
-						"versions" => array (
68
+						"versions" => array(
69 69
 								"1.11.4",
70 70
 								"1.11.3",
71 71
 								"1.11.2",
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 								"1.10.4",
75 75
 								"1.10.0"
76 76
 						),
77
-						"themes" => array (
77
+						"themes" => array(
78 78
 								"black-tie",
79 79
 								"blitzer",
80 80
 								"cupertino",
@@ -102,25 +102,25 @@  discard block
 block discarded – undo
102 102
 						)
103 103
 				)
104 104
 		),
105
-		"Bootstrap" => array (
106
-				"MaxCDN" => array (
105
+		"Bootstrap" => array(
106
+				"MaxCDN" => array(
107 107
 						"core" => "http://maxcdn.bootstrapcdn.com/bootstrap/%version%/js/bootstrap.min.js",
108 108
 						"css" => "http://maxcdn.bootstrapcdn.com/bootstrap/%version%/css/bootstrap.min.css",
109
-						"versions" => array (
109
+						"versions" => array(
110 110
 								"3.3.6",
111 111
 								"3.3.5"
112 112
 						),
113
-						"themes" => array ()
113
+						"themes" => array()
114 114
 				)
115 115
 		),
116
-		"Semantic" => array (
117
-				"cdnjs" => array (
116
+		"Semantic" => array(
117
+				"cdnjs" => array(
118 118
 						"core" => "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/%version%/semantic.min.js",
119 119
 						"css" => "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/%version%/semantic.min.js",
120
-						"versions" => array (
120
+						"versions" => array(
121 121
 								"2.1.8"
122 122
 						),
123
-						"themes" => array ()
123
+						"themes" => array()
124 124
 				)
125 125
 		)
126 126
 );
127 127
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/lib/CDNCoreCss.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 	protected $localCss;
10 10
 	protected $framework;
11 11
 
12
-	public function __construct($framework,$version, $provider="MaxCDN") {
12
+	public function __construct($framework, $version, $provider="MaxCDN") {
13 13
 		parent::__construct($version, $provider);
14 14
 		$this->framework=$framework;
15 15
 		$this->data=$this->data [$framework];
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Social.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 namespace Ajax\semantic\html\base\constants;
3 3
 	use Ajax\common\BaseEnum;
4 4
 abstract class Social extends BaseEnum {
5
-	const FACEBOOK="facebook", TWITTER="twitter",GOOGLEPLUS="google plus",VK="vk",LINKEDIN="linkedin",INSTAGRAM="instagram",YOUTUBE="youtube";
5
+	const FACEBOOK="facebook", TWITTER="twitter", GOOGLEPLUS="google plus", VK="vk", LINKEDIN="linkedin", INSTAGRAM="instagram", YOUTUBE="youtube";
6 6
 }
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlAccordion.php 3 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@
 block discarded – undo
34 34
 	 * @see BaseHtml::run()
35 35
 	 */
36 36
 	public function run(JsUtils $js) {
37
-		if(isset($this->_bsComponent)===false)
38
-			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
37
+		if(isset($this->_bsComponent)===false) {
38
+					$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
39
+		}
39 40
 			$this->addEventsOnRun($js);
40 41
 			return $this->_bsComponent;
41 42
 	}
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
 	protected $_tabsType="tabs";
21 21
 	protected $stacked="";
22 22
 
23
+	/**
24
+	 * @param string $identifier
25
+	 */
23 26
 	public function __construct($identifier, $tagName="ul") {
24 27
 		parent::__construct($identifier, $tagName);
25 28
 		$this->_template="<%tagName% %properties%>%tabs%</%tagName%>%content%";
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,26 +6,26 @@  discard block
 block discarded – undo
6 6
 use Ajax\semantic\html\content\HtmlAccordionItem;
7 7
 use Ajax\JsUtils;
8 8
 
9
-class HtmlAccordion extends HtmlSemCollection{
9
+class HtmlAccordion extends HtmlSemCollection {
10 10
 
11 11
 	protected $params=array();
12 12
 
13
-	public function __construct( $identifier, $tagName="div", $baseClass="ui"){
14
-		parent::__construct( $identifier, "div", "ui accordion");
13
+	public function __construct($identifier, $tagName="div", $baseClass="ui") {
14
+		parent::__construct($identifier, "div", "ui accordion");
15 15
 	}
16 16
 
17 17
 
18
-	protected function createItem($value){
18
+	protected function createItem($value) {
19 19
 		$count=$this->count();
20 20
 		$title=$value;
21 21
 		$content=NULL;
22
-		if(\is_array($value)){
23
-			$title=@$value[0];$content=@$value[1];
22
+		if (\is_array($value)) {
23
+			$title=@$value[0]; $content=@$value[1];
24 24
 		}
25
-		return new HtmlAccordionItem("item-".$this->identifier."-".$count, $title,$content);
25
+		return new HtmlAccordionItem("item-".$this->identifier."-".$count, $title, $content);
26 26
 	}
27 27
 
28
-	protected function createCondition($value){
28
+	protected function createCondition($value) {
29 29
 		return ($value instanceof HtmlAccordionItem)===false;
30 30
 	}
31 31
 
@@ -34,22 +34,22 @@  discard block
 block discarded – undo
34 34
 	 * @see BaseHtml::run()
35 35
 	 */
36 36
 	public function run(JsUtils $js) {
37
-		if(isset($this->_bsComponent)===false)
38
-			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
37
+		if (isset($this->_bsComponent)===false)
38
+			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier, $this->params);
39 39
 			$this->addEventsOnRun($js);
40 40
 			return $this->_bsComponent;
41 41
 	}
42 42
 
43
-	public function setStyled(){
43
+	public function setStyled() {
44 44
 		return $this->addToProperty("class", "styled");
45 45
 	}
46 46
 
47
-	public function setActive($index){
47
+	public function setActive($index) {
48 48
 		$this->getItem($index)->setActive(true);
49 49
 		return $this;
50 50
 	}
51 51
 
52
-	public function setExclusive($value){
52
+	public function setExclusive($value) {
53 53
 		$this->params["exclusive"]=$value;
54 54
 	}
55 55
 }
56 56
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlAccordionMenu.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
 	protected $_tabsType="tabs";
21 21
 	protected $stacked="";
22 22
 
23
+	/**
24
+	 * @param string $identifier
25
+	 */
23 26
 	public function __construct($identifier, $tagName="ul") {
24 27
 		parent::__construct($identifier, $tagName);
25 28
 		$this->_template="<%tagName% %properties%>%tabs%</%tagName%>%content%";
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
 use Ajax\semantic\html\content\HtmlAccordionMenuItem;
7 7
 use Ajax\JsUtils;
8 8
 
9
-class HtmlAccordionMenu extends HtmlMenu{
9
+class HtmlAccordionMenu extends HtmlMenu {
10 10
 	protected $params=array();
11 11
 
12
-	public function __construct( $identifier, $items=array() ){
13
-		parent::__construct( $identifier, $items);
12
+	public function __construct($identifier, $items=array()) {
13
+		parent::__construct($identifier, $items);
14 14
 		$this->addToProperty("class", "accordion");
15 15
 		$this->setVertical();
16 16
 	}
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 	protected function createItem($value) {
23 23
 		$title=$value;
24 24
 		$content="";
25
-		if(\is_array($value)){
26
-			$title=@$value[0];$content=@$value[1];
25
+		if (\is_array($value)) {
26
+			$title=@$value[0]; $content=@$value[1];
27 27
 		}
28 28
 		$itemO=new HtmlAccordionMenuItem("item-".$this->identifier."-".$this->count(), $title, $content);
29 29
 		return $itemO->setClass("item");
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 	 * @see BaseHtml::run()
35 35
 	 */
36 36
 	public function run(JsUtils $js) {
37
-		if(isset($this->_bsComponent)===false)
38
-			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
37
+		if (isset($this->_bsComponent)===false)
38
+			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier, $this->params);
39 39
 			$this->addEventsOnRun($js);
40 40
 			return $this->_bsComponent;
41 41
 	}
42 42
 
43
-	public function setExclusive($value){
43
+	public function setExclusive($value) {
44 44
 		$this->params["exclusive"]=$value;
45 45
 	}
46 46
 }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@
 block discarded – undo
34 34
 	 * @see BaseHtml::run()
35 35
 	 */
36 36
 	public function run(JsUtils $js) {
37
-		if(isset($this->_bsComponent)===false)
38
-			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
37
+		if(isset($this->_bsComponent)===false) {
38
+					$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
39
+		}
39 40
 			$this->addEventsOnRun($js);
40 41
 			return $this->_bsComponent;
41 42
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlMenu.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 	/**
26 26
 	 * Sets the menu type
27 27
 	 * @param string $type one of text,item
28
-	 * @return \Ajax\semantic\html\collections\HtmlMenu
28
+	 * @return HtmlMenu
29 29
 	 */
30 30
 	public function setType($type=""){
31 31
 		return $this->addToPropertyCtrl("class", $type, array("","item","text"));
Please login to merge, or discard this patch.
Braces   +11 added lines, -9 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
 			$item=$itemO;
58 58
 		}
59 59
 		$item=parent::addItem($item);
60
-		if(!$item instanceof HtmlMenu)
61
-			$item->addToPropertyCtrl("class", "item",array("item"));
62
-		else{
60
+		if(!$item instanceof HtmlMenu) {
61
+					$item->addToPropertyCtrl("class", "item",array("item"));
62
+		} else{
63 63
 			$this->setSecondary();
64 64
 		}
65 65
 		return $item;
@@ -129,8 +129,9 @@  discard block
 block discarded – undo
129 129
 
130 130
 	public function asTab($vertical=false){
131 131
 		$this->apply(function(HtmlDoubleElement &$item){$item->setTagName("a");});
132
-		if($vertical===true)
133
-			$this->setVertical();
132
+		if($vertical===true) {
133
+					$this->setVertical();
134
+		}
134 135
 		return $this->addToProperty("class", "tabular");
135 136
 	}
136 137
 
@@ -156,10 +157,11 @@  discard block
 block discarded – undo
156 157
 	 */
157 158
 	public function fromDatabaseObject($object, $function) {
158 159
 		$return=$function($object);
159
-		if(\is_array($return))
160
-			$this->addItems($return);
161
-		else
162
-		$this->addItem($return);
160
+		if(\is_array($return)) {
161
+					$this->addItems($return);
162
+		} else {
163
+				$this->addItem($return);
164
+		}
163 165
 	}
164 166
 
165 167
 	/**
Please login to merge, or discard this patch.
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 	 * @param string $type one of text,item
35 35
 	 * @return \Ajax\semantic\html\collections\HtmlMenu
36 36
 	 */
37
-	public function setType($type=""){
38
-		return $this->addToPropertyCtrl("class", $type, array("","item","text"));
37
+	public function setType($type="") {
38
+		return $this->addToPropertyCtrl("class", $type, array("", "item", "text"));
39 39
 	}
40 40
 
41
-	public function setActiveItem($index){
41
+	public function setActiveItem($index) {
42 42
 		$item=$this->getItem($index);
43
-		if($item!==null){
43
+		if ($item!==null) {
44 44
 			$item->addToProperty("class", "active");
45 45
 		}
46 46
 		return $this;
@@ -50,26 +50,26 @@  discard block
 block discarded – undo
50 50
 	 * {@inheritDoc}
51 51
 	 * @see \Ajax\common\html\html5\HtmlCollection::addItem()
52 52
 	 */
53
-	public function addItem($item){
54
-		if($item instanceof HtmlInput || $item instanceof HtmlImg){
55
-			$itemO=new HtmlSemDoubleElement("item-".$this->identifier,"div","");
53
+	public function addItem($item) {
54
+		if ($item instanceof HtmlInput || $item instanceof HtmlImg) {
55
+			$itemO=new HtmlSemDoubleElement("item-".$this->identifier, "div", "");
56 56
 			$itemO->setContent($item);
57 57
 			$item=$itemO;
58 58
 		}
59 59
 		$item=parent::addItem($item);
60
-		if(!$item instanceof HtmlMenu)
61
-			$item->addToPropertyCtrl("class", "item",array("item"));
62
-		else{
60
+		if (!$item instanceof HtmlMenu)
61
+			$item->addToPropertyCtrl("class", "item", array("item"));
62
+		else {
63 63
 			$this->setSecondary();
64 64
 		}
65 65
 		return $item;
66 66
 	}
67 67
 
68
-	public function generateMenuAsItem($menu,$header=null){
68
+	public function generateMenuAsItem($menu, $header=null) {
69 69
 		$count=$this->count();
70
-		$item=new HtmlSemDoubleElement("item-".$this->identifier."-".$count,"div");
71
-		if(isset($header)){
72
-			$headerItem=new HtmlSemDoubleElement("item-header-".$this->identifier."-".$count,"div","header");
70
+		$item=new HtmlSemDoubleElement("item-".$this->identifier."-".$count, "div");
71
+		if (isset($header)) {
72
+			$headerItem=new HtmlSemDoubleElement("item-header-".$this->identifier."-".$count, "div", "header");
73 73
 			$headerItem->setContent($header);
74 74
 			$item->addContent($headerItem);
75 75
 		}
@@ -77,24 +77,24 @@  discard block
 block discarded – undo
77 77
 		$item->addContent($menu);
78 78
 		return $item;
79 79
 	}
80
-	public function addMenuAsItem($menu,$header=null){
81
-		return $this->addItem($this->generateMenuAsItem($menu,$header));
80
+	public function addMenuAsItem($menu, $header=null) {
81
+		return $this->addItem($this->generateMenuAsItem($menu, $header));
82 82
 	}
83 83
 
84
-	public function addPopupAsItem($value,$identifier, $content=""){
85
-		$value=new HtmlSemDoubleElement($identifier,"a","browse item",$value);
84
+	public function addPopupAsItem($value, $identifier, $content="") {
85
+		$value=new HtmlSemDoubleElement($identifier, "a", "browse item", $value);
86 86
 		$value->addContent(new HtmlIcon("", "dropdown"));
87 87
 		$value=$this->addItem($value);
88
-		$popup=new HtmlPopup($value,"popup-".$this->identifier."-".$this->count(),$content);
88
+		$popup=new HtmlPopup($value, "popup-".$this->identifier."-".$this->count(), $content);
89 89
 		$popup->setFlowing()->setPosition("bottom left")->setOn("click");
90
-		$this->wrap("",$popup);
90
+		$this->wrap("", $popup);
91 91
 		return $popup;
92 92
 	}
93 93
 
94
-	public function addDropdownAsItem($value,$items=NULL){
94
+	public function addDropdownAsItem($value, $items=NULL) {
95 95
 		$dd=$value;
96
-		if(\is_string($value)){
97
-			$dd=new HtmlDropdown("dropdown-".$this->identifier."-".$this->count(),$value,$items);
96
+		if (\is_string($value)) {
97
+			$dd=new HtmlDropdown("dropdown-".$this->identifier."-".$this->count(), $value, $items);
98 98
 		}
99 99
 		return $this->addItem($dd);
100 100
 	}
@@ -103,51 +103,51 @@  discard block
 block discarded – undo
103 103
 	 * @see \Ajax\common\html\html5\HtmlCollection::createItem()
104 104
 	 */
105 105
 	protected function createItem($value) {
106
-		$itemO=new HtmlLink("item-".\sizeof($this->content),"",$value);
106
+		$itemO=new HtmlLink("item-".\sizeof($this->content), "", $value);
107 107
 		return $itemO->setClass("item");
108 108
 	}
109 109
 
110
-	public function setInverted(){
110
+	public function setInverted() {
111 111
 		return $this->addToProperty("class", "inverted");
112 112
 	}
113 113
 
114
-	public function setSecondary(){
114
+	public function setSecondary() {
115 115
 		return $this->addToProperty("class", "secondary");
116 116
 	}
117 117
 
118
-	public function setVertical(){
119
-		return $this->addToPropertyCtrl("class", "vertical",array("vertical"));
118
+	public function setVertical() {
119
+		return $this->addToPropertyCtrl("class", "vertical", array("vertical"));
120 120
 	}
121 121
 
122
-	public function setPosition($value="right"){
123
-		return $this->addToPropertyCtrl("class", $value,array("right","left"));
122
+	public function setPosition($value="right") {
123
+		return $this->addToPropertyCtrl("class", $value, array("right", "left"));
124 124
 	}
125 125
 
126
-	public function setPointing($value=Direction::NONE){
127
-		return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing"));
126
+	public function setPointing($value=Direction::NONE) {
127
+		return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
128 128
 	}
129 129
 
130
-	public function asTab($vertical=false){
131
-		$this->apply(function(HtmlDoubleElement &$item){$item->setTagName("a");});
132
-		if($vertical===true)
130
+	public function asTab($vertical=false) {
131
+		$this->apply(function(HtmlDoubleElement & $item) {$item->setTagName("a"); });
132
+		if ($vertical===true)
133 133
 			$this->setVertical();
134 134
 		return $this->addToProperty("class", "tabular");
135 135
 	}
136 136
 
137
-	public function asPagination(){
138
-		$this->apply(function(HtmlDoubleElement &$item){$item->setTagName("a");});
137
+	public function asPagination() {
138
+		$this->apply(function(HtmlDoubleElement & $item) {$item->setTagName("a"); });
139 139
 			return $this->addToProperty("class", "pagination");
140 140
 	}
141 141
 
142
-	public function setFixed(){
142
+	public function setFixed() {
143 143
 		return $this->addToProperty("class", "fixed");
144 144
 	}
145 145
 
146
-	public function setFluid(){
146
+	public function setFluid() {
147 147
 		return $this->addToProperty("class", "fluid");
148 148
 	}
149 149
 
150
-	public function setCompact(){
150
+	public function setCompact() {
151 151
 		return $this->addToProperty("class", "compact");
152 152
 	}
153 153
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	public function fromDatabaseObject($object, $function) {
158 158
 		$return=$function($object);
159
-		if(\is_array($return))
159
+		if (\is_array($return))
160 160
 			$this->addItems($return);
161 161
 		else
162 162
 		$this->addItem($return);
@@ -167,19 +167,19 @@  discard block
 block discarded – undo
167 167
 	 * @param int $width
168 168
 	 * @return \Ajax\semantic\html\collections\menus\HtmlMenu
169 169
 	 */
170
-	public function setWidth($width){
171
-		if(\is_int($width)){
170
+	public function setWidth($width) {
171
+		if (\is_int($width)) {
172 172
 			$width=Wide::getConstants()["W".$width];
173 173
 		}
174 174
 		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
175
-		return $this->addToPropertyCtrl("class", "item",array("item"));
175
+		return $this->addToPropertyCtrl("class", "item", array("item"));
176 176
 	}
177 177
 
178
-	public function addImage($identifier, $src="", $alt=""){
179
-		return $this->addItem(new HtmlImg($identifier,$src,$alt));
178
+	public function addImage($identifier, $src="", $alt="") {
179
+		return $this->addItem(new HtmlImg($identifier, $src, $alt));
180 180
 	}
181 181
 
182
-	public static function vertical($identifier,$items=array()){
183
-		return (new HtmlMenu($identifier,$items))->setVertical();
182
+	public static function vertical($identifier, $items=array()) {
183
+		return (new HtmlMenu($identifier, $items))->setVertical();
184 184
 	}
185 185
 }
186 186
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlAccordionMenuItem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 
6 6
 class HtmlAccordionMenuItem extends HtmlMenuItem {
7
-	public function __construct($identifier,$title,$content) {
8
-		parent::__construct($identifier, new HtmlAccordionItem("accordion-".$identifier, $title,$content));
7
+	public function __construct($identifier, $title, $content) {
8
+		parent::__construct($identifier, new HtmlAccordionItem("accordion-".$identifier, $title, $content));
9 9
 	}
10 10
 
11
-	public function setActive($value=true){
11
+	public function setActive($value=true) {
12 12
 		$this->content->setActive($value);
13 13
 		return $this;
14 14
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlAccordionItem.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,30 +20,30 @@
 block discarded – undo
20 20
 		$this->_title=$title;
21 21
 	}
22 22
 
23
-	public function setTitle($title){
23
+	public function setTitle($title) {
24 24
 		$this->_title=$title;
25 25
 	}
26 26
 
27
-	public function setIcon($icon){
27
+	public function setIcon($icon) {
28 28
 		$this->_icon=$icon;
29 29
 	}
30 30
 
31
-	protected function createTitleElement(){
32
-		$element=new HtmlSemDoubleElement("title-".$this->identifier,"div","title");
33
-		$element->setContent(array(new HtmlIcon("", $this->_icon),$this->_title));
34
-		if($this->_active===true)
31
+	protected function createTitleElement() {
32
+		$element=new HtmlSemDoubleElement("title-".$this->identifier, "div", "title");
33
+		$element->setContent(array(new HtmlIcon("", $this->_icon), $this->_title));
34
+		if ($this->_active===true)
35 35
 			$element->addToProperty("class", "active");
36 36
 		return $element;
37 37
 	}
38 38
 
39
-	public function compile(JsUtils $js=NULL, View $view=NULL){
39
+	public function compile(JsUtils $js=NULL, View $view=NULL) {
40 40
 		$this->titleElement=$this->createTitleElement();
41
-		return parent::compile($js,$view);
41
+		return parent::compile($js, $view);
42 42
 	}
43 43
 
44
-	public function setActive($value=true){
44
+	public function setActive($value=true) {
45 45
 		$this->_active=$value;
46
-		if($value===true)
46
+		if ($value===true)
47 47
 			$this->addToPropertyCtrl("class", "active", array("active"));
48 48
 		else
49 49
 			$this->removePropertyValue("class", "active");
Please login to merge, or discard this patch.
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@  discard block
 block discarded – undo
31 31
 	protected function createTitleElement(){
32 32
 		$element=new HtmlSemDoubleElement("title-".$this->identifier,"div","title");
33 33
 		$element->setContent(array(new HtmlIcon("", $this->_icon),$this->_title));
34
-		if($this->_active===true)
35
-			$element->addToProperty("class", "active");
34
+		if($this->_active===true) {
35
+					$element->addToProperty("class", "active");
36
+		}
36 37
 		return $element;
37 38
 	}
38 39
 
@@ -43,10 +44,11 @@  discard block
 block discarded – undo
43 44
 
44 45
 	public function setActive($value=true){
45 46
 		$this->_active=$value;
46
-		if($value===true)
47
-			$this->addToPropertyCtrl("class", "active", array("active"));
48
-		else
49
-			$this->removePropertyValue("class", "active");
47
+		if($value===true) {
48
+					$this->addToPropertyCtrl("class", "active", array("active"));
49
+		} else {
50
+					$this->removePropertyValue("class", "active");
51
+		}
50 52
 		return $this;
51 53
 	}
52 54
 }
53 55
\ No newline at end of file
Please login to merge, or discard this patch.