Completed
Push — master ( b4ccca...781bd5 )
by Jean-Christophe
03:50
created
Ajax/common/traits/JqueryActionsTrait.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 namespace Ajax\common\traits;
4 4
 
5 5
 trait JqueryActionsTrait {
6
-	public abstract function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false,$immediatly=true);
6
+	public abstract function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false, $immediatly=true);
7 7
 	public abstract function _prep_element($element);
8 8
 	public abstract function _prep_value($value);
9 9
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 		if (isset($value)) {
20 20
 			$value=$this->_prep_value($value);
21 21
 			$str="$({$element}).attr(\"$attributeName\",{$value});";
22
-		} else
22
+		}else
23 23
 			$str="$({$element}).attr(\"$attributeName\");";
24 24
 			if ($immediatly)
25 25
 				$this->jquery_code_for_compile[]=$str;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 * @param boolean $immediatly defers the execution if set to false
34 34
 	 * @return string
35 35
 	 */
36
-	public function after($element='this', $value='', $immediatly=false){
36
+	public function after($element='this', $value='', $immediatly=false) {
37 37
 		$element=$this->_prep_element($element);
38 38
 		$value=$this->_prep_value($value);
39 39
 		$str="$({$element}).after({$value});";
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 		$animations="\t\t\t";
60 60
 		if (is_array($params)) {
61
-			foreach ( $params as $param => $value ) {
61
+			foreach ($params as $param => $value) {
62 62
 				$animations.=$param.': \''.$value.'\', ';
63 63
 			}
64 64
 		}
@@ -351,8 +351,8 @@  discard block
 block discarded – undo
351 351
 	 * @param boolean $immediatly
352 352
 	 * @return string
353 353
 	 */
354
-	public function _doJQueryOn($event, $element, $elementToModify, $jqueryCall, $param="", $preventDefault=false, $stopPropagation=false, $jsCallback="",$immediatly=true) {
355
-		return $this->_add_event($element, $this->_doJQuery($elementToModify, $jqueryCall, $param, $jsCallback), $event, $preventDefault, $stopPropagation,$immediatly);
354
+	public function _doJQueryOn($event, $element, $elementToModify, $jqueryCall, $param="", $preventDefault=false, $stopPropagation=false, $jsCallback="", $immediatly=true) {
355
+		return $this->_add_event($element, $this->_doJQuery($elementToModify, $jqueryCall, $param, $jsCallback), $event, $preventDefault, $stopPropagation, $immediatly);
356 356
 	}
357 357
 
358 358
 	/**
@@ -378,8 +378,8 @@  discard block
 block discarded – undo
378 378
 	 * @param boolean $immediatly
379 379
 	 * @return String
380 380
 	 */
381
-	public function _execOn($element, $event, $js, $preventDefault=false, $stopPropagation=false,$immediatly=true) {
382
-		return $this->_add_event($element, $this->_exec($js), $event, $preventDefault, $stopPropagation,$immediatly);
381
+	public function _execOn($element, $event, $js, $preventDefault=false, $stopPropagation=false, $immediatly=true) {
382
+		return $this->_add_event($element, $this->_exec($js), $event, $preventDefault, $stopPropagation, $immediatly);
383 383
 	}
384 384
 
385 385
 	/**
@@ -388,8 +388,8 @@  discard block
 block discarded – undo
388 388
 	 * @return string
389 389
 	 */
390 390
 	private function _validate_speed($speed) {
391
-		if (in_array($speed, array (
392
-				'slow','normal','fast'
391
+		if (in_array($speed, array(
392
+				'slow', 'normal', 'fast'
393 393
 		))) {
394 394
 			$speed='"'.$speed.'"';
395 395
 		} elseif (preg_match("/[^0-9]/", $speed)) {
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/IconTrait.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -8,18 +8,18 @@  discard block
 block discarded – undo
8 8
 	private $_hasIcon=false;
9 9
 
10 10
 	protected abstract function addToPropertyCtrl($name, $value, $typeCtrl);
11
-	public abstract function addContent($content,$before=false);
11
+	public abstract function addContent($content, $before=false);
12 12
 
13
-	public function addIcon($icon,$direction=Direction::LEFT){
14
-		if($this->_hasIcon===false){
13
+	public function addIcon($icon, $direction=Direction::LEFT) {
14
+		if ($this->_hasIcon===false) {
15 15
 			$iconO=$icon;
16
-			if(\is_string($icon)){
16
+			if (\is_string($icon)) {
17 17
 				$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
18 18
 			}
19 19
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
20
-			$this->addContent($iconO,false);
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"));
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 		return $iconO;
28 28
 	}
29 29
 
30
-	public function getIcon(){
31
-		if(\is_array($this->content)){
32
-			foreach ($this->content as $item){
33
-				if($item instanceof HtmlIcon)
30
+	public function getIcon() {
31
+		if (\is_array($this->content)) {
32
+			foreach ($this->content as $item) {
33
+				if ($item instanceof HtmlIcon)
34 34
 					return $item;
35 35
 			}
36 36
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/traits/FieldsTrait.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,26 +9,26 @@  discard block
 block discarded – undo
9 9
 use Ajax\semantic\html\collections\form\HtmlFormCheckbox;
10 10
 use Ajax\semantic\html\collections\form\HtmlFormRadio;
11 11
 trait FieldsTrait {
12
-	public abstract function addFields($fields=NULL,$label=NULL);
12
+	public abstract function addFields($fields=NULL, $label=NULL);
13 13
 	public abstract function addItem($item);
14 14
 
15
-	protected function createItem($value){
16
-		if(\is_array($value)){
17
-			$itemO=new HtmlFormInput(JArray::getDefaultValue($value, "id",""),JArray::getDefaultValue($value, "label",null),JArray::getDefaultValue($value, "type", "text"),JArray::getDefaultValue($value, "value",""),JArray::getDefaultValue($value, "placeholder",JArray::getDefaultValue($value, "label",null)));
15
+	protected function createItem($value) {
16
+		if (\is_array($value)) {
17
+			$itemO=new HtmlFormInput(JArray::getDefaultValue($value, "id", ""), JArray::getDefaultValue($value, "label", null), JArray::getDefaultValue($value, "type", "text"), JArray::getDefaultValue($value, "value", ""), JArray::getDefaultValue($value, "placeholder", JArray::getDefaultValue($value, "label", null)));
18 18
 			return $itemO;
19 19
 		}else
20 20
 			return new HtmlFormInput($value);
21 21
 	}
22 22
 
23
-	public function addInputs($inputs,$fieldslabel=null){
23
+	public function addInputs($inputs, $fieldslabel=null) {
24 24
 		$fields=array();
25
-		foreach ($inputs as $input){
25
+		foreach ($inputs as $input) {
26 26
 			\extract($input);
27
-			$f=new HtmlFormInput("","");
27
+			$f=new HtmlFormInput("", "");
28 28
 			$f->fromArray($input);
29 29
 			$fields[]=$f;
30 30
 		}
31
-		return $this->addFields($fields,$fieldslabel);
31
+		return $this->addFields($fields, $fieldslabel);
32 32
 	}
33 33
 
34 34
 	/**
@@ -39,23 +39,23 @@  discard block
 block discarded – undo
39 39
 	 * @param boolean $multiple
40 40
 	 * @return \Ajax\common\html\HtmlDoubleElement
41 41
 	 */
42
-	public function addDropdown($identifier,$items=array(), $label=NULL,$value=NULL,$multiple=false){
43
-		return $this->addItem(new HtmlFormDropdown($identifier,$items,$label,$value,$multiple));
42
+	public function addDropdown($identifier, $items=array(), $label=NULL, $value=NULL, $multiple=false) {
43
+		return $this->addItem(new HtmlFormDropdown($identifier, $items, $label, $value, $multiple));
44 44
 	}
45 45
 
46
-	public function addInput($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL){
47
-		return $this->addItem(new HtmlFormInput($identifier,$label,$type,$value,$placeholder));
46
+	public function addInput($identifier, $label=NULL, $type="text", $value=NULL, $placeholder=NULL) {
47
+		return $this->addItem(new HtmlFormInput($identifier, $label, $type, $value, $placeholder));
48 48
 	}
49 49
 
50
-	public function addButton($identifier,$value,$cssStyle=NULL,$onClick=NULL){
51
-		return $this->addItem(new HtmlButton($identifier,$value,$cssStyle,$onClick));
50
+	public function addButton($identifier, $value, $cssStyle=NULL, $onClick=NULL) {
51
+		return $this->addItem(new HtmlButton($identifier, $value, $cssStyle, $onClick));
52 52
 	}
53 53
 
54
-	public function addCheckbox($identifier, $label=NULL,$value=NULL,$type=NULL){
55
-		return $this->addItem(new HtmlFormCheckbox($identifier,$label,$value,$type));
54
+	public function addCheckbox($identifier, $label=NULL, $value=NULL, $type=NULL) {
55
+		return $this->addItem(new HtmlFormCheckbox($identifier, $label, $value, $type));
56 56
 	}
57 57
 
58
-	public function addRadio($identifier, $name,$label=NULL,$value=NULL){
59
-		return $this->addItem(new HtmlFormRadio($identifier,$name,$label,$value));
58
+	public function addRadio($identifier, $name, $label=NULL, $value=NULL) {
59
+		return $this->addItem(new HtmlFormRadio($identifier, $name, $label, $value));
60 60
 	}
61 61
 }
62 62
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/components/Popup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 		return $this->setParam("onShow", "%function(){".$jsCode."}%");
31 31
 	}
32 32
 
33
-	public function setExclusive($value){
33
+	public function setExclusive($value) {
34 34
 		return $this->setParam("exclusive", $value);
35 35
 	}
36 36
 
@@ -39,15 +39,15 @@  discard block
 block discarded – undo
39 39
 	 * @param string $popup the css selector of the popup
40 40
 	 * @return \Ajax\semantic\components\Popup
41 41
 	 */
42
-	public function setPopup($popup){
42
+	public function setPopup($popup) {
43 43
 		return $this->setParam("popup", $popup);
44 44
 	}
45 45
 
46
-	public function setInline($value){
46
+	public function setInline($value) {
47 47
 		return $this->setParam("inline", $value);
48 48
 	}
49 49
 
50
-	public function setPosition($value){
50
+	public function setPosition($value) {
51 51
 		return $this->setParam("position", $value);
52 52
 	}
53 53
 	//TODO other events implementation
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlSticky.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
 class HtmlSticky extends HtmlSemDoubleElement {
9 9
 	private $_params=array();
10 10
 
11
-	public function __construct($identifier,$context=NULL,$content=NULL) {
11
+	public function __construct($identifier, $context=NULL, $content=NULL) {
12 12
 		parent::__construct($identifier, "div", "ui sticky", $content);
13
-		if(isset($content))
13
+		if (isset($content))
14 14
 			$this->setContext($context);
15 15
 	}
16 16
 
17
-	public function setContext($context){
17
+	public function setContext($context) {
18 18
 		$this->_params["context"]=$context;
19 19
 		return $this;
20 20
 	}
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 	 * {@inheritDoc}
24 24
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
25 25
 	 */
26
-	public function run(JsUtils $js){
26
+	public function run(JsUtils $js) {
27 27
 		parent::run($js);
28
-		return $js->semantic()->sticky("#".$this->identifier,$this->_params);
28
+		return $js->semantic()->sticky("#".$this->identifier, $this->_params);
29 29
 	}
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormField.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -8,26 +8,26 @@  discard block
 block discarded – undo
8 8
 
9 9
 class HtmlFormField extends HtmlSemDoubleElement {
10 10
 	protected $_container;
11
-	public function __construct($identifier, $field,$label=NULL) {
12
-		parent::__construct($identifier, "div","field");
11
+	public function __construct($identifier, $field, $label=NULL) {
12
+		parent::__construct($identifier, "div", "field");
13 13
 		$this->content=array();
14
-		$this->_states=[State::ERROR,State::DISABLED];
15
-		if(isset($label))
14
+		$this->_states=[State::ERROR, State::DISABLED];
15
+		if (isset($label))
16 16
 			$this->setLabel($label);
17 17
 		$this->setField($field);
18 18
 	}
19 19
 
20
-	public function setLabel($label){
20
+	public function setLabel($label) {
21 21
 		$labelO=$label;
22
-		if(\is_string($label)){
23
-			$labelO=new HtmlSemDoubleElement("","label","");
22
+		if (\is_string($label)) {
23
+			$labelO=new HtmlSemDoubleElement("", "label", "");
24 24
 			$labelO->setContent($label);
25
-			$labelO->setProperty("for", \str_replace("field-", "",$this->identifier));
25
+			$labelO->setProperty("for", \str_replace("field-", "", $this->identifier));
26 26
 		}
27 27
 		$this->content["label"]=$labelO;
28 28
 	}
29 29
 
30
-	public function setField($field){
30
+	public function setField($field) {
31 31
 		$this->content["field"]=$field;
32 32
 	}
33 33
 
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
 	 * Returns the label or null
36 36
 	 * @return mixed
37 37
 	 */
38
-	public function getLabel(){
39
-		if(\array_key_exists("label", $this->content))
38
+	public function getLabel() {
39
+		if (\array_key_exists("label", $this->content))
40 40
 			return $this->content["label"];
41 41
 	}
42 42
 
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
 	 * Return the field
45 45
 	 * @return mixed
46 46
 	 */
47
-	public function getField(){
47
+	public function getField() {
48 48
 		return $this->content["field"];
49 49
 	}
50 50
 
51 51
 	/**
52 52
 	 * puts the label before or behind
53 53
 	 */
54
-	public function swapLabel(){
54
+	public function swapLabel() {
55 55
 		$label=$this->getLabel();
56 56
 		unset($this->content["label"]);
57 57
 		$this->content["label"]=$label;
@@ -62,27 +62,27 @@  discard block
 block discarded – undo
62 62
 	 * @param int $width
63 63
 	 * @return \Ajax\semantic\html\collections\form\HtmlFormField
64 64
 	 */
65
-	public function setWidth($width){
66
-		if(\is_int($width)){
65
+	public function setWidth($width) {
66
+		if (\is_int($width)) {
67 67
 			$width=Wide::getConstants()["W".$width];
68 68
 		}
69 69
 		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
70
-		if(isset($this->_container)){
70
+		if (isset($this->_container)) {
71 71
 			$this->_container->setEqualWidth(false);
72 72
 		}
73
-		return $this->addToPropertyCtrl("class", "wide",array("wide"));
73
+		return $this->addToPropertyCtrl("class", "wide", array("wide"));
74 74
 	}
75 75
 
76 76
 	/**
77 77
 	 * Field displays an error state
78 78
 	 * @return \Ajax\semantic\html\collections\form\HtmlFormField
79 79
 	 */
80
-	public function setError(){
80
+	public function setError() {
81 81
 		return $this->addToProperty("class", "error");
82 82
 	}
83 83
 
84
-	public function jsState($state){
85
-		return $this->jsDoJquery("addClass",$state);
84
+	public function jsState($state) {
85
+		return $this->jsDoJquery("addClass", $state);
86 86
 	}
87 87
 
88 88
 	public function setContainer($_container) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		return $this;
91 91
 	}
92 92
 
93
-	public function setReadonly(){
93
+	public function setReadonly() {
94 94
 		$this->getField()->setProperty("readonly", "");
95 95
 	}
96 96
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormInput.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@
 block discarded – undo
8 8
 class HtmlFormInput extends HtmlFormField {
9 9
 	use TextFieldsTrait;
10 10
 
11
-	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
12
-		if(!isset($placeholder) && $type==="text")
11
+	public function __construct($identifier, $label=NULL, $type="text", $value=NULL, $placeholder=NULL) {
12
+		if (!isset($placeholder) && $type==="text")
13 13
 			$placeholder=$label;
14
-		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
14
+		parent::__construct("field-".$identifier, new HtmlInput($identifier, $type, $value, $placeholder), $label);
15 15
 	}
16 16
 
17
-	public function setReadonly(){
17
+	public function setReadonly() {
18 18
 		$this->getField()->setProperty("readonly", "");
19 19
 	}
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlPopup.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 class HtmlPopup extends HtmlSemDoubleElement {
13 13
 	private $_params;
14 14
 	private $_container;
15
-	public function __construct(BaseHtml $container,$identifier, $content="") {
15
+	public function __construct(BaseHtml $container, $identifier, $content="") {
16 16
 		parent::__construct($identifier, "div");
17 17
 		$this->_container=$container;
18 18
 		$this->setClass("ui popup");
@@ -20,21 +20,21 @@  discard block
 block discarded – undo
20 20
 		$this->_params=array("on"=>"hover");
21 21
 	}
22 22
 
23
-	public function addList($items=array(),$header=NULL){
24
-		if(!$this->content instanceof HtmlGrid){
25
-			$this->content=new HtmlGrid("Grid-".$this->identifier,0);
23
+	public function addList($items=array(), $header=NULL) {
24
+		if (!$this->content instanceof HtmlGrid) {
25
+			$this->content=new HtmlGrid("Grid-".$this->identifier, 0);
26 26
 		}
27 27
 		$grid=$this->content;
28 28
 
29 29
 		$colCount=$grid->colCount();
30 30
 		$grid->setColsCount(++$colCount);
31 31
 
32
-		$list=new HtmlList("",$items);
32
+		$list=new HtmlList("", $items);
33 33
 		$list->asLink();
34
-		if(isset($header)){
35
-			$list->addHeader(4,$header);
34
+		if (isset($header)) {
35
+			$list->addHeader(4, $header);
36 36
 		}
37
-		$grid->getCell(0,$colCount-1)->setContent($list);
37
+		$grid->getCell(0, $colCount-1)->setContent($list);
38 38
 		$grid->setDivided()->setRelaxed(true);
39 39
 		return $list;
40 40
 	}
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 	/**
43 43
 	 * A popup can have no maximum width and continue to flow to fit its content
44 44
 	 */
45
-	public function setFlowing(){
45
+	public function setFlowing() {
46 46
 		return $this->addToProperty("class", "flowing");
47 47
 	}
48 48
 
49 49
 	/**
50 50
 	 * A popup can provide more basic formatting
51 51
 	 */
52
-	public function setBasic(){
52
+	public function setBasic() {
53 53
 		return $this->addToProperty("class", "basic");
54 54
 	}
55 55
 
@@ -57,22 +57,22 @@  discard block
 block discarded – undo
57 57
 	 * {@inheritDoc}
58 58
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
59 59
 	 */
60
-	public function run(JsUtils $js){
60
+	public function run(JsUtils $js) {
61 61
 		$this->_params["popup"]="#".$this->identifier;
62
-		$js->semantic()->popup("#".$this->_container->getIdentifier(),$this->_params);
62
+		$js->semantic()->popup("#".$this->_container->getIdentifier(), $this->_params);
63 63
 	}
64 64
 
65
-	public function setOn($event="click"){
65
+	public function setOn($event="click") {
66 66
 		$this->_params["on"]=$event;
67 67
 		return $this;
68 68
 	}
69 69
 
70
-	public function setInline($value=true){
70
+	public function setInline($value=true) {
71 71
 		$this->_params["inline"]=$value;
72 72
 		return $this;
73 73
 	}
74 74
 
75
-	public function setPosition($position){
75
+	public function setPosition($position) {
76 76
 		$this->_params["position"]=$position;
77 77
 		return $this;
78 78
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlGridRow.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -16,24 +16,24 @@  discard block
 block discarded – undo
16 16
  * @author jc
17 17
  * @version 1.001
18 18
  */
19
-class HtmlGridRow extends HtmlSemCollection{
19
+class HtmlGridRow extends HtmlSemCollection {
20 20
 	use TextAlignmentTrait;
21 21
 
22 22
 	private $_colSize;
23 23
 	private $_implicite=false;
24 24
 
25
-	public function __construct( $identifier,$numCols=NULL,$colSizing=false,$implicite=false){
26
-		parent::__construct( $identifier,"div","row");
25
+	public function __construct($identifier, $numCols=NULL, $colSizing=false, $implicite=false) {
26
+		parent::__construct($identifier, "div", "row");
27 27
 		$this->_implicite=$implicite;
28 28
 		$width=null;
29
-		if(isset($numCols)){
30
-			$numCols=min(16,$numCols);
31
-			$numCols=max(1,$numCols);
32
-			if($colSizing)
33
-				$width=(int)(16/$numCols);
29
+		if (isset($numCols)) {
30
+			$numCols=min(16, $numCols);
31
+			$numCols=max(1, $numCols);
32
+			if ($colSizing)
33
+				$width=(int) (16 / $numCols);
34 34
 			else
35
-				$this->_colSize=16/$numCols;
36
-			for ($i=0;$i<$numCols;$i++){
35
+				$this->_colSize=16 / $numCols;
36
+			for ($i=0; $i<$numCols; $i++) {
37 37
 				$this->addItem($width);
38 38
 			}
39 39
 		}
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 	 * @param int $width
45 45
 	 * @return \Ajax\semantic\html\content\HtmlGridRow
46 46
 	 */
47
-	public function setWidth($width){
48
-		if(\is_int($width)){
47
+	public function setWidth($width) {
48
+		if (\is_int($width)) {
49 49
 			$width=Wide::getConstants()["W".$width];
50 50
 		}
51 51
 		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
52
-		return $this->addToPropertyCtrl("class", "column",array("column"));
52
+		return $this->addToPropertyCtrl("class", "column", array("column"));
53 53
 	}
54 54
 
55 55
 	/**
@@ -57,29 +57,29 @@  discard block
 block discarded – undo
57 57
 	 * @param int $index
58 58
 	 * @return \Ajax\semantic\html\collections\HtmlGridCol
59 59
 	 */
60
-	public function getCol($index){
60
+	public function getCol($index) {
61 61
 		return $this->getItem($index);
62 62
 	}
63 63
 
64
-	public function setColsCount($colsCount,$toCreate=true){
64
+	public function setColsCount($colsCount, $toCreate=true) {
65 65
 		$this->setWidth($colsCount);
66
-		if($toCreate===true){
66
+		if ($toCreate===true) {
67 67
 			$count=$this->count();
68
-			for($i=$count;$i<$colsCount;$i++){
68
+			for ($i=$count; $i<$colsCount; $i++) {
69 69
 				$this->addItem(null);
70 70
 			}
71 71
 		}
72 72
 		return $this;
73 73
 	}
74 74
 
75
-	public function addCols($colCount){
76
-		for($i=0;$i<$colCount;$i++){
75
+	public function addCols($colCount) {
76
+		for ($i=0; $i<$colCount; $i++) {
77 77
 			$this->addItem(null);
78 78
 		}
79 79
 		return $this;
80 80
 	}
81 81
 
82
-	public function addCol($width=NULL){
82
+	public function addCol($width=NULL) {
83 83
 		return $this->addItem($width);
84 84
 	}
85 85
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * stretch the row contents to take up the entire column height
88 88
 	 * @return \Ajax\semantic\html\content\HtmlGridRow
89 89
 	 */
90
-	public function setStretched(){
90
+	public function setStretched() {
91 91
 		return $this->addToProperty("class", "stretched");
92 92
 	}
93 93
 
@@ -95,19 +95,19 @@  discard block
 block discarded – undo
95 95
 	 * @param string $color
96 96
 	 * @return \Ajax\semantic\html\content\HtmlGridRow
97 97
 	 */
98
-	public function setColor($color){
99
-		return $this->addToPropertyCtrl("class", $color,Color::getConstants());
98
+	public function setColor($color) {
99
+		return $this->addToPropertyCtrl("class", $color, Color::getConstants());
100 100
 	}
101 101
 
102
-	public function setValues($values,$force=false){
102
+	public function setValues($values, $force=false) {
103 103
 		$count=$this->count();
104
-		if($force===true){
105
-			for($i=$count;$i<\sizeof($values);$i++){
106
-				$this->addItem(new HtmlGridCol($this->identifier."-col-".($this->count()+1),null));
104
+		if ($force===true) {
105
+			for ($i=$count; $i<\sizeof($values); $i++) {
106
+				$this->addItem(new HtmlGridCol($this->identifier."-col-".($this->count()+1), null));
107 107
 			}
108 108
 		}
109
-		$count=\min(array($this->count(),\sizeof($values)));
110
-		for($i=0;$i<$count;$i++){
109
+		$count=\min(array($this->count(), \sizeof($values)));
110
+		for ($i=0; $i<$count; $i++) {
111 111
 			$this->content[$i]->setValue($values[$i]);
112 112
 		}
113 113
 		return $this;
@@ -117,15 +117,15 @@  discard block
 block discarded – undo
117 117
 	 * {@inheritDoc}
118 118
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
119 119
 	 */
120
-	protected function createItem($value){
121
-		$col=new HtmlGridCol($this->identifier."-col-".($this->count()+1),$value);
120
+	protected function createItem($value) {
121
+		$col=new HtmlGridCol($this->identifier."-col-".($this->count()+1), $value);
122 122
 		return $col;
123 123
 	}
124 124
 
125
-	public function compile(JsUtils $js=NULL,View $view=NULL){
126
-		if($this->_implicite===true){
125
+	public function compile(JsUtils $js=NULL, View $view=NULL) {
126
+		if ($this->_implicite===true) {
127 127
 			$this->_template="%wrapContentBefore%%content%%wrapContentAfter%";
128 128
 		}
129
-		return parent::compile($js,$view);
129
+		return parent::compile($js, $view);
130 130
 	}
131 131
 }
132 132
\ No newline at end of file
Please login to merge, or discard this patch.