Completed
Push — master ( 0ba4b1...2affe6 )
by Jean-Christophe
03:09
created
Ajax/semantic/html/modules/HtmlDropdown.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 class HtmlDropdown extends HtmlSemDoubleElement {
14 14
 	protected $mClass="menu";
15 15
 	protected $mTagName="div";
16
-	protected $items=array ();
16
+	protected $items=array();
17 17
 	protected $params=array("action"=>"select");
18 18
 	protected $input;
19 19
 
@@ -21,40 +21,40 @@  discard block
 block discarded – undo
21 21
 		parent::__construct($identifier, "div");
22 22
 		$this->_template=include dirname(__FILE__).'/../templates/tplDropdown.php';
23 23
 		$this->setProperty("class", "ui dropdown");
24
-		$content=new HtmlSemDoubleElement("","div");
24
+		$content=new HtmlSemDoubleElement("", "div");
25 25
 		$content->setClass("text");
26 26
 		$content->setContent($value);
27
-		$content->wrap("",new HtmlIcon("", "dropdown"));
27
+		$content->wrap("", new HtmlIcon("", "dropdown"));
28 28
 		$this->content=array($content);
29 29
 		$this->tagName="div";
30 30
 		$this->addItems($items);
31 31
 	}
32 32
 
33
-	public function addItem($item,$value=NULL,$image=NULL){
33
+	public function addItem($item, $value=NULL, $image=NULL) {
34 34
 		$itemO=$item;
35
-		if(\is_object($item)===false){
36
-			$itemO=new HtmlDropdownItem("dd-item-".$this->identifier."-".\sizeof($this->items),$item,$value,$image);
37
-		}elseif($itemO instanceof HtmlDropdownItem){
35
+		if (\is_object($item)===false) {
36
+			$itemO=new HtmlDropdownItem("dd-item-".$this->identifier."-".\sizeof($this->items), $item, $value, $image);
37
+		}elseif ($itemO instanceof HtmlDropdownItem) {
38 38
 			$this->addToProperty("class", "vertical");
39 39
 		}
40 40
 		$this->items[]=$itemO;
41 41
 		return $itemO;
42 42
 	}
43 43
 
44
-	public function addInput($name){
45
-		if(!isset($name))
44
+	public function addInput($name) {
45
+		if (!isset($name))
46 46
 			$name="input-".$this->identifier;
47 47
 		$this->setAction("activate");
48
-		$this->input=new HtmlInput($name,"hidden");
48
+		$this->input=new HtmlInput($name, "hidden");
49 49
 	}
50 50
 
51
-	public function addItems($items){
52
-		if(JArray::isAssociative($items)){
53
-			foreach ($items as $k=>$v){
51
+	public function addItems($items) {
52
+		if (JArray::isAssociative($items)) {
53
+			foreach ($items as $k=>$v) {
54 54
 				$this->addItem($v)->setData($k);
55 55
 			}
56
-		}else{
57
-			foreach ($items as $item){
56
+		}else {
57
+			foreach ($items as $item) {
58 58
 				$this->addItem($item);
59 59
 			}
60 60
 		}
@@ -63,51 +63,51 @@  discard block
 block discarded – undo
63 63
 	/**
64 64
 	 * @param boolean $dropdown
65 65
 	 */
66
-	public function asDropdown($dropdown){
67
-		if($dropdown===false){
66
+	public function asDropdown($dropdown) {
67
+		if ($dropdown===false) {
68 68
 			$this->_template=include dirname(__FILE__).'/../templates/tplDropdownMenu.php';
69 69
 			$dropdown="menu";
70
-		}else{
70
+		}else {
71 71
 			$dropdown="dropdown";
72 72
 			$this->mClass="menu";
73 73
 		}
74
-		return $this->addToPropertyCtrl("class", $dropdown,array("menu","dropdown"));
74
+		return $this->addToPropertyCtrl("class", $dropdown, array("menu", "dropdown"));
75 75
 	}
76 76
 
77
-	public function setVertical(){
78
-		return $this->addToPropertyCtrl("class", "vertical",array("vertical"));
77
+	public function setVertical() {
78
+		return $this->addToPropertyCtrl("class", "vertical", array("vertical"));
79 79
 	}
80 80
 
81
-	public function setSimple(){
82
-		return $this->addToPropertyCtrl("class", "simple",array("simple"));
81
+	public function setSimple() {
82
+		return $this->addToPropertyCtrl("class", "simple", array("simple"));
83 83
 	}
84 84
 
85
-	public function asButton($floating=false){
86
-		if($floating)
85
+	public function asButton($floating=false) {
86
+		if ($floating)
87 87
 			$this->addToProperty("class", "floating");
88 88
 		return $this->addToProperty("class", "button");
89 89
 	}
90 90
 
91
-	public function asSelect($name=NULL,$multiple=false,$selection=true){
92
-		if(isset($name))
91
+	public function asSelect($name=NULL, $multiple=false, $selection=true) {
92
+		if (isset($name))
93 93
 			$this->addInput($name);
94
-		if($multiple)
94
+		if ($multiple)
95 95
 			$this->addToProperty("class", "multiple");
96 96
 		if ($selection)
97
-			$this->addToPropertyCtrl("class", "selection",array("selection"));
97
+			$this->addToPropertyCtrl("class", "selection", array("selection"));
98 98
 		return $this;
99 99
 	}
100 100
 
101
-	public function asSearch($name=NULL,$multiple=false,$selection=false){
102
-		$this->asSelect($name,$multiple,$selection);
101
+	public function asSearch($name=NULL, $multiple=false, $selection=false) {
102
+		$this->asSelect($name, $multiple, $selection);
103 103
 		return $this->addToProperty("class", "search");
104 104
 	}
105 105
 
106
-	public function setSelect($name=NULL,$multiple=false){
107
-		if(!isset($name))
106
+	public function setSelect($name=NULL, $multiple=false) {
107
+		if (!isset($name))
108 108
 			$name="select-".$this->identifier;
109 109
 		$this->input=null;
110
-		if($multiple){
110
+		if ($multiple) {
111 111
 			$this->setProperty("multiple", true);
112 112
 			$this->addToProperty("class", "multiple");
113 113
 		}
@@ -115,28 +115,28 @@  discard block
 block discarded – undo
115 115
 		$this->tagName="select";
116 116
 		$this->setProperty("name", $name);
117 117
 		$this->content=null;
118
-		foreach ($this->items as $item){
118
+		foreach ($this->items as $item) {
119 119
 			$item->asOption();
120 120
 		}
121 121
 		return $this;
122 122
 	}
123 123
 
124
-	public function asSubmenu($pointing=NULL){
124
+	public function asSubmenu($pointing=NULL) {
125 125
 		$this->setClass("ui dropdown link item");
126
-		if(isset($pointing)){
126
+		if (isset($pointing)) {
127 127
 			$this->setPointing($pointing);
128 128
 		}
129 129
 		return $this;
130 130
 	}
131 131
 
132
-	public function setPointing($value=Direction::NONE){
133
-		return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing"));
132
+	public function setPointing($value=Direction::NONE) {
133
+		return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
134 134
 	}
135 135
 
136
-	public function setValue($value){
137
-		if(isset($this->input)){
136
+	public function setValue($value) {
137
+		if (isset($this->input)) {
138 138
 			$this->input->setProperty("value", $value);
139
-		}else{
139
+		}else {
140 140
 			$this->setProperty("value", $value);
141 141
 		}
142 142
 		return $this;
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
 	 * @see BaseHtml::run()
148 148
 	 */
149 149
 	public function run(JsUtils $js) {
150
-		if($this->propertyContains("class", "simple")===false){
151
-			$this->_bsComponent=$js->semantic()->dropdown("#".$this->identifier,$this->params);
150
+		if ($this->propertyContains("class", "simple")===false) {
151
+			$this->_bsComponent=$js->semantic()->dropdown("#".$this->identifier, $this->params);
152 152
 			$this->addEventsOnRun($js);
153 153
 			return $this->_bsComponent;
154 154
 		}
155 155
 	}
156 156
 
157
-	public function setAction($action){
157
+	public function setAction($action) {
158 158
 		$this->params["action"]=$action;
159 159
 	}
160 160
 }
161 161
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlButton.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	 * @param string $onClick JS Code for click event
21 21
 	 */
22 22
 	public function __construct($identifier, $value="", $cssStyle=null, $onClick=null) {
23
-		parent::__construct($identifier, "button","ui button");
23
+		parent::__construct($identifier, "button", "ui button");
24 24
 		$this->content=$value;
25 25
 		if (isset($cssStyle)) {
26 26
 			$this->setStyle($cssStyle);
@@ -46,20 +46,20 @@  discard block
 block discarded – undo
46 46
 	 * @return \Ajax\semantic\html\HtmlButton default : ""
47 47
 	 */
48 48
 	public function setStyle($cssStyle) {
49
-		return $this->addToProperty("class",$cssStyle);
49
+		return $this->addToProperty("class", $cssStyle);
50 50
 	}
51 51
 
52
-	public function setFocusable(){
52
+	public function setFocusable() {
53 53
 		$this->setProperty("tabindex", "0");
54 54
 	}
55 55
 
56
-	public function setAnimated($content,$animation=""){
56
+	public function setAnimated($content, $animation="") {
57 57
 		$this->setTagName("div");
58 58
 		$this->addToProperty("class", "animated ".$animation);
59
-		$visible=new HtmlSemDoubleElement("visible-".$this->identifier,"div");
59
+		$visible=new HtmlSemDoubleElement("visible-".$this->identifier, "div");
60 60
 		$visible->setClass("visible content");
61 61
 		$visible->setContent($this->content);
62
-		$hidden=new HtmlSemDoubleElement("hidden-".$this->identifier,"div");
62
+		$hidden=new HtmlSemDoubleElement("hidden-".$this->identifier, "div");
63 63
 		$hidden->setClass("hidden content");
64 64
 		$hidden->setContent($content);
65 65
 		$this->content=$visible.$hidden;
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 	 * @param string|HtmlIcon $icon
70 70
 	 * @return \Ajax\semantic\html\elements\HtmlButton
71 71
 	 */
72
-	public function asIcon($icon){
72
+	public function asIcon($icon) {
73 73
 		$iconO=$icon;
74
-		if(\is_string($icon)){
74
+		if (\is_string($icon)) {
75 75
 			$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
76 76
 		}
77 77
 		$this->addToProperty("class", "icon");
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
 	 * @param string $before
86 86
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
87 87
 	 */
88
-	public function addLabel($caption,$before=false){
88
+	public function addLabel($caption, $before=false) {
89 89
 		$this->tagName="div";
90 90
 		$this->addToProperty("class", "labeled");
91
-		$this->content=new HtmlButton("button-".$this->identifier,$this->content);
91
+		$this->content=new HtmlButton("button-".$this->identifier, $this->content);
92 92
 		$this->content->setTagName("div");
93
-		$label=new HtmlLabel("label-".$this->identifier,$caption,"a");
93
+		$label=new HtmlLabel("label-".$this->identifier, $caption, "a");
94 94
 		$label->setBasic();
95
-		$this->addContent($label,$before);
95
+		$this->addContent($label, $before);
96 96
 		return $label;
97 97
 	}
98 98
 	/*
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	public function fromArray($array) {
103 103
 		$array=parent::fromArray($array);
104
-		foreach ( $array as $key => $value ) {
104
+		foreach ($array as $key => $value) {
105 105
 			$this->setProperty($key, $value);
106 106
 		}
107 107
 		return $array;
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 *  show it is currently the active user selection
112 112
 	 * @return \Ajax\semantic\html\elements\HtmlButton
113 113
 	 */
114
-	public function setActive(){
114
+	public function setActive() {
115 115
 		return $this->addToProperty("class", "active");
116 116
 	}
117 117
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 * hint towards a positive consequence
120 120
 	 * @return \Ajax\semantic\html\elements\HtmlButton
121 121
 	 */
122
-	public function setPositive(){
122
+	public function setPositive() {
123 123
 		return $this->addToProperty("class", "positive");
124 124
 	}
125 125
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 * hint towards a negative consequence
128 128
 	 * @return \Ajax\semantic\html\elements\HtmlButton
129 129
 	 */
130
-	public function setNegative(){
130
+	public function setNegative() {
131 131
 		return $this->addToProperty("class", "negative");
132 132
 	}
133 133
 
@@ -135,14 +135,14 @@  discard block
 block discarded – undo
135 135
 	 * formatted to toggle on/off
136 136
 	 * @return \Ajax\semantic\html\elements\HtmlButton
137 137
 	 */
138
-	public function setToggle(){
138
+	public function setToggle() {
139 139
 		return $this->addToProperty("class", "toggle");
140 140
 	}
141 141
 
142 142
 	/**
143 143
 	 * @return \Ajax\semantic\html\elements\HtmlButton
144 144
 	 */
145
-	public function setCircular(){
145
+	public function setCircular() {
146 146
 		return $this->addToProperty("class", "circular");
147 147
 	}
148 148
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	 *  button is less pronounced
151 151
 	 * @return \Ajax\semantic\html\elements\HtmlButton
152 152
 	 */
153
-	public function setBasic(){
153
+	public function setBasic() {
154 154
 		return $this->addToProperty("class", "basic");
155 155
 	}
156 156
 }
157 157
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlButtonGroups.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -11,35 +11,35 @@  discard block
 block discarded – undo
11 11
  */
12 12
 class HtmlButtonGroups extends HtmlSemDoubleElement {
13 13
 
14
-	public function __construct($identifier, $elements=array(),$asIcons=false) {
15
-		parent::__construct($identifier, "div","ui buttons");
14
+	public function __construct($identifier, $elements=array(), $asIcons=false) {
15
+		parent::__construct($identifier, "div", "ui buttons");
16 16
 		$this->content=array();
17
-		if($asIcons===true)
17
+		if ($asIcons===true)
18 18
 			$this->asIcons();
19
-		$this->addElements($elements,$asIcons);
19
+		$this->addElements($elements, $asIcons);
20 20
 	}
21
-	public function addElement($element,$asIcon=false){
21
+	public function addElement($element, $asIcon=false) {
22 22
 		$elementO=$element;
23
-		if(\is_string($element)){
24
-			if($asIcon){
23
+		if (\is_string($element)) {
24
+			if ($asIcon) {
25 25
 				$elementO=new HtmlButton("button-".\sizeof($this->content));
26 26
 				$elementO->asIcon($element);
27 27
 			}else
28
-				$elementO=new HtmlButton("button-".\sizeof($this->content),$element);
28
+				$elementO=new HtmlButton("button-".\sizeof($this->content), $element);
29 29
 		}
30 30
 		$this->addContent($elementO);
31 31
 	}
32 32
 
33 33
 
34
-	public function addElements($elements,$asIcons=false) {
35
-		foreach ( $elements as $element ) {
36
-			$this->addElement($element,$asIcons);
34
+	public function addElements($elements, $asIcons=false) {
35
+		foreach ($elements as $element) {
36
+			$this->addElement($element, $asIcons);
37 37
 		}
38 38
 		return $this;
39 39
 	}
40 40
 
41
-	public function insertOr($aferIndex=0,$or="OR"){
42
-		$orElement=new HtmlSemDoubleElement("or-".$this->identifier,"div","or");
41
+	public function insertOr($aferIndex=0, $or="OR") {
42
+		$orElement=new HtmlSemDoubleElement("or-".$this->identifier, "div", "or");
43 43
 		$orElement->setProperty("data-text", $or);
44 44
 		array_splice($this->content, $aferIndex+1, 0, array($orElement));
45 45
 		return $this;
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
 		$this->addElements($array);
53 53
 	}
54 54
 
55
-	public function asIcons(){
55
+	public function asIcons() {
56 56
 		return $this->addToProperty("class", "icons");
57 57
 	}
58 58
 
59
-	public function setVertical(){
59
+	public function setVertical() {
60 60
 		return $this->addToProperty("class", "vertical");
61 61
 	}
62 62
 
63
-	public function setLabeled(){
63
+	public function setLabeled() {
64 64
 		return $this->addToProperty("class", "labeled icon");
65 65
 	}
66 66
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
89 89
 	 */
90 90
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
91
-		foreach ( $this->content as $element ) {
91
+		foreach ($this->content as $element) {
92 92
 			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
93 93
 		}
94 94
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlImage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
 		$this->setClass($this->_baseClass);
15 15
 	}
16 16
 
17
-	public function setCircular(){
17
+	public function setCircular() {
18 18
 		return $this->addToProperty("class", "circular");
19 19
 	}
20 20
 
21
-	public function asAvatar($caption=NULL){
22
-		if(isset($caption))
23
-			$this->wrap("",$caption);
21
+	public function asAvatar($caption=NULL) {
22
+		if (isset($caption))
23
+			$this->wrap("", $caption);
24 24
 		return $this->addToProperty("class", "avatar");
25 25
 	}
26 26
 }
27 27
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlSegmentGroups.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@  discard block
 block discarded – undo
6 6
 use Ajax\semantic\html\base\HtmlSemCollection;
7 7
 use Ajax\semantic\html\base\constants\Sens;
8 8
 
9
-class HtmlSegmentGroups extends HtmlSemCollection{
9
+class HtmlSegmentGroups extends HtmlSemCollection {
10 10
 
11 11
 
12
-	public function __construct( $identifier, $items=array()){
13
-		parent::__construct( $identifier, "div","ui segments");
12
+	public function __construct($identifier, $items=array()) {
13
+		parent::__construct($identifier, "div", "ui segments");
14 14
 		$this->addItems($items);
15 15
 	}
16 16
 
17 17
 
18
-	protected function createItem($value){
19
-		return new HtmlSegment("segment-".$this->count(),$value);
18
+	protected function createItem($value) {
19
+		return new HtmlSegment("segment-".$this->count(), $value);
20 20
 	}
21 21
 
22 22
 	/**
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
24 24
 	 * @param string $type one of "raised","stacked","piled" default : ""
25 25
 	 * @return \Ajax\semantic\html\elements\HtmlSegmentGroups
26 26
 	 */
27
-	public function setType($type){
27
+	public function setType($type) {
28 28
 		return $this->addToPropertyCtrl("class", $type, SegmentType::getConstants());
29 29
 	}
30 30
 
31
-	public function setSens($sens=Sens::VERTICAL){
31
+	public function setSens($sens=Sens::VERTICAL) {
32 32
 		return $this->addToPropertyCtrl("class", $sens, Sens::getConstants());
33 33
 	}
34 34
 
35
-	public static function group($identifier,$items=array(),$type="",$sens=Sens::VERTICAL){
36
-		$group=new HtmlSegmentGroups($identifier,$items);
35
+	public static function group($identifier, $items=array(), $type="", $sens=Sens::VERTICAL) {
36
+		$group=new HtmlSegmentGroups($identifier, $items);
37 37
 		$group->setSens($sens);
38 38
 		return $group->setType($type);
39 39
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlIconGroups.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,21 +11,21 @@
 block discarded – undo
11 11
  */
12 12
 class HtmlIconGroups extends HtmlSemDoubleElement {
13 13
 
14
-	public function __construct($identifier,$size="") {
15
-		parent::__construct($identifier, "i","icons");
14
+	public function __construct($identifier, $size="") {
15
+		parent::__construct($identifier, "i", "icons");
16 16
 		$this->setSize($size);
17 17
 	}
18 18
 
19
-	public function add($icon,$size=""){
19
+	public function add($icon, $size="") {
20 20
 		$iconO=$icon;
21
-		if(\is_string($icon)){
21
+		if (\is_string($icon)) {
22 22
 			$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
23 23
 			$iconO->setSize($size);
24 24
 		}
25 25
 		$this->addContent($iconO);
26 26
 	}
27 27
 
28
-	public function getIcon($index){
28
+	public function getIcon($index) {
29 29
 		return $this->content[$index];
30 30
 	}
31 31
 }
32 32
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlContainer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,17 +12,17 @@
 block discarded – undo
12 12
 class HtmlContainer extends HtmlSemDoubleElement {
13 13
 
14 14
 	public function __construct($identifier, $content="") {
15
-		parent::__construct($identifier, "div","ui container");
15
+		parent::__construct($identifier, "div", "ui container");
16 16
 		$this->content=$content;
17 17
 	}
18 18
 
19
-	public function setAlignement($value="justified"){
20
-		if($value!=="justified")
19
+	public function setAlignement($value="justified") {
20
+		if ($value!=="justified")
21 21
 			$value.=" aligned";
22 22
 		return $this->addToProperty("class", $value);
23 23
 	}
24 24
 
25
-	public function setTextContainer(){
25
+	public function setTextContainer() {
26 26
 		return $this->addToProperty("class", "text");
27 27
 	}
28 28
 }
29 29
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlHeader.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@  discard block
 block discarded – undo
8 8
 
9 9
 class HtmlHeader extends HtmlSemDoubleElement {
10 10
 	protected $image;
11
-	public function __construct($identifier, $niveau=1,$content=NULL,$type="page") {
12
-		parent::__construct($identifier, "div","ui header");
11
+	public function __construct($identifier, $niveau=1, $content=NULL, $type="page") {
12
+		parent::__construct($identifier, "div", "ui header");
13 13
 		$this->_template="<%tagName% %properties%>%image%%content%</%tagName%>";
14
-		if(isset($type)){
15
-			if($type=="page"){
14
+		if (isset($type)) {
15
+			if ($type=="page") {
16 16
 				$this->asPageHeader($niveau);
17 17
 			}else
18 18
 				$this->asContentHeader($niveau);
@@ -20,39 +20,39 @@  discard block
 block discarded – undo
20 20
 		$this->content=$content;
21 21
 	}
22 22
 
23
-	public function asPageHeader($niveau){
23
+	public function asPageHeader($niveau) {
24 24
 		$this->tagName="h".$niveau;
25 25
 	}
26 26
 
27
-	public function asContentHeader($niveau){
27
+	public function asContentHeader($niveau) {
28 28
 		$this->tagName="div";
29
-		if(\is_int($niveau)){
29
+		if (\is_int($niveau)) {
30 30
 			$niveau=Size::getConstantValues()[$niveau];
31 31
 		}
32 32
 		$this->setSize($niveau);
33 33
 	}
34 34
 
35
-	public function asIcon($icon,$title,$subHeader=NULL){
35
+	public function asIcon($icon, $title, $subHeader=NULL) {
36 36
 		$this->addToProperty("class", "icon");
37 37
 		$this->image=new HtmlIcon("icon-".$this->identifier, $icon);
38
-		return $this->asTitle($title,$subHeader);
38
+		return $this->asTitle($title, $subHeader);
39 39
 	}
40 40
 
41
-	public function asImage($src,$title,$subHeader=NULL){
42
-		$this->image=new HtmlImage("img-".$this->identifier, $src,$title);
43
-		return $this->asTitle($title,$subHeader);
41
+	public function asImage($src, $title, $subHeader=NULL) {
42
+		$this->image=new HtmlImage("img-".$this->identifier, $src, $title);
43
+		return $this->asTitle($title, $subHeader);
44 44
 	}
45 45
 
46
-	public function asTitle($title,$subHeader=NULL){
47
-		if(!\is_object($title)){
48
-			$this->content=new HtmlDoubleElement("content-".$this->identifier,"div");
46
+	public function asTitle($title, $subHeader=NULL) {
47
+		if (!\is_object($title)) {
48
+			$this->content=new HtmlDoubleElement("content-".$this->identifier, "div");
49 49
 			$this->content->setContent($title);
50
-		}else{
50
+		}else {
51 51
 			$this->content=$title;
52 52
 		}
53 53
 		$this->content->setClass("content");
54
-		if(isset($subHeader)){
55
-			$sub=new HtmlDoubleElement("subheader-".$this->identifier,"div");
54
+		if (isset($subHeader)) {
55
+			$sub=new HtmlDoubleElement("subheader-".$this->identifier, "div");
56 56
 			$sub->setClass("sub header");
57 57
 			$sub->setContent($subHeader);
58 58
 			$this->content->addContent($sub);
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlDivider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
  */
12 12
 class HtmlDivider extends HtmlDoubleElement {
13 13
 
14
-	public function __construct($identifier, $content="",$tagName="div") {
15
-		parent::__construct($identifier, $tagName,"ui divider");
14
+	public function __construct($identifier, $content="", $tagName="div") {
15
+		parent::__construct($identifier, $tagName, "ui divider");
16 16
 		$this->content=$content;
17 17
 	}
18 18
 
@@ -20,23 +20,23 @@  discard block
 block discarded – undo
20 20
 	 * vertical divider
21 21
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
22 22
 	 */
23
-	public function setVertical(){
24
-		return $this->addToPropertyUnique("class", "vertical", array("vertical","horizontal"));
23
+	public function setVertical() {
24
+		return $this->addToPropertyUnique("class", "vertical", array("vertical", "horizontal"));
25 25
 	}
26 26
 
27 27
 	/**
28 28
 	 * horizontal divider
29 29
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
30 30
 	 */
31
-	public function setHorizontal(){
32
-		return $this->addToPropertyUnique("class", "horizontal", array("vertical","horizontal"));
31
+	public function setHorizontal() {
32
+		return $this->addToPropertyUnique("class", "horizontal", array("vertical", "horizontal"));
33 33
 	}
34 34
 
35 35
 	/**
36 36
 	 * hide the divider
37 37
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
38 38
 	 */
39
-	public function setHidden(){
39
+	public function setHidden() {
40 40
 		return $this->addToProperty("class", "hidden");
41 41
 	}
42 42
 
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
 	 * fitted, without any space above or below it
45 45
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
46 46
 	 */
47
-	public function setFitted(){
47
+	public function setFitted() {
48 48
 		return $this->addToProperty("class", "fitted");
49 49
 	}
50 50
 
51 51
 	/**
52 52
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
53 53
 	 */
54
-	public function asHeader(){
54
+	public function asHeader() {
55 55
 		return $this->addToProperty("class", "header");
56 56
 	}
57 57
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	 * inverts the divider colors
60 60
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
61 61
 	 */
62
-	public function setInverted(){
62
+	public function setInverted() {
63 63
 		return $this->addToProperty("class", "inverted");
64 64
 	}
65 65
 }
66 66
\ No newline at end of file
Please login to merge, or discard this patch.