Passed
Branch master (77da54)
by Jean-Christophe
02:40 queued 14s
created
Ajax/common/components/SimpleComponent.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -18,27 +18,27 @@  discard block
 block discarded – undo
18 18
 
19 19
 	public function __construct(JsUtils $js=NULL) {
20 20
 		parent::__construct($js);
21
-		$this->events=array ();
21
+		$this->events=array();
22 22
 	}
23 23
 
24 24
 	protected function compileEvents() {
25
-		foreach ( $this->events as $event => $jsCode ) {
25
+		foreach ($this->events as $event => $jsCode) {
26 26
 			$itemSelector=JString::getValueBetween($event);
27
-			if($event=="execute"){
27
+			if ($event=="execute") {
28 28
 				$this->jquery_code_for_compile []=$jsCode;
29
-			}else if($event=="beforeExecute"){
29
+			} else if ($event=="beforeExecute") {
30 30
 				\array_unshift($this->jquery_code_for_compile, $jsCode);
31
-			}else{
31
+			} else {
32 32
 				$selector=$this->_createSelector($itemSelector, $this->attachTo);
33 33
 				$this->jquery_code_for_compile []="$( \"".$selector."\" ).on(\"".$event."\" , function( event, data ) {".$jsCode."});";
34 34
 			}
35 35
 		}
36 36
 	}
37 37
 
38
-	protected function _createSelector($itemSelector,$selector){
39
-		if(!isset($itemSelector))
38
+	protected function _createSelector($itemSelector, $selector) {
39
+		if (!isset($itemSelector))
40 40
 			$itemSelector=$this->itemSelector;
41
-		if(isset($itemSelector) && $itemSelector!=="")
41
+		if (isset($itemSelector) && $itemSelector!=="")
42 42
 			$selector.=" ".$itemSelector;
43 43
 		return $selector;
44 44
 	}
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		$result=implode("\n", $this->jquery_code_for_compile);
48 48
 		$result=str_ireplace("\"%", "", $result);
49 49
 		$result=str_ireplace("%\"", "", $result);
50
-		$result=str_replace(array (
50
+		$result=str_replace(array(
51 51
 				"\\n",
52 52
 				"\\r",
53 53
 				"\\t"
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 	public function getScript() {
59 59
 		$allParams=$this->params;
60
-		$this->jquery_code_for_compile=array ();
60
+		$this->jquery_code_for_compile=array();
61 61
 		$this->jquery_code_for_compile []="$( \"".$this->attachTo."\" ).{$this->uiName}(".$this->getParamsAsJSON($allParams).");";
62 62
 		$this->compileEvents();
63 63
 		return $this->compileJQueryCode();
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlForm.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 	public function __construct($identifier) {
17 17
 		parent::__construct($identifier, "form");
18 18
 		$this->_template='<form id="%identifier%" name="%identifier%" %properties%>%content%</form>';
19
-		$this->futureElements=array ();
20
-		$this->formGroups=array ();
19
+		$this->futureElements=array();
20
+		$this->formGroups=array();
21 21
 	}
22 22
 
23 23
 	/*
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
28 28
 		if (isset($js)) {
29 29
 			$this->formElementsPrefix=$js->config()->getVar("formElementsPrefix");
30
-			foreach ( $this->futureElements as $futureElement ) {
30
+			foreach ($this->futureElements as $futureElement) {
31 31
 				$futureElementValue=$this->getPrefix($futureElement);
32 32
 				$futureElementValues=explode("_", $futureElementValue);
33
-				switch($futureElementValues [0]) {
33
+				switch ($futureElementValues [0]) {
34 34
 					case "input":
35 35
 						$control=new HtmlInput($futureElement);
36 36
 						$control->setClass("form-control");
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 						$control->setLabel($label, false);
49 49
 						break;
50 50
 					case "select":
51
-						$control=new HtmlSelect($futureElement,"");
51
+						$control=new HtmlSelect($futureElement, "");
52 52
 						$control->setProperty("size", $futureElementValues [1]);
53 53
 						$control->setClass("form-control");
54 54
 						break;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 				$this->addElement($control);
62 62
 			}
63 63
 		}
64
-		foreach ( $this->formGroups as $group ) {
64
+		foreach ($this->formGroups as $group) {
65 65
 			$this->addContent($group);
66 66
 		}
67 67
 		return parent::compile($js, $view);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 	protected function getPrefix($element) {
91 91
 		$result="input_text";
92
-		foreach ( $this->formElementsPrefix as $k => $v ) {
92
+		foreach ($this->formElementsPrefix as $k => $v) {
93 93
 			if (JString::startswith($element, $k)) {
94 94
 				$result=$v;
95 95
 				break;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
 	public function getElement($name) {
121 121
 		$element=null;
122
-		foreach ( $this->formGroups as $group ) {
122
+		foreach ($this->formGroups as $group) {
123 123
 		}
124 124
 		return $element;
125 125
 	}
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 * @see \Ajax\bootstrap\html\base\HtmlSingleElement::fromArray()
130 130
 	 */
131 131
 	public function fromArray($array) {
132
-		foreach ( $array as $value ) {
132
+		foreach ($array as $value) {
133 133
 			if (is_string($value)) {
134 134
 				$this->futureElements []=$value;
135 135
 			}
Please login to merge, or discard this patch.
Ajax/service/JArray.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 class JArray {
6 6
 
7 7
 	public static function isAssociative($array) {
8
-		return (array_values($array) !== $array);
8
+		return (array_values($array)!==$array);
9 9
 	}
10 10
 
11 11
 	public static function getValue($array, $key, $pos) {
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 			return $array[$key];
14 14
 		}
15 15
 		$values=array_values($array);
16
-		if ($pos < sizeof($values))
16
+		if ($pos<sizeof($values))
17 17
 			return $values[$pos];
18 18
 	}
19 19
 
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
 		$result=NULL;
22 22
 		if (array_key_exists($key, $array)) {
23 23
 			$result=$array[$key];
24
-			if ($condition($result) === true)
24
+			if ($condition($result)===true)
25 25
 				return $result;
26 26
 		}
27 27
 		$values=array_values($array);
28
-		foreach ( $values as $val ) {
29
-			if ($condition($val) === true)
28
+		foreach ($values as $val) {
29
+			if ($condition($val)===true)
30 30
 				return $val;
31 31
 		}
32 32
 		return $result;
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 		$result="";
44 44
 		if (\is_array($glue)) {
45 45
 			$size=\sizeof($pieces);
46
-			if ($size > 0) {
47
-				for($i=0; $i < $size - 1; $i++) {
48
-					$result.=$pieces[$i] . @$glue[$i];
46
+			if ($size>0) {
47
+				for ($i=0; $i<$size-1; $i++) {
48
+					$result.=$pieces[$i].@$glue[$i];
49 49
 				}
50
-				$result.=$pieces[$size - 1];
50
+				$result.=$pieces[$size-1];
51 51
 			}
52 52
 		} else {
53 53
 			$result=\implode($glue, $pieces);
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 	public static function dimension($array) {
59 59
 		if (\is_array(reset($array))) {
60
-			$return=self::dimension(reset($array)) + 1;
60
+			$return=self::dimension(reset($array))+1;
61 61
 		} else {
62 62
 			$return=1;
63 63
 		}
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 	}
66 66
 
67 67
 	public static function sortAssociative($array, $sortedKeys=array()) {
68
-		$newArray=array ();
69
-		foreach ( $sortedKeys as $key ) {
68
+		$newArray=array();
69
+		foreach ($sortedKeys as $key) {
70 70
 			if (\array_key_exists($key, $array)) {
71 71
 				$newArray[$key]=$array[$key];
72 72
 			}
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 
77 77
 	public static function moveElementTo(&$array, $from, $to) {
78 78
 		$result=false;
79
-		if(isset($array)){
80
-			if(isset($array[$from])){
81
-				$out = array_splice($array, $from, 1);
79
+		if (isset($array)) {
80
+			if (isset($array[$from])) {
81
+				$out=array_splice($array, $from, 1);
82 82
 				array_splice($array, $to, 0, $out);
83 83
 				$result=true;
84 84
 			}
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
 		return $result;
87 87
 	}
88 88
 
89
-	public static function swapElements(&$array,$index1,$index2){
89
+	public static function swapElements(&$array, $index1, $index2) {
90 90
 		$result=false;
91
-		if(isset($array)){
92
-			if(isset($array[$index1])&& isset($array[$index2])){
91
+		if (isset($array)) {
92
+			if (isset($array[$index1]) && isset($array[$index2])) {
93 93
 				$tmp=$array[$index1];
94 94
 				$array[$index1]=$array[$index2];
95 95
 				$array[$index2]=$tmp;
@@ -100,27 +100,27 @@  discard block
 block discarded – undo
100 100
 	}
101 101
 
102 102
 
103
-	public static function modelArray($objects,$identifierFunction=NULL,$modelFunction=NULL){
103
+	public static function modelArray($objects, $identifierFunction=NULL, $modelFunction=NULL) {
104 104
 		$result=[];
105
-		if(isset($modelFunction)===false){
105
+		if (isset($modelFunction)===false) {
106 106
 			$modelFunction="__toString";
107 107
 		}
108
-		if(isset($identifierFunction)===false){
109
-			foreach ($objects as $object){
108
+		if (isset($identifierFunction)===false) {
109
+			foreach ($objects as $object) {
110 110
 				$result[]=self::callFunction($object, $modelFunction);
111 111
 			}
112
-		}else{
113
-			foreach ($objects as $object){
112
+		} else {
113
+			foreach ($objects as $object) {
114 114
 				$result[self::callFunction($object, $identifierFunction)]=self::callFunction($object, $modelFunction);
115 115
 			}
116 116
 		}
117 117
 		return $result;
118 118
 	}
119 119
 
120
-	private static function callFunction($object,$callback){
121
-		if(\is_string($callback))
122
-			return \call_user_func(array($object, $callback),[]);
123
-		else if (\is_callable($callback)){
120
+	private static function callFunction($object, $callback) {
121
+		if (\is_string($callback))
122
+			return \call_user_func(array($object, $callback), []);
123
+		else if (\is_callable($callback)) {
124 124
 			return $callback($object);
125 125
 		}
126 126
 	}
Please login to merge, or discard this patch.
Ajax/semantic/widgets/dataform/FormInstanceViewer.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -11,58 +11,58 @@  discard block
 block discarded – undo
11 11
 	protected $headers;
12 12
 	protected $wrappers;
13 13
 
14
-	public function __construct($identifier,$instance=NULL, $captions=NULL) {
15
-		parent::__construct($identifier,$instance, $captions);
14
+	public function __construct($identifier, $instance=NULL, $captions=NULL) {
15
+		parent::__construct($identifier, $instance, $captions);
16 16
 		$this->separators=[-1];
17 17
 		$this->headers=[];
18 18
 		$this->wrappers=[];
19
-		$this->defaultValueFunction=function($name,$value,$index){
19
+		$this->defaultValueFunction=function($name, $value, $index) {
20 20
 			$caption=$this->getCaption($index);
21
-			$input=new HtmlFormInput($this->widgetIdentifier."-".$name,$caption,"text",$value);
21
+			$input=new HtmlFormInput($this->widgetIdentifier."-".$name, $caption, "text", $value);
22 22
 			$input->setName($name);
23 23
 			return $input;
24 24
 		};
25 25
 	}
26 26
 
27
-	protected function _beforeAddProperty($index,&$field){
28
-		if(JString::endswith($field, "\n")===true){
27
+	protected function _beforeAddProperty($index, &$field) {
28
+		if (JString::endswith($field, "\n")===true) {
29 29
 			$this->addSeparatorAfter($index);
30 30
 		}
31
-		if($index>1 && JString::startswith($field, "\n")===true){
31
+		if ($index>1 && JString::startswith($field, "\n")===true) {
32 32
 			$this->addSeparatorAfter($index-1);
33 33
 		}
34 34
 		$field=\str_replace("\n", "", $field);
35
-		if(($header=$this->hasHeader($field))!==false){
35
+		if (($header=$this->hasHeader($field))!==false) {
36 36
 			$this->addHeaderDividerBefore($index, $header);
37 37
 		}
38 38
 	}
39 39
 
40
-	protected function hasHeader(&$field){
41
-		$matches=[];$result=false;
42
-		if(\preg_match('/\{(.*?)\}/s', $field, $matches)===1){
40
+	protected function hasHeader(&$field) {
41
+		$matches=[]; $result=false;
42
+		if (\preg_match('/\{(.*?)\}/s', $field, $matches)===1) {
43 43
 			$result=$matches[1];
44
-			$field=\str_replace("{".$result."}","", $field);
44
+			$field=\str_replace("{".$result."}", "", $field);
45 45
 		}
46 46
 		return $result;
47 47
 	}
48 48
 
49 49
 
50 50
 
51
-	public function addSeparatorAfter($fieldNum){
52
-		if(\array_search($fieldNum, $this->separators)===false)
51
+	public function addSeparatorAfter($fieldNum) {
52
+		if (\array_search($fieldNum, $this->separators)===false)
53 53
 			$this->separators[]=$fieldNum;
54 54
 		return $this;
55 55
 	}
56 56
 
57
-	public function addHeaderDividerBefore($fieldNum,$header){
57
+	public function addHeaderDividerBefore($fieldNum, $header) {
58 58
 		$this->headers[$fieldNum]=$header;
59
-		if($fieldNum>0)
59
+		if ($fieldNum>0)
60 60
 			$this->addSeparatorAfter($fieldNum-1);
61 61
 		return $this;
62 62
 	}
63 63
 
64
-	public function addWrapper($fieldNum,$contentBefore,$contentAfter=null){
65
-		$this->wrappers[$fieldNum]=[$contentBefore,$contentAfter];
64
+	public function addWrapper($fieldNum, $contentBefore, $contentAfter=null) {
65
+		$this->wrappers[$fieldNum]=[$contentBefore, $contentAfter];
66 66
 			return $this;
67 67
 	}
68 68
 
@@ -70,16 +70,16 @@  discard block
 block discarded – undo
70 70
 		return $this->separators;
71 71
 	}
72 72
 
73
-	public function removeSeparator($index){
74
-		\array_splice($this->separators,$index,1);
73
+	public function removeSeparator($index) {
74
+		\array_splice($this->separators, $index, 1);
75 75
 	}
76 76
 
77
-	public function removeField($index){
77
+	public function removeField($index) {
78 78
 		parent::removeField($index);
79 79
 		$pos=\array_search($index, $this->separators);
80
-		if($pos!==false){
80
+		if ($pos!==false) {
81 81
 			$sepCount=\sizeof($this->separators);
82
-			for($i=$pos+1;$i<$sepCount;$i++){
82
+			for ($i=$pos+1; $i<$sepCount; $i++) {
83 83
 				$this->separators[$i]--;
84 84
 			}
85 85
 			\array_splice($this->separators, $pos, 1);
Please login to merge, or discard this patch.
Ajax/semantic/components/Sticky.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 		return $this->setParam("context", $value);
22 22
 	}
23 23
 
24
-	public function setOffset($offset=0){
24
+	public function setOffset($offset=0) {
25 25
 		return $this->setParam("offset", $offset);
26 26
 	}
27 27
 }
Please login to merge, or discard this patch.
Ajax/semantic/components/Checkbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 		$this->params["onUnchecked"]="%function(){".$value."}%";
21 21
 	}
22 22
 
23
-	public function setOnChange($value){
23
+	public function setOnChange($value) {
24 24
 		$this->params["onChange"]="%function(){".$value."}%";
25 25
 	}
26 26
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormInput.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,16 +8,16 @@
 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
 		$this->_identifier=$identifier;
16 16
 	}
17 17
 
18
-	public function getDataField(){
19
-		$field= $this->getField();
20
-		if($field instanceof HtmlInput)
18
+	public function getDataField() {
19
+		$field=$this->getField();
20
+		if ($field instanceof HtmlInput)
21 21
 			$field=$field->getDataField();
22 22
 		return $field;
23 23
 	}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlBreadcrumbs.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@  discard block
 block discarded – undo
42 42
 	 * @param boolean $autoActive sets the last element's class to <b>active</b> if true
43 43
 	 * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()}
44 44
 	 */
45
-	public function __construct($identifier,$elements=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){
46
-		parent::__construct($identifier,"ol");
45
+	public function __construct($identifier, $elements=array(), $autoActive=true, $startIndex=0, $hrefFunction=NULL) {
46
+		parent::__construct($identifier, "ol");
47 47
 		$this->startIndex=$startIndex;
48 48
 		$this->setProperty("class", "breadcrumb");
49 49
 		$this->content=array();
50 50
 		$this->autoActive=$autoActive;
51 51
 		$this->absolutePaths;
52
-		$this->_hrefFunction=function (HtmlDoubleElement $e){return $e->getContent();};
53
-		if(isset($hrefFunction)){
52
+		$this->_hrefFunction=function(HtmlDoubleElement $e) {return $e->getContent(); };
53
+		if (isset($hrefFunction)) {
54 54
 			$this->_hrefFunction=$hrefFunction;
55 55
 		}
56 56
 		$this->addElements($elements);
@@ -61,43 +61,43 @@  discard block
 block discarded – undo
61 61
 	 * @param string $href
62 62
 	 * @return \Ajax\bootstrap\html\HtmlLink
63 63
 	 */
64
-	public function addElement($element,$href="",$glyph=NULL){
64
+	public function addElement($element, $href="", $glyph=NULL) {
65 65
 		$size=sizeof($this->content);
66
-		if(\is_array($element)){
66
+		if (\is_array($element)) {
67 67
 			$elm=new HtmlLink("lnk-".$this->identifier."-".$size);
68 68
 			$elm->fromArray($element);
69
-		}else if($element instanceof HtmlLink){
69
+		} else if ($element instanceof HtmlLink) {
70 70
 			$elm=$element;
71
-		}else{
72
-			$elm=new HtmlLink("lnk-".$this->identifier."-".$size,$href,$element);
73
-			if(isset($glyph)){
71
+		} else {
72
+			$elm=new HtmlLink("lnk-".$this->identifier."-".$size, $href, $element);
73
+			if (isset($glyph)) {
74 74
 				$elm->wrapContentWithGlyph($glyph);
75 75
 			}
76 76
 		}
77
-		$elm->wrap("<li>","</li>");
77
+		$elm->wrap("<li>", "</li>");
78 78
 		$this->content[]=$elm;
79 79
 		$elm->setProperty($this->attr, $this->getHref($size));
80 80
 		return $elm;
81 81
 	}
82 82
 
83
-	public function setActive($index=null){
84
-		if(!isset($index)){
83
+	public function setActive($index=null) {
84
+		if (!isset($index)) {
85 85
 			$index=sizeof($this->content)-1;
86 86
 		}
87
-		$li=new HtmlBsDoubleElement("","li");
87
+		$li=new HtmlBsDoubleElement("", "li");
88 88
 		$li->setClass("active");
89 89
 		$li->setContent($this->content[$index]->getContent());
90 90
 		$this->content[$index]=$li;
91 91
 	}
92 92
 
93
-	public function addElements($elements){
94
-		foreach ( $elements as $element ) {
93
+	public function addElements($elements) {
94
+		foreach ($elements as $element) {
95 95
 			$this->addElement($element);
96 96
 		}
97 97
 		return $this;
98 98
 	}
99 99
 
100
-	public function fromArray($array){
100
+	public function fromArray($array) {
101 101
 		$array=parent::fromArray($array);
102 102
 		$this->addElements($array);
103 103
 		return $array;
@@ -109,14 +109,14 @@  discard block
 block discarded – undo
109 109
 	 * @param string $separator
110 110
 	 * @return string
111 111
 	 */
112
-	public function getHref($index=null,$separator="/"){
113
-		if(!isset($index)){
112
+	public function getHref($index=null, $separator="/") {
113
+		if (!isset($index)) {
114 114
 			$index=sizeof($this->content);
115 115
 		}
116
-		if($this->absolutePaths===true){
116
+		if ($this->absolutePaths===true) {
117 117
 			return $this->_hrefFunction($this->content[$index]);
118
-		}else{
119
-			return $this->root.implode($separator, array_slice(array_map(function($e){return $this->_hrefFunction($e);}, $this->content),$this->startIndex,$index+1));
118
+		} else {
119
+			return $this->root.implode($separator, array_slice(array_map(function($e) {return $this->_hrefFunction($e); }, $this->content), $this->startIndex, $index+1));
120 120
 		}
121 121
 	}
122 122
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	 * @see \Ajax\bootstrap\html\BaseHtml::compile()
126 126
 	 */
127 127
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
128
-		if($this->autoActive){
128
+		if ($this->autoActive) {
129 129
 			$this->setActive();
130 130
 		}
131 131
 		return parent::compile($js, $view);
@@ -143,19 +143,19 @@  discard block
 block discarded – undo
143 143
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
144 144
 	 */
145 145
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
146
-		foreach ($this->content as $element){
147
-			$element->on($event,$jsCode,$stopPropagation,$preventDefault);
146
+		foreach ($this->content as $element) {
147
+			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
148 148
 		}
149 149
 		return $this;
150 150
 	}
151 151
 
152 152
 	public function setAutoActive($autoActive) {
153
-		$this->autoActive = $autoActive;
153
+		$this->autoActive=$autoActive;
154 154
 		return $this;
155 155
 	}
156 156
 
157 157
 	public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) {
158
-		foreach ($this->content as $element){
158
+		foreach ($this->content as $element) {
159 159
 			$element->_ajaxOn($operation, $event, $url, $responseElement, $parameters);
160 160
 		}
161 161
 		return $this;
@@ -167,18 +167,18 @@  discard block
 block discarded – undo
167 167
 	 * @param string $targetSelector the target of the get
168 168
 	 * @return HtmlBreadcrumbs
169 169
 	 */
170
-	public function autoGetOnClick($targetSelector){
171
-		return $this->getOnClick($this->root, $targetSelector,array("attr"=>$this->attr));
170
+	public function autoGetOnClick($targetSelector) {
171
+		return $this->getOnClick($this->root, $targetSelector, array("attr"=>$this->attr));
172 172
 	}
173 173
 
174
-	public function contentAsString(){
175
-		if($this->autoActive){
174
+	public function contentAsString() {
175
+		if ($this->autoActive) {
176 176
 			$this->setActive();
177 177
 		}
178 178
 		return parent::contentAsString();
179 179
 	}
180 180
 
181
-	public function getElement($index){
181
+	public function getElement($index) {
182 182
 		return $this->content[$index];
183 183
 	}
184 184
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 * @param mixed $glyph
188 188
 	 * @param int $index
189 189
 	 */
190
-	public function addGlyph($glyph,$index=0){
190
+	public function addGlyph($glyph, $index=0) {
191 191
 		$elm=$this->getElement($index);
192 192
 		return $elm->wrapContentWithGlyph($glyph);
193 193
 	}
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	 * @param Dispatcher $dispatcher the request dispatcher
199 199
 	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
200 200
 	 */
201
-	public function fromDispatcher(JsUtils $js,$dispatcher,$startIndex=0){
201
+	public function fromDispatcher(JsUtils $js, $dispatcher, $startIndex=0) {
202 202
 		$this->startIndex=$startIndex;
203 203
 		return $this->addElements($js->fromDispatcher($dispatcher));
204 204
 	}
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
211 211
 	 */
212 212
 	public function setHrefFunction($_hrefFunction) {
213
-		$this->_hrefFunction = $_hrefFunction;
213
+		$this->_hrefFunction=$_hrefFunction;
214 214
 		return $this;
215 215
 	}
216 216
 
Please login to merge, or discard this patch.
Ajax/ui/components/Autocomplete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	 * @return $this
51 51
 	 */
52 52
 	public function setSource($source) {
53
-		$source=str_ireplace(array (
53
+		$source=str_ireplace(array(
54 54
 				"\"",
55 55
 				"'"
56 56
 		), "%quote%", $source);
Please login to merge, or discard this patch.