Completed
Push — master ( fdca69...db492e )
by Jean-Christophe
03:16
created
Ajax/semantic/html/collections/form/HtmlFormCheckbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 class HtmlFormCheckbox extends HtmlFormField {
16 16
 	use CheckboxTrait;
17 17
 	public function __construct($identifier, $label=NULL, $value=NULL, $type=NULL) {
18
-		parent::__construct("field-".$identifier, new HtmlCheckbox($identifier,$label,$value,$type));
18
+		parent::__construct("field-".$identifier, new HtmlCheckbox($identifier, $label, $value, $type));
19 19
 	}
20 20
 
21 21
 	public static function slider($identifier, $label="", $value=NULL) {
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormTextarea.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,9 @@
 block discarded – undo
10 10
 	use TextFieldsTrait;
11 11
 
12 12
 	public function __construct($identifier, $label=NULL,$value=NULL,$placeholder=NULL,$rows=NULL) {
13
-		if(!isset($placeholder))
14
-			$placeholder=$label;
13
+		if(!isset($placeholder)) {
14
+					$placeholder=$label;
15
+		}
15 16
 		parent::__construct("field-".$identifier, new HtmlTextarea($identifier,$value,$placeholder,$rows), $label);
16 17
 	}
17 18
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@  discard block
 block discarded – undo
9 9
 class HtmlFormTextarea extends HtmlFormField {
10 10
 	use TextFieldsTrait;
11 11
 
12
-	public function __construct($identifier, $label=NULL,$value=NULL,$placeholder=NULL,$rows=NULL) {
13
-		if(!isset($placeholder))
12
+	public function __construct($identifier, $label=NULL, $value=NULL, $placeholder=NULL, $rows=NULL) {
13
+		if (!isset($placeholder))
14 14
 			$placeholder=$label;
15
-		parent::__construct("field-".$identifier, new HtmlTextarea($identifier,$value,$placeholder,$rows), $label);
15
+		parent::__construct("field-".$identifier, new HtmlTextarea($identifier, $value, $placeholder, $rows), $label);
16 16
 	}
17 17
 
18 18
 	/**
19 19
 	 * Defines the textarea row count
20 20
 	 * @param int $count
21 21
 	 */
22
-	public function setRows($count){
22
+	public function setRows($count) {
23 23
 		$this->getField()->setRows($count);
24 24
 	}
25 25
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 		return $this->content["field"];
28 28
 	}
29 29
 
30
-	public function setName($name){
31
-		$this->getDataField()->setProperty("name",$name);
30
+	public function setName($name) {
31
+		$this->getDataField()->setProperty("name", $name);
32 32
 	}
33 33
 }
34 34
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormField.php 2 patches
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@  discard block
 block discarded – undo
14 14
 		parent::__construct($identifier, "div","field");
15 15
 		$this->content=array();
16 16
 		$this->_states=[State::ERROR,State::DISABLED];
17
-		if(isset($label))
18
-			$this->setLabel($label);
17
+		if(isset($label)) {
18
+					$this->setLabel($label);
19
+		}
19 20
 		$this->setField($field);
20 21
 	}
21 22
 
@@ -45,8 +46,9 @@  discard block
 block discarded – undo
45 46
 	 * @return mixed
46 47
 	 */
47 48
 	public function getLabel(){
48
-		if(\array_key_exists("label", $this->content))
49
-			return $this->content["label"];
49
+		if(\array_key_exists("label", $this->content)) {
50
+					return $this->content["label"];
51
+		}
50 52
 	}
51 53
 
52 54
 	/**
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -14,34 +14,34 @@  discard block
 block discarded – undo
14 14
 	use FieldTrait;
15 15
 	protected $_container;
16 16
 	protected $_validation;
17
-	public function __construct($identifier, $field,$label=NULL) {
18
-		parent::__construct($identifier, "div","field");
17
+	public function __construct($identifier, $field, $label=NULL) {
18
+		parent::__construct($identifier, "div", "field");
19 19
 		$this->content=array();
20
-		$this->_states=[State::ERROR,State::DISABLED];
21
-		if(isset($label))
20
+		$this->_states=[State::ERROR, State::DISABLED];
21
+		if (isset($label))
22 22
 			$this->setLabel($label);
23 23
 		$this->setField($field);
24 24
 		$this->_validation=NULL;
25 25
 	}
26 26
 
27
-	public function addPointingLabel($label,$pointing=Direction::NONE){
28
-		$labelO=new HtmlLabel("",$label);
27
+	public function addPointingLabel($label, $pointing=Direction::NONE) {
28
+		$labelO=new HtmlLabel("", $label);
29 29
 		$labelO->setPointing($pointing);
30
-		$this->addContent($labelO,$pointing==="below" || $pointing==="right");
30
+		$this->addContent($labelO, $pointing==="below" || $pointing==="right");
31 31
 		return $labelO;
32 32
 	}
33 33
 
34
-	public function setLabel($label){
34
+	public function setLabel($label) {
35 35
 		$labelO=$label;
36
-		if(\is_string($label)){
37
-			$labelO=new HtmlSemDoubleElement("","label","");
36
+		if (\is_string($label)) {
37
+			$labelO=new HtmlSemDoubleElement("", "label", "");
38 38
 			$labelO->setContent($label);
39
-			$labelO->setProperty("for", \str_replace("field-", "",$this->identifier));
39
+			$labelO->setProperty("for", \str_replace("field-", "", $this->identifier));
40 40
 		}
41 41
 		$this->content["label"]=$labelO;
42 42
 	}
43 43
 
44
-	public function setField($field){
44
+	public function setField($field) {
45 45
 		$this->content["field"]=$field;
46 46
 	}
47 47
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 	 * Returns the label or null
50 50
 	 * @return mixed
51 51
 	 */
52
-	public function getLabel(){
53
-		if(\array_key_exists("label", $this->content))
52
+	public function getLabel() {
53
+		if (\array_key_exists("label", $this->content))
54 54
 			return $this->content["label"];
55 55
 	}
56 56
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 * Return the field
59 59
 	 * @return mixed
60 60
 	 */
61
-	public function getField(){
61
+	public function getField() {
62 62
 		return $this->content["field"];
63 63
 	}
64 64
 
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
 	 * Return the field with data
67 67
 	 * @return mixed
68 68
 	 */
69
-	public function getDataField(){
69
+	public function getDataField() {
70 70
 		return $this->content["field"];
71 71
 	}
72 72
 
73 73
 	/**
74 74
 	 * puts the label before or behind
75 75
 	 */
76
-	public function swapLabel(){
76
+	public function swapLabel() {
77 77
 		$label=$this->getLabel();
78 78
 		unset($this->content["label"]);
79 79
 		$this->content["label"]=$label;
@@ -84,31 +84,31 @@  discard block
 block discarded – undo
84 84
 	 * @param int $width
85 85
 	 * @return \Ajax\semantic\html\collections\form\HtmlFormField
86 86
 	 */
87
-	public function setWidth($width){
88
-		if(\is_int($width)){
87
+	public function setWidth($width) {
88
+		if (\is_int($width)) {
89 89
 			$width=Wide::getConstants()["W".$width];
90 90
 		}
91 91
 		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
92
-		if(isset($this->_container)){
92
+		if (isset($this->_container)) {
93 93
 			$this->_container->setEqualWidth(false);
94 94
 		}
95
-		return $this->addToPropertyCtrl("class", "wide",array("wide"));
95
+		return $this->addToPropertyCtrl("class", "wide", array("wide"));
96 96
 	}
97 97
 
98 98
 	/**
99 99
 	 * Field displays an error state
100 100
 	 * @return \Ajax\semantic\html\collections\form\HtmlFormField
101 101
 	 */
102
-	public function setError(){
102
+	public function setError() {
103 103
 		return $this->addToProperty("class", "error");
104 104
 	}
105 105
 
106
-	public function setInline(){
106
+	public function setInline() {
107 107
 		return $this->addToProperty("class", "inline");
108 108
 	}
109 109
 
110
-	public function jsState($state){
111
-		return $this->jsDoJquery("addClass",$state);
110
+	public function jsState($state) {
111
+		return $this->jsDoJquery("addClass", $state);
112 112
 	}
113 113
 
114 114
 	public function setContainer($_container) {
@@ -116,26 +116,26 @@  discard block
 block discarded – undo
116 116
 		return $this;
117 117
 	}
118 118
 
119
-	public function setReadonly(){
119
+	public function setReadonly() {
120 120
 		$this->getField()->setProperty("readonly", "");
121 121
 	}
122 122
 
123
-	public function addRule($type,$prompt=NULL,$value=NULL){
123
+	public function addRule($type, $prompt=NULL, $value=NULL) {
124 124
 		$field=$this->getDataField();
125
-		if(isset($field)){
126
-			if(!isset($this->_validation)){
125
+		if (isset($field)) {
126
+			if (!isset($this->_validation)) {
127 127
 				$this->_validation=new FieldValidation($field->getIdentifier());
128 128
 			}
129
-			if($type==="empty"){
130
-				$this->addToProperty("class","required");
129
+			if ($type==="empty") {
130
+				$this->addToProperty("class", "required");
131 131
 			}
132
-			$this->_validation->addRule($type,$prompt,$value);
132
+			$this->_validation->addRule($type, $prompt, $value);
133 133
 		}
134 134
 		return $this;
135 135
 	}
136 136
 
137
-	public function addRules(array $rules){
138
-		foreach ($rules as $rule){
137
+	public function addRules(array $rules) {
138
+		foreach ($rules as $rule) {
139 139
 			$this->addRule($rule);
140 140
 		}
141 141
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlAccordionMenu.php 2 patches
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
@@ -62,8 +62,9 @@
 block discarded – undo
62 62
 	 * @see BaseHtml::run()
63 63
 	 */
64 64
 	public function run(JsUtils $js) {
65
-		if(isset($this->_bsComponent)===false)
66
-			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
65
+		if(isset($this->_bsComponent)===false) {
66
+					$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
67
+		}
67 68
 			$this->addEventsOnRun($js);
68 69
 			return $this->_bsComponent;
69 70
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlIconMenu.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
  * @author jc
13 13
  * @version 1.001
14 14
  */
15
-class HtmlIconMenu extends HtmlMenu{
15
+class HtmlIconMenu extends HtmlMenu {
16 16
 
17 17
 
18 18
 	/**
19 19
 	 * @param string $identifier
20 20
 	 * @param array $items icons
21 21
 	 */
22
-	public function __construct( $identifier, $items=array()){
23
-		parent::__construct( $identifier, $items);
22
+	public function __construct($identifier, $items=array()) {
23
+		parent::__construct($identifier, $items);
24 24
 		$this->addToProperty("class", "icon");
25 25
 	}
26 26
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	protected function createItem($value) {
33 33
 		$count=\sizeof($this->content);
34 34
 		$value=new HtmlIcon("icon-".$count, $value);
35
-		$itemO=new HtmlLink("item-".$count,"",$value);
35
+		$itemO=new HtmlLink("item-".$count, "", $value);
36 36
 		return $itemO->setClass("item");
37 37
 	}
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlLabeledIconMenu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
  * @author jc
13 13
  * @version 1.001
14 14
  */
15
-class HtmlLabeledIconMenu extends HtmlMenu{
15
+class HtmlLabeledIconMenu extends HtmlMenu {
16 16
 
17 17
 
18 18
 	/**
19 19
 	 * @param string $identifier
20 20
 	 * @param array $items icons
21 21
 	 */
22
-	public function __construct( $identifier, $items=array()){
23
-		parent::__construct( $identifier, $items);
22
+	public function __construct($identifier, $items=array()) {
23
+		parent::__construct($identifier, $items);
24 24
 		$this->addToProperty("class", "labeled icon");
25 25
 	}
26 26
 
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 	protected function createItem($value) {
32 32
 		$text="";
33 33
 		$v=$value;
34
-		if(\is_array($value)){
34
+		if (\is_array($value)) {
35 35
 			$v=@$value[0];
36 36
 			$text=@$value[1];
37 37
 		}
38 38
 		$count=\sizeof($this->content);
39 39
 		$value=new HtmlIcon("icon-".$count, $v);
40
-		$value->wrap("",$text);
41
-		$itemO=new HtmlLink("item-".$count,"",$value);
40
+		$value->wrap("", $text);
41
+		$itemO=new HtmlLink("item-".$count, "", $value);
42 42
 		return $itemO->setClass("item");
43 43
 	}
44 44
 }
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlBreadcrumb.php 4 patches
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -181,9 +181,9 @@
 block discarded – undo
181 181
 	protected function createItem($value) {
182 182
 		$count=$this->count();
183 183
 		$itemO=new HtmlSemDoubleElement("item-" . $this->identifier . "-" . $count, "a", "section");
184
-		if (\is_array($value))
185
-			$itemO->fromArray($value);
186
-		else {
184
+		if (\is_array($value)) {
185
+					$itemO->fromArray($value);
186
+		} else {
187 187
 			$itemO->setContent($value);
188 188
 		}
189 189
 		return $itemO;
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Ajax\semantic\html\base\HtmlSemDoubleElement;
6 6
 use Ajax\JsUtils;
7 7
 use Ajax\service\JArray;
8
-
9 8
 use Ajax\semantic\html\base\constants\State;
10 9
 
11 10
 class HtmlProgress extends HtmlSemDoubleElement {
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		$this->startIndex=$startIndex;
52 52
 		$this->autoActive=$autoActive;
53 53
 		$this->_contentSeparator="<div class='divider'> / </div>";
54
-		$this->_hrefFunction=function ($e) {
54
+		$this->_hrefFunction=function($e) {
55 55
 			return $e->getContent();
56 56
 		};
57 57
 		if (isset($hrefFunction)) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 * @return HtmlBreadcrumbs
69 69
 	 */
70 70
 	public function autoGetOnClick($targetSelector) {
71
-		return $this->getOnClick($this->root, $targetSelector, array ("attr" => $this->attr ));
71
+		return $this->getOnClick($this->root, $targetSelector, array("attr" => $this->attr));
72 72
 	}
73 73
 
74 74
 	public function contentAsString() {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 	public function setActive($index=null) {
82 82
 		if (!isset($index)) {
83
-			$index=sizeof($this->content) - 1;
83
+			$index=sizeof($this->content)-1;
84 84
 		}
85 85
 		$activeItem=$this->content[$index];
86 86
 		$activeItem->addToProperty("class", "active");
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @param Dispatcher $dispatcher the request dispatcher
94 94
 	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
95 95
 	 */
96
-	public function fromDispatcher(JsUtils $js,$dispatcher, $startIndex=0) {
96
+	public function fromDispatcher(JsUtils $js, $dispatcher, $startIndex=0) {
97 97
 		return $this->addItems($js->fromDispatcher($dispatcher));
98 98
 	}
99 99
 
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
 		if (!isset($index)) {
108 108
 			$index=sizeof($this->content);
109 109
 		}
110
-		if ($this->absolutePaths === true) {
110
+		if ($this->absolutePaths===true) {
111 111
 			return $this->_hrefFunction($this->content[$index]);
112 112
 		} else {
113
-			return $this->root . implode($separator, array_slice(array_map(function ($e) {
113
+			return $this->root.implode($separator, array_slice(array_map(function($e) {
114 114
 				return $this->_hrefFunction($e);
115
-			}, $this->content), $this->startIndex, $index + 1));
115
+			}, $this->content), $this->startIndex, $index+1));
116 116
 		}
117 117
 	}
118 118
 
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
 			$this->setActive();
147 147
 		}
148 148
 		$count=$this->count();
149
-		for($i=1; $i < $count; $i++) {
150
-			$this->content[$i]->wrap($this->getContentDivider($i - 1));
149
+		for ($i=1; $i<$count; $i++) {
150
+			$this->content[$i]->wrap($this->getContentDivider($i-1));
151 151
 		}
152 152
 		return parent::compile($js, $view);
153 153
 	}
@@ -157,15 +157,15 @@  discard block
 block discarded – undo
157 157
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
158 158
 	 */
159 159
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
160
-		foreach ( $this->content as $element ) {
160
+		foreach ($this->content as $element) {
161 161
 			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
162 162
 		}
163 163
 		return $this;
164 164
 	}
165 165
 
166 166
 	public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) {
167
-		foreach ( $this->content as $element ) {
168
-			if ($element->getProperty($this->attr) != NULL){
167
+		foreach ($this->content as $element) {
168
+			if ($element->getProperty($this->attr)!=NULL) {
169 169
 				$element->_ajaxOn($operation, $event, $url, $responseElement, $parameters);
170 170
 			}
171 171
 		}
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	 */
181 181
 	protected function createItem($value) {
182 182
 		$count=$this->count();
183
-		$itemO=new HtmlSemDoubleElement("item-" . $this->identifier . "-" . $count, "a", "section");
183
+		$itemO=new HtmlSemDoubleElement("item-".$this->identifier."-".$count, "a", "section");
184 184
 		if (\is_array($value))
185 185
 			$itemO->fromArray($value);
186 186
 		else {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	public function addIconAt($icon, $index) {
193 193
 		$item=$this->getItem($index);
194 194
 		if (isset($item)) {
195
-			$icon=new HtmlIcon("icon-" . $this->identifier, $icon);
195
+			$icon=new HtmlIcon("icon-".$this->identifier, $icon);
196 196
 			$item->wrapContent($icon);
197 197
 		}
198 198
 	}
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	public function addItem($item) {
201 201
 		$count=$this->count();
202 202
 		$itemO=parent::addItem($item);
203
-		$this->addToPropertyCtrl("class", "section", array ("section" ));
203
+		$this->addToPropertyCtrl("class", "section", array("section"));
204 204
 		$itemO->setProperty($this->attr, $this->getHref($count));
205 205
 		return $itemO;
206 206
 	}
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	public function setAbsolutePaths($absolutePaths) {
217 217
 		$this->absolutePaths=$absolutePaths;
218 218
 		$size=\sizeof($this->content);
219
-		for($i=0;$i<$size;$i++){
219
+		for ($i=0; $i<$size; $i++) {
220 220
 			$this->content[$i]->setProperty($this->attr, $this->getHref($i));
221 221
 		}
222 222
 		return $this;
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 * Associate an ajax get to the breadcrumb elements, displayed in $targetSelector
66 66
 	 * $this->attr member is used to build each element url
67 67
 	 * @param string $targetSelector the target of the get
68
-	 * @return HtmlBreadcrumbs
68
+	 * @return HtmlBreadcrumb
69 69
 	 */
70 70
 	public function autoGetOnClick($targetSelector) {
71 71
 		return $this->getOnClick($this->root, $targetSelector, array ("attr" => $this->attr ));
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	 * Add new elements in breadcrumbs corresponding to request dispatcher : controllerName, actionName, parameters
95 95
 	 * @param JsUtils $js
96 96
 	 * @param Dispatcher $dispatcher the request dispatcher
97
-	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
97
+	 * @return HtmlBreadcrumb
98 98
 	 */
99 99
 	public function fromDispatcher(JsUtils $js,$dispatcher, $startIndex=0) {
100 100
 		return $this->addItems($js->fromDispatcher($dispatcher));
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 * sets the function who generates the href elements.
124 124
 	 * default : function($element){return $element->getContent()}
125 125
 	 * @param function $_hrefFunction
126
-	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
126
+	 * @return HtmlBreadcrumb
127 127
 	 */
128 128
 	public function setHrefFunction($_hrefFunction) {
129 129
 		$this->_hrefFunction=$_hrefFunction;
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/TextAlignmentTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,23 +10,23 @@
 block discarded – undo
10 10
 	 * @param string $value
11 11
 	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
12 12
 	 */
13
-	public function setTextAlignment($value=TextAlignment::LEFT){
14
-		return $this->addToPropertyCtrl("class", $value,TextAlignment::getConstants());
13
+	public function setTextAlignment($value=TextAlignment::LEFT) {
14
+		return $this->addToPropertyCtrl("class", $value, TextAlignment::getConstants());
15 15
 	}
16 16
 
17
-	public function textCenterAligned(){
17
+	public function textCenterAligned() {
18 18
 		return $this->setTextAlignment(TextAlignment::CENTER);
19 19
 	}
20 20
 
21
-	public function textJustified(){
21
+	public function textJustified() {
22 22
 		return $this->setTextAlignment(TextAlignment::JUSTIFIED);
23 23
 	}
24 24
 
25
-	public function textRightAligned(){
25
+	public function textRightAligned() {
26 26
 		return $this->setTextAlignment(TextAlignment::RIGHT);
27 27
 	}
28 28
 
29
-	public function textLeftAligned(){
29
+	public function textLeftAligned() {
30 30
 		return $this->setTextAlignment();
31 31
 	}
32 32
 }
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/IconTrait.php 2 patches
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
20 20
 			$this->addContent($iconO,false);
21 21
 			$this->_hasIcon=true;
22
-		}else{
22
+		} else{
23 23
 			$iconO=$this->getIcon();
24 24
 			$iconO->setIcon($icon);
25 25
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
@@ -30,8 +30,9 @@  discard block
 block discarded – undo
30 30
 	public function getIcon(){
31 31
 		if(\is_array($this->content)){
32 32
 			foreach ($this->content as $item){
33
-				if($item instanceof HtmlIcon)
34
-					return $item;
33
+				if($item instanceof HtmlIcon) {
34
+									return $item;
35
+				}
35 36
 			}
36 37
 		}
37 38
 	}
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,18 +15,18 @@  discard block
 block discarded – undo
15 15
 	private $_hasIcon=false;
16 16
 
17 17
 	abstract protected function addToPropertyCtrl($name, $value, $typeCtrl);
18
-	abstract public function addContent($content,$before=false);
18
+	abstract public function addContent($content, $before=false);
19 19
 
20
-	public function addIcon($icon,$direction=Direction::LEFT){
21
-		if($this->_hasIcon===false){
20
+	public function addIcon($icon, $direction=Direction::LEFT) {
21
+		if ($this->_hasIcon===false) {
22 22
 			$iconO=$icon;
23
-			if(\is_string($icon)){
23
+			if (\is_string($icon)) {
24 24
 				$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
25 25
 			}
26 26
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
27
-			$this->addContent($iconO,$direction===Direction::LEFT);
27
+			$this->addContent($iconO, $direction===Direction::LEFT);
28 28
 			$this->_hasIcon=true;
29
-		}else{
29
+		} else {
30 30
 			$iconO=$this->getIcon();
31 31
 			$iconO->setIcon($icon);
32 32
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
 		return $iconO;
35 35
 	}
36 36
 
37
-	public function getIcon(){
38
-		if(\is_array($this->content)){
39
-			foreach ($this->content as $item){
40
-				if($item instanceof HtmlIcon)
37
+	public function getIcon() {
38
+		if (\is_array($this->content)) {
39
+			foreach ($this->content as $item) {
40
+				if ($item instanceof HtmlIcon)
41 41
 					return $item;
42 42
 			}
43 43
 		}
Please login to merge, or discard this patch.