Completed
Push — master ( fc7c74...94aea7 )
by Jean-Christophe
04:24
created
Ajax/bootstrap/html/HtmlBreadcrumbs.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -41,15 +41,15 @@  discard block
 block discarded – undo
41 41
 	 * @param boolean $autoActive sets the last element's class to <b>active</b> if true
42 42
 	 * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()}
43 43
 	 */
44
-	public function __construct($identifier,$elements=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){
45
-		parent::__construct($identifier,"ol");
44
+	public function __construct($identifier, $elements=array(), $autoActive=true, $startIndex=0, $hrefFunction=NULL) {
45
+		parent::__construct($identifier, "ol");
46 46
 		$this->startIndex=$startIndex;
47 47
 		$this->setProperty("class", "breadcrumb");
48 48
 		$this->content=array();
49 49
 		$this->autoActive=$autoActive;
50 50
 		$this->absolutePaths;
51
-		$this->_hrefFunction=function ($e){return $e->getContent();};
52
-		if(isset($hrefFunction)){
51
+		$this->_hrefFunction=function($e) {return $e->getContent(); };
52
+		if (isset($hrefFunction)) {
53 53
 			$this->_hrefFunction=$hrefFunction;
54 54
 		}
55 55
 		$this->addElements($elements);
@@ -60,43 +60,43 @@  discard block
 block discarded – undo
60 60
 	 * @param string $href
61 61
 	 * @return \Ajax\bootstrap\html\HtmlLink
62 62
 	 */
63
-	public function addElement($element,$href="",$glyph=NULL){
63
+	public function addElement($element, $href="", $glyph=NULL) {
64 64
 		$size=sizeof($this->content);
65
-		if(is_array($element)){
65
+		if (is_array($element)) {
66 66
 			$elm=new HtmlLink("lnk-".$this->identifier."-".$size);
67 67
 			$elm->fromArray($element);
68
-		}else if($element instanceof HtmlLink){
68
+		}else if ($element instanceof HtmlLink) {
69 69
 			$elm=$element;
70
-		}else{
71
-			$elm=new HtmlLink("lnk-".$this->identifier."-".$size,$href,$element);
72
-			if(isset($glyph)){
70
+		}else {
71
+			$elm=new HtmlLink("lnk-".$this->identifier."-".$size, $href, $element);
72
+			if (isset($glyph)) {
73 73
 				$elm->wrapContentWithGlyph($glyph);
74 74
 			}
75 75
 		}
76
-		$elm->wrap("<li>","</li>");
76
+		$elm->wrap("<li>", "</li>");
77 77
 		$this->content[]=$elm;
78 78
 		$elm->setProperty($this->attr, $this->getHref($size));
79 79
 		return $elm;
80 80
 	}
81 81
 
82
-	public function setActive($index=null){
83
-		if(!isset($index)){
82
+	public function setActive($index=null) {
83
+		if (!isset($index)) {
84 84
 			$index=sizeof($this->content)-1;
85 85
 		}
86
-		$li=new HtmlBsDoubleElement("","li");
86
+		$li=new HtmlBsDoubleElement("", "li");
87 87
 		$li->setClass("active");
88 88
 		$li->setContent($this->content[$index]->getContent());
89 89
 		$this->content[$index]=$li;
90 90
 	}
91 91
 
92
-	public function addElements($elements){
93
-		foreach ( $elements as $element ) {
92
+	public function addElements($elements) {
93
+		foreach ($elements as $element) {
94 94
 			$this->addElement($element);
95 95
 		}
96 96
 		return $this;
97 97
 	}
98 98
 
99
-	public function fromArray($array){
99
+	public function fromArray($array) {
100 100
 		$array=parent::fromArray($array);
101 101
 		$this->addElements($array);
102 102
 		return $array;
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
 	 * @param string $separator
109 109
 	 * @return string
110 110
 	 */
111
-	public function getHref($index=null,$separator="/"){
112
-		if(!isset($index)){
111
+	public function getHref($index=null, $separator="/") {
112
+		if (!isset($index)) {
113 113
 			$index=sizeof($this->content);
114 114
 		}
115
-		if($this->absolutePaths===true){
115
+		if ($this->absolutePaths===true) {
116 116
 			return $this->_hrefFunction($this->content[$index]);
117
-		}else{
118
-			return $this->root.implode($separator, array_slice(array_map(function($e){return $this->_hrefFunction($e);}, $this->content),$this->startIndex,$index+1));
117
+		}else {
118
+			return $this->root.implode($separator, array_slice(array_map(function($e) {return $this->_hrefFunction($e); }, $this->content), $this->startIndex, $index+1));
119 119
 		}
120 120
 	}
121 121
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	 * @see \Ajax\bootstrap\html\BaseHtml::compile()
125 125
 	 */
126 126
 	public function compile(JsUtils $js=NULL, $view=NULL) {
127
-		if($this->autoActive){
127
+		if ($this->autoActive) {
128 128
 			$this->setActive();
129 129
 		}
130 130
 		return parent::compile($js, $view);
@@ -142,19 +142,19 @@  discard block
 block discarded – undo
142 142
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
143 143
 	 */
144 144
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
145
-		foreach ($this->content as $element){
146
-			$element->on($event,$jsCode,$stopPropagation,$preventDefault);
145
+		foreach ($this->content as $element) {
146
+			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
147 147
 		}
148 148
 		return $this;
149 149
 	}
150 150
 
151 151
 	public function setAutoActive($autoActive) {
152
-		$this->autoActive = $autoActive;
152
+		$this->autoActive=$autoActive;
153 153
 		return $this;
154 154
 	}
155 155
 
156 156
 	public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) {
157
-		foreach ($this->content as $element){
157
+		foreach ($this->content as $element) {
158 158
 			$element->_ajaxOn($operation, $event, $url, $responseElement, $parameters);
159 159
 		}
160 160
 		return $this;
@@ -166,18 +166,18 @@  discard block
 block discarded – undo
166 166
 	 * @param string $targetSelector the target of the get
167 167
 	 * @return HtmlBreadcrumbs
168 168
 	 */
169
-	public function autoGetOnClick($targetSelector){
170
-		return $this->getOnClick($this->root, $targetSelector,array("attr"=>$this->attr));
169
+	public function autoGetOnClick($targetSelector) {
170
+		return $this->getOnClick($this->root, $targetSelector, array("attr"=>$this->attr));
171 171
 	}
172 172
 
173
-	public function contentAsString(){
174
-		if($this->autoActive){
173
+	public function contentAsString() {
174
+		if ($this->autoActive) {
175 175
 			$this->setActive();
176 176
 		}
177 177
 		return parent::contentAsString();
178 178
 	}
179 179
 
180
-	public function getElement($index){
180
+	public function getElement($index) {
181 181
 		return $this->content[$index];
182 182
 	}
183 183
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	 * @param mixed $glyph
187 187
 	 * @param int $index
188 188
 	 */
189
-	public function addGlyph($glyph,$index=0){
189
+	public function addGlyph($glyph, $index=0) {
190 190
 		$elm=$this->getElement($index);
191 191
 		return $elm->wrapContentWithGlyph($glyph);
192 192
 	}
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	 * @param Dispatcher $dispatcher the request dispatcher
198 198
 	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
199 199
 	 */
200
-	public function fromDispatcher(JsUtils $js,$dispatcher,$startIndex=0){
200
+	public function fromDispatcher(JsUtils $js, $dispatcher, $startIndex=0) {
201 201
 		$this->startIndex=$startIndex;
202 202
 		return $this->addElements($js->fromDispatcher($dispatcher));
203 203
 	}
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
210 210
 	 */
211 211
 	public function setHrefFunction($_hrefFunction) {
212
-		$this->_hrefFunction = $_hrefFunction;
212
+		$this->_hrefFunction=$_hrefFunction;
213 213
 		return $this;
214 214
 	}
215 215
 
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlAccordion.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 		$this->setClass("panel-group");
20 20
 		$this->setRole("tablist");
21 21
 		$this->setProperty("aria-multiselectable", "true");
22
-		$this->content=array ();
22
+		$this->content=array();
23 23
 	}
24 24
 
25 25
 	public function addPanel($title, $content) {
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 	 * @param string $action a Phalcon action
47 47
 	 * @param $params The parameters to pass to the view
48 48
 	 */
49
-	public function renderContentPanel($title,$initialController,$view, $controller, $action, $params=NULL) {
50
-		return $this->addPanel($title, $initialController->jquery->renderContent($view, $controller, $action,$params));
49
+	public function renderContentPanel($title, $initialController, $view, $controller, $action, $params=NULL) {
50
+		return $this->addPanel($title, $initialController->jquery->renderContent($view, $controller, $action, $params));
51 51
 	}
52 52
 
53 53
 	/**
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
 	 * @param string $controller a Phalcon controller
58 58
 	 * @param string $action a Phalcon action
59 59
 	 */
60
-	public function forwardPanel($title,$initialController,$controller,$action){
60
+	public function forwardPanel($title, $initialController, $controller, $action) {
61 61
 		return $this->addPanel($title, $initialController->jquery->forward($initialController, $controller, $action));
62 62
 	}
63 63
 
64 64
 	public function run(JsUtils $js) {
65
-		foreach ( $this->content as $content ) {
65
+		foreach ($this->content as $content) {
66 66
 			$content->run($js);
67 67
 		}
68 68
 	}
Please login to merge, or discard this patch.
Ajax/php/phalcon/JsUtils.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 use Phalcon\Mvc\View;
8 8
 use Phalcon\Mvc\Controller;
9 9
 
10
-class JsUtils extends \Ajax\JsUtils implements InjectionAwareInterface{
10
+class JsUtils extends \Ajax\JsUtils implements InjectionAwareInterface {
11 11
 	protected $_di;
12 12
 	public function setDi(DiInterface $di) {
13 13
 		$this->_di=$di;
@@ -18,49 +18,49 @@  discard block
 block discarded – undo
18 18
 		return $this->_di;
19 19
 	}
20 20
 
21
-	public function getUrl($url){
21
+	public function getUrl($url) {
22 22
 		return $this->_di->get("url")->get($url);
23 23
 	}
24 24
 
25
-	public function addViewElement($identifier,$content,$view){
25
+	public function addViewElement($identifier, $content, $view) {
26 26
 		$controls=$view->getVar("q");
27
-		if (isset($controls) === false) {
28
-			$controls=array ();
27
+		if (isset($controls)===false) {
28
+			$controls=array();
29 29
 		}
30 30
 		$controls[$identifier]=$content;
31 31
 		$view->setVar("q", $controls);
32 32
 	}
33 33
 
34
-	public function createScriptVariable($view,$view_var, $output){
35
-		$view->setVar($view_var,$output);
34
+	public function createScriptVariable($view, $view_var, $output) {
35
+		$view->setVar($view_var, $output);
36 36
 	}
37 37
 
38
-	public function forward($initialController,$controller,$action){
39
-		$dispatcher = $initialController->dispatcher;
38
+	public function forward($initialController, $controller, $action) {
39
+		$dispatcher=$initialController->dispatcher;
40 40
 		$dispatcher->setControllerName($controller);
41 41
 		$dispatcher->setActionName($action);
42 42
 		$dispatcher->dispatch();
43
-		$template=$initialController->view->getRender($dispatcher->getControllerName(), $dispatcher->getActionName(),$dispatcher->getParams(), function ($view) {
43
+		$template=$initialController->view->getRender($dispatcher->getControllerName(), $dispatcher->getActionName(), $dispatcher->getParams(), function($view) {
44 44
 			$view->setRenderLevel(View::LEVEL_ACTION_VIEW);
45 45
 		});
46 46
 		return $template;
47 47
 	}
48 48
 
49 49
 	public function renderContent($view, $controller, $action, $params=NULL) {
50
-		$template=$view->getRender($controller, $action, $params, function ($view) {
50
+		$template=$view->getRender($controller, $action, $params, function($view) {
51 51
 			$view->setRenderLevel(View::LEVEL_ACTION_VIEW);
52 52
 		});
53 53
 		return $template;
54 54
 	}
55 55
 
56
-	public function fromDispatcher($dispatcher){
56
+	public function fromDispatcher($dispatcher) {
57 57
 		$params=$dispatcher->getParams();
58 58
 		$action=$dispatcher->getActionName();
59 59
 		$items=array($dispatcher->getControllerName());
60
-		if(\sizeof($params)>0 || \strtolower($action)!="index" ){
60
+		if (\sizeof($params)>0 || \strtolower($action)!="index") {
61 61
 			$items[]=$action;
62
-			foreach ($params as $p){
63
-				if(\is_object($p)===false)
62
+			foreach ($params as $p) {
63
+				if (\is_object($p)===false)
64 64
 					$items[]=$p;
65 65
 			}
66 66
 		}
Please login to merge, or discard this patch.
Ajax/php/laravel/JsUtils.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -3,49 +3,49 @@
 block discarded – undo
3 3
 namespace Ajax\php\laravel;
4 4
 
5 5
 
6
-class JsUtils extends \Ajax\JsUtils{
7
-	public function getUrl($url){
6
+class JsUtils extends \Ajax\JsUtils {
7
+	public function getUrl($url) {
8 8
 		return $url;
9 9
 	}
10
-	public function addViewElement($identifier,$content,$view){
10
+	public function addViewElement($identifier, $content, $view) {
11 11
 		$controls=$view->__get("q");
12
-		if (isset($controls) === false) {
13
-			$controls=array ();
12
+		if (isset($controls)===false) {
13
+			$controls=array();
14 14
 		}
15 15
 		$controls[$identifier]=$content;
16 16
 		$view->__set("q", $controls);
17 17
 	}
18 18
 
19
-	public function createScriptVariable($view,$view_var, $output){
20
-		$view->__set($view_var,$output);
19
+	public function createScriptVariable($view, $view_var, $output) {
20
+		$view->__set($view_var, $output);
21 21
 	}
22 22
 
23
-	public function forward($initialController,$controller,$action){
24
-		$dispatcher = $initialController->dispatcher;
23
+	public function forward($initialController, $controller, $action) {
24
+		$dispatcher=$initialController->dispatcher;
25 25
 		$dispatcher->setControllerName($controller);
26 26
 		$dispatcher->setActionName($action);
27 27
 		$dispatcher->dispatch();
28
-		$template=$initialController->view->getRender($dispatcher->getControllerName(), $dispatcher->getActionName(),$dispatcher->getParams(), function ($view) {
28
+		$template=$initialController->view->getRender($dispatcher->getControllerName(), $dispatcher->getActionName(), $dispatcher->getParams(), function($view) {
29 29
 			$view->setRenderLevel(View::LEVEL_ACTION_VIEW);
30 30
 		});
31 31
 		return $template;
32 32
 	}
33 33
 
34 34
 	public function renderContent($view, $controller, $action, $params=NULL) {
35
-		$template=$view->getRender($controller, $action, $params, function ($view) {
35
+		$template=$view->getRender($controller, $action, $params, function($view) {
36 36
 			$view->setRenderLevel(View::LEVEL_ACTION_VIEW);
37 37
 		});
38 38
 		return $template;
39 39
 	}
40 40
 
41
-	public function fromDispatcher($dispatcher){
41
+	public function fromDispatcher($dispatcher) {
42 42
 		$params=$dispatcher->getParams();
43 43
 		$action=$dispatcher->getActionName();
44 44
 		$items=array($dispatcher->getControllerName());
45
-		if(\sizeof($params)>0 || \strtolower($action)!="index" ){
45
+		if (\sizeof($params)>0 || \strtolower($action)!="index") {
46 46
 			$items[]=$action;
47
-			foreach ($params as $p){
48
-				if(\is_object($p)===false)
47
+			foreach ($params as $p) {
48
+				if (\is_object($p)===false)
49 49
 					$items[]=$p;
50 50
 			}
51 51
 		}
Please login to merge, or discard this patch.
Ajax/Jquery.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -17,21 +17,21 @@  discard block
 block discarded – undo
17 17
  * jQuery Class
18 18
  */
19 19
 class Jquery {
20
-	use JqueryEventsTrait,JqueryAjaxTrait,JqueryActionsTrait;
20
+	use JqueryEventsTrait, JqueryAjaxTrait, JqueryActionsTrait;
21 21
 	protected $_ui;
22 22
 	protected $_bootstrap;
23 23
 	protected $_semantic;
24 24
 	protected $libraryFile;
25 25
 	protected $_javascript_folder='js';
26
-	protected $jquery_code_for_load=array ();
27
-	protected $jquery_code_for_compile=array ();
26
+	protected $jquery_code_for_load=array();
27
+	protected $jquery_code_for_compile=array();
28 28
 	protected $jquery_corner_active=FALSE;
29 29
 	protected $jquery_table_sorter_active=FALSE;
30 30
 	protected $jquery_table_sorter_pager_active=FALSE;
31 31
 	protected $jsUtils;
32 32
 
33
-	protected $jquery_events=array (
34
-			"bind","blur","change","click","dblclick","delegate","die","error","focus","focusin","focusout","hover","keydown","keypress","keyup","live","load","mousedown","mousseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","off","on","one","ready","resize","scroll","select","submit","toggle","trigger","triggerHandler","undind","undelegate","unload"
33
+	protected $jquery_events=array(
34
+			"bind", "blur", "change", "click", "dblclick", "delegate", "die", "error", "focus", "focusin", "focusout", "hover", "keydown", "keypress", "keyup", "live", "load", "mousedown", "mousseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "off", "on", "one", "ready", "resize", "scroll", "select", "submit", "toggle", "trigger", "triggerHandler", "undind", "undelegate", "unload"
35 35
 	);
36 36
 
37 37
 	public function ui($ui=NULL) {
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
 		return $this->_semantic;
56 56
 	}
57 57
 
58
-	public function __construct($params,$jsUtils) {
58
+	public function __construct($params, $jsUtils) {
59 59
 		$this->params=array();
60
-		foreach ( $params as $key => $val ) {
60
+		foreach ($params as $key => $val) {
61 61
 				$this->params[$key]=$params[$key];
62 62
 		}
63 63
 		$this->jsUtils=$jsUtils;
@@ -125,12 +125,12 @@  discard block
 block discarded – undo
125 125
 	 */
126 126
 	public function _output($array_js='') {
127 127
 		if (!is_array($array_js)) {
128
-			$array_js=array (
128
+			$array_js=array(
129 129
 					$array_js
130 130
 			);
131 131
 		}
132 132
 
133
-		foreach ( $array_js as $js ) {
133
+		foreach ($array_js as $js) {
134 134
 			$this->jquery_code_for_compile[]="\t$js\n";
135 135
 		}
136 136
 	}
@@ -142,12 +142,12 @@  discard block
 block discarded – undo
142 142
 	 * @param string $param
143 143
 	 * @param boolean $immediatly delayed if false
144 144
 	 */
145
-	public function _genericCallValue($jQueryCall,$element='this', $param="", $immediatly=false) {
145
+	public function _genericCallValue($jQueryCall, $element='this', $param="", $immediatly=false) {
146 146
 		$element=$this->_prep_element($element);
147 147
 		if (isset($param)) {
148 148
 			$param=$this->_prep_value($param);
149 149
 			$str="$({$element}).{$jQueryCall}({$param});";
150
-		} else
150
+		}else
151 151
 			$str="$({$element}).{$jQueryCall}();";
152 152
 			if ($immediatly)
153 153
 				$this->jquery_code_for_compile[]=$str;
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	 * @param boolean $immediatly delayed if false
162 162
 	 * @return string
163 163
 	 */
164
-	public function _genericCallElement($jQueryCall,$to='this', $element, $immediatly=false) {
164
+	public function _genericCallElement($jQueryCall, $to='this', $element, $immediatly=false) {
165 165
 		$to=$this->_prep_element($to);
166 166
 		$element=$this->_prep_element($element);
167 167
 		$str="$({$to}).{$jQueryCall}({$element});";
@@ -179,12 +179,12 @@  discard block
 block discarded – undo
179 179
 	 */
180 180
 	public function sortable($element, $options=array()) {
181 181
 		if (count($options)>0) {
182
-			$sort_options=array ();
183
-			foreach ( $options as $k => $v ) {
182
+			$sort_options=array();
183
+			foreach ($options as $k => $v) {
184 184
 				$sort_options[]="\n\t\t".$k.': '.$v."";
185 185
 			}
186 186
 			$sort_options=implode(",", $sort_options);
187
-		} else {
187
+		}else {
188 188
 			$sort_options='';
189 189
 		}
190 190
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	 * @param boolean $stopPropagation Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.
213 213
 	 * @return string
214 214
 	 */
215
-	public function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false,$immediatly=true) {
215
+	public function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false, $immediatly=true) {
216 216
 		if (is_array($js)) {
217 217
 			$js=implode("\n\t\t", $js);
218 218
 		}
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 			$event="\n\t$(".$this->_prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n";
227 227
 		else
228 228
 			$event="\n\t$(".$this->_prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n";
229
-		if($immediatly)
229
+		if ($immediatly)
230 230
 			$this->jquery_code_for_compile[]=$event;
231 231
 		return $event;
232 232
 	}
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 
267 267
 		// External references
268 268
 		$external_scripts=implode('', $this->jquery_code_for_load);
269
-		extract(array (
269
+		extract(array(
270 270
 				'library_src' => $external_scripts
271 271
 		));
272 272
 
@@ -281,13 +281,13 @@  discard block
 block discarded – undo
281 281
 		$script.='});';
282 282
 
283 283
 		$this->jquery_code_for_compile=array();
284
-		if($this->params["debug"]==false){
284
+		if ($this->params["debug"]==false) {
285 285
 			$script=$this->minify($script);
286 286
 		}
287 287
 		$output=($script_tags===FALSE) ? $script : $this->inline($script);
288 288
 
289 289
 		if ($view!=NULL)
290
-			$this->jsUtils->createScriptVariable($view,$view_var, $output);
290
+			$this->jsUtils->createScriptVariable($view, $view_var, $output);
291 291
 		return $output;
292 292
 	}
293 293
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 	 * @return void
302 302
 	 */
303 303
 	public function _clear_compile() {
304
-		$this->jquery_code_for_compile=array ();
304
+		$this->jquery_code_for_compile=array();
305 305
 	}
306 306
 
307 307
 	/**
@@ -310,12 +310,12 @@  discard block
 block discarded – undo
310 310
 	 */
311 311
 	public function _document_ready($js) {
312 312
 		if (!is_array($js)) {
313
-			$js=array (
313
+			$js=array(
314 314
 					$js
315 315
 			);
316 316
 		}
317 317
 
318
-		foreach ( $js as $script ) {
318
+		foreach ($js as $script) {
319 319
 			$this->jquery_code_for_compile[]=$script;
320 320
 		}
321 321
 	}
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 	 * @return string
330 330
 	 */
331 331
 	public function _prep_element($element) {
332
-		if (strrpos($element, 'this')===false&&strrpos($element, 'event')===false&&strrpos($element, 'self')===false) {
332
+		if (strrpos($element, 'this')===false && strrpos($element, 'event')===false && strrpos($element, 'self')===false) {
333 333
 			$element='"'.addslashes($element).'"';
334 334
 		}
335 335
 		return $element;
@@ -347,14 +347,14 @@  discard block
 block discarded – undo
347 347
 		if (is_array($value)) {
348 348
 			$value=implode(",", $value);
349 349
 		}
350
-		if (strrpos($value, 'this')===false&&strrpos($value, 'event')===false&&strrpos($value, 'self')===false) {
350
+		if (strrpos($value, 'this')===false && strrpos($value, 'event')===false && strrpos($value, 'self')===false) {
351 351
 			$value='"'.$value.'"';
352 352
 		}
353 353
 		return $value;
354 354
 	}
355 355
 
356 356
 	private function minify($input) {
357
-	if(trim($input) === "") return $input;
357
+	if (trim($input)==="") return $input;
358 358
 	return preg_replace(
359 359
 			array(
360 360
 					// Remove comment(s)
Please login to merge, or discard this patch.