Passed
Push — master ( 525a36...ddab02 )
by Jean-Christophe
13:28
created
Ajax/common/components/SimpleExtComponent.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
 use Ajax\common\JsCode;
6 6
 
7 7
 class SimpleExtComponent extends SimpleComponent {
8
-	protected $events=array ();
9
-	protected $jsCodes=array ();
8
+	protected $events=array();
9
+	protected $jsCodes=array();
10 10
 
11 11
 	public function addEvent($event, $jsCode) {
12 12
 		$this->events [$event]=$jsCode;
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 		return $this->compileJQueryCode();
20 20
 	}
21 21
 	
22
-	protected function compileJsCodes(){
23
-		foreach ( $this->jsCodes as $jsCode ) {
24
-			$this->jquery_code_for_compile []=$jsCode->compile(array (
22
+	protected function compileJsCodes() {
23
+		foreach ($this->jsCodes as $jsCode) {
24
+			$this->jquery_code_for_compile []=$jsCode->compile(array(
25 25
 				"identifier" => $this->attachTo
26 26
 			));
27 27
 		}
Please login to merge, or discard this patch.
Ajax/semantic/components/Toast.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,38 +19,38 @@
 block discarded – undo
19 19
 		$this->uiName='toast';
20 20
 	}
21 21
 
22
-	public function close(){
22
+	public function close() {
23 23
 		return $this->addBehavior('close');
24 24
 	}
25 25
 
26
-	public function setClass($value){
26
+	public function setClass($value) {
27 27
 		$this->params['class']=$value;
28 28
 	}
29 29
 	
30
-	public function setCloseIcon(){
30
+	public function setCloseIcon() {
31 31
 		$this->params['closeIcon']=true;
32 32
 	}
33 33
 	
34
-	public function setShowIcon($value=false){
34
+	public function setShowIcon($value=false) {
35 35
 		$this->params['showIcon']=$value;
36 36
 	}
37 37
 	
38
-	public function setCloseOnClick($value){
38
+	public function setCloseOnClick($value) {
39 39
 		$this->params['closeOnClick']=$value;
40 40
 	}
41
-	public function setTitle($title){
41
+	public function setTitle($title) {
42 42
 		$this->params['title']=$title;
43 43
 	}
44 44
 	
45
-	public function setMessage($message){
45
+	public function setMessage($message) {
46 46
 		$this->params['message']=$message;
47 47
 	}
48 48
 	
49
-	public function setDisplayTime($time){
49
+	public function setDisplayTime($time) {
50 50
 		$this->params['displayTime']=$time;
51 51
 	}
52 52
 	
53
-	public function setShowProgress($value='top'){
53
+	public function setShowProgress($value='top') {
54 54
 		$this->params['showProgress']=$value;
55 55
 	}
56 56
 
Please login to merge, or discard this patch.
Ajax/semantic/components/SimpleSemExtComponent.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
 		return $this;
18 18
 	}
19 19
 	
20
-	protected function generateParamParts(){
20
+	protected function generateParamParts() {
21 21
 		$results=[];
22
-		foreach ($this->paramParts as $paramPart){
22
+		foreach ($this->paramParts as $paramPart) {
23 23
 			$results[]="{$this->uiName}(".\implode(",", $paramPart).")";
24 24
 		}
25 25
 		return \implode(".", $results);
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 
28 28
 	public function getScript() {
29 29
 		$allParams=$this->params;
30
-		$this->jquery_code_for_compile=array ();
30
+		$this->jquery_code_for_compile=array();
31 31
 		$this->compileJsCodes();
32 32
 		$paramParts="";
33
-		if(\sizeof($this->paramParts)>0){
33
+		if (\sizeof($this->paramParts)>0) {
34 34
 			$paramParts=".".$this->generateParamParts();
35 35
 		}
36 36
 		$this->jquery_code_for_compile []="$( \"".$this->attachTo."\" ).{$this->uiName}(".$this->getParamsAsJSON($allParams).")".$paramParts.";";
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
 		return $this;
44 44
 	}
45 45
 
46
-	public function addComponentEvent($event,$jsCode){
47
-		$jsCode=\str_ireplace("\"","%quote%", $jsCode);
46
+	public function addComponentEvent($event, $jsCode) {
47
+		$jsCode=\str_ireplace("\"", "%quote%", $jsCode);
48 48
 		return $this->setParam($event, "%function(){".$jsCode."}%");
49 49
 	}
50 50
 	
51
-	public function setJs(JsUtils $js){
51
+	public function setJs(JsUtils $js) {
52 52
 		$this->js=$js;
53 53
 		$js->semantic()->addComponent($this, $this->attachTo, $this->params);
54 54
 	}
Please login to merge, or discard this patch.
Ajax/semantic/components/Slider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,33 +20,33 @@
 block discarded – undo
20 20
 		$this->uiName='slider';
21 21
 	}
22 22
 
23
-	public function close(){
23
+	public function close() {
24 24
 		return $this->addBehavior('close');
25 25
 	}
26 26
 
27
-	public function setInterpretLabel($labels){
27
+	public function setInterpretLabel($labels) {
28 28
 		$var="window.document._slider_labels['".JString::cleanIdentifier($this->attachTo)."']";
29 29
 		$this->addCode('window.document._slider_labels=window.document._slider_labels||[];'.$var.'='.\json_encode($labels).';');
30 30
 		$this->params['interpretLabel']='%function(value) {return '.$var.'[value];}%';
31 31
 	}
32 32
 	
33
-	public function setMin($min){
33
+	public function setMin($min) {
34 34
 		$this->params['min']=$min;
35 35
 	}
36 36
 	
37
-	public function setMax($max){
37
+	public function setMax($max) {
38 38
 		$this->params['max']=$max;
39 39
 	}
40 40
 	
41
-	public function setStart($start){
41
+	public function setStart($start) {
42 42
 		$this->params['start']=$start;
43 43
 	}
44 44
 	
45
-	public function setEnd($end){
45
+	public function setEnd($end) {
46 46
 		$this->params['end']=$end;
47 47
 	}
48 48
 	
49
-	public function setStep($step){
49
+	public function setStep($step) {
50 50
 		$this->params['step']=$step;
51 51
 	}
52 52
 
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticComponentsTrait.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 	 * @param string|array $params
135 135
 	 * @return Modal
136 136
 	 */
137
-	public function modal($attachTo=NULL, $params=NULL,$paramsParts=NULL) {
138
-		$result= $this->addComponent(new Modal($this->js), $attachTo, $params);
137
+	public function modal($attachTo=NULL, $params=NULL, $paramsParts=NULL) {
138
+		$result=$this->addComponent(new Modal($this->js), $attachTo, $params);
139 139
 		$result->setParamParts($paramsParts);
140 140
 		return $result;
141 141
 	}
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 * @return Tab
147 147
 	 */
148 148
 	public function tab($attachTo=NULL, $params=NULL) {
149
-		$result= $this->addComponent(new Tab($this->js), $attachTo, $params);
149
+		$result=$this->addComponent(new Tab($this->js), $attachTo, $params);
150 150
 		return $result;
151 151
 	}
152 152
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 * @return Shape
157 157
 	 */
158 158
 	public function shape($attachTo=NULL, $params=NULL) {
159
-		$result= $this->addComponent(new Shape($this->js), $attachTo, $params);
159
+		$result=$this->addComponent(new Shape($this->js), $attachTo, $params);
160 160
 		return $result;
161 161
 	}
162 162
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	 * @return Form
167 167
 	 */
168 168
 	public function form($attachTo=NULL, $params=NULL) {
169
-		$result= $this->addComponent(new Form($this->js), $attachTo, $params);
169
+		$result=$this->addComponent(new Form($this->js), $attachTo, $params);
170 170
 		return $result;
171 171
 	}
172 172
 	
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 * @return Toast
177 177
 	 */
178 178
 	public function toast($attachTo=NULL, $params=NULL) {
179
-		$result= $this->addComponent(new Toast($this->js), $attachTo, $params);
179
+		$result=$this->addComponent(new Toast($this->js), $attachTo, $params);
180 180
 		return $result;
181 181
 	}
182 182
 	
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	 * @return Slider
187 187
 	 */
188 188
 	public function slider($attachTo=NULL, $params=NULL) {
189
-		$result= $this->addComponent(new Slider($this->js), $attachTo, $params);
189
+		$result=$this->addComponent(new Slider($this->js), $attachTo, $params);
190 190
 		return $result;
191 191
 	}
192 192
 
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlSlider.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -17,21 +17,21 @@  discard block
 block discarded – undo
17 17
 	
18 18
 	protected $_paramParts=array();
19 19
 	public function __construct($identifier, $content='') {
20
-		parent::__construct($identifier, 'div','ui slider');
20
+		parent::__construct($identifier, 'div', 'ui slider');
21 21
 	}
22 22
 	
23
-	public function setLabeled(){
23
+	public function setLabeled() {
24 24
 		$this->addClass('labeled');
25 25
 	}
26 26
 	
27
-	public function setTicked(){
28
-		if(!$this->propertyContains('class', 'labeled')){
27
+	public function setTicked() {
28
+		if (!$this->propertyContains('class', 'labeled')) {
29 29
 			$this->addClass('labeled');
30 30
 		}
31 31
 		$this->addClass('ticked');
32 32
 	}
33 33
 	
34
-	public function setLabels($labels){
34
+	public function setLabels($labels) {
35 35
 		$this->_params['interpretLabel']=$labels;
36 36
 	}
37 37
 	
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 	 * $values is an associative array with keys (min,max,start,end,step,smooth)
40 40
 	 * @param array $values
41 41
 	 */
42
-	public function asRange($values=NULL){
42
+	public function asRange($values=NULL) {
43 43
 		$this->addClass('range');
44
-		if(\is_array($values)){
45
-			$this->_params=\array_merge($this->_params,$values);
44
+		if (\is_array($values)) {
45
+			$this->_params=\array_merge($this->_params, $values);
46 46
 		}
47 47
 	}
48 48
 	
@@ -50,20 +50,20 @@  discard block
 block discarded – undo
50 50
 	 * $values is an associative array with keys (min,max,start,step,smooth)
51 51
 	 * @param array $values
52 52
 	 */
53
-	public function setValues($values=NULL){
54
-		if(\is_array($values)){
55
-			$this->_params=\array_merge($this->_params,$values);
53
+	public function setValues($values=NULL) {
54
+		if (\is_array($values)) {
55
+			$this->_params=\array_merge($this->_params, $values);
56 56
 		}
57 57
 	}
58 58
 	
59
-	public function setReversed($value=true){
60
-		if($value){
59
+	public function setReversed($value=true) {
60
+		if ($value) {
61 61
 			$this->addClass('reversed');
62 62
 		}
63 63
 	}
64 64
 	
65
-	public function setVertical($value=true){
66
-		if($value){
65
+	public function setVertical($value=true) {
66
+		if ($value) {
67 67
 			$this->addClass('vertical');
68 68
 		}
69 69
 	}
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 	 * @see BaseHtml::run()
74 74
 	 */
75 75
 	public function run(JsUtils $js) {
76
-		if(isset($this->_bsComponent)===false){
77
-			$this->_bsComponent=$js->semantic()->slider('#'.$this->identifier,$this->_params,$this->_paramParts);
76
+		if (isset($this->_bsComponent)===false) {
77
+			$this->_bsComponent=$js->semantic()->slider('#'.$this->identifier, $this->_params, $this->_paramParts);
78 78
 		}
79 79
 		$this->addEventsOnRun($js);
80 80
 		return $this->_bsComponent;
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlToast.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
 	protected $_paramParts=array();
19 19
 	
20 20
 	public function __construct($identifier, $content='') {
21
-		parent::__construct($identifier, 'div','ui toast');
22
-		if(isset($content)){
21
+		parent::__construct($identifier, 'div', 'ui toast');
22
+		if (isset($content)) {
23 23
 			$this->setContent($content);
24 24
 		}
25 25
 	}
26 26
 	
27 27
 	public function setContent($value) {
28
-		$this->content['content']=new HtmlSemDoubleElement('content-' . $this->identifier, 'div', 'content', $value);
28
+		$this->content['content']=new HtmlSemDoubleElement('content-'.$this->identifier, 'div', 'content', $value);
29 29
 		return $this;
30 30
 	}
31 31
 	
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
37 37
 	 */
38 38
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
39
-		$this->content=JArray::sortAssociative($this->content, ['content','actions' ]);
39
+		$this->content=JArray::sortAssociative($this->content, ['content', 'actions']);
40 40
 		return parent::compile($js, $view);
41 41
 	}
42 42
 	
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 	 * @see BaseHtml::run()
46 46
 	 */
47 47
 	public function run(JsUtils $js) {
48
-		if(isset($this->_bsComponent)===false){
49
-			$this->_bsComponent=$js->semantic()->toast('#'.$this->identifier,$this->_params,$this->_paramParts);
48
+		if (isset($this->_bsComponent)===false) {
49
+			$this->_bsComponent=$js->semantic()->toast('#'.$this->identifier, $this->_params, $this->_paramParts);
50 50
 		}
51 51
 		$this->addEventsOnRun($js);
52 52
 		return $this->_bsComponent;
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlEmoji.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,22 +53,22 @@
 block discarded – undo
53 53
 	 * @param string $target
54 54
 	 * @return HtmlEmoji
55 55
 	 */
56
-	public function asLink($href=NULL,$target=NULL) {
56
+	public function asLink($href=NULL, $target=NULL) {
57 57
 		if (isset($href)) {
58 58
 			$_target="";
59
-			if(isset($target))
59
+			if (isset($target))
60 60
 				$_target="target='{$target}'";
61
-			$this->wrap("<a href='" . $href . "' {$_target}>", "</a>");
61
+			$this->wrap("<a href='".$href."' {$_target}>", "</a>");
62 62
 		}
63 63
 		return $this->addToProperty("class", "link");
64 64
 	}
65 65
 
66 66
 	public function addLabel($label, $before=false, $emoji='slight_smile') {
67
-		if($before)
67
+		if ($before)
68 68
 			$this->wrap($label);
69 69
 		else
70 70
 			$this->wrap("", $label);
71
-		if(isset($emoji))
71
+		if (isset($emoji))
72 72
 			$this->setEmoji($emoji);
73 73
 		return $this;
74 74
 	}
Please login to merge, or discard this patch.
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -56,20 +56,23 @@
 block discarded – undo
56 56
 	public function asLink($href=NULL,$target=NULL) {
57 57
 		if (isset($href)) {
58 58
 			$_target="";
59
-			if(isset($target))
60
-				$_target="target='{$target}'";
59
+			if(isset($target)) {
60
+							$_target="target='{$target}'";
61
+			}
61 62
 			$this->wrap("<a href='" . $href . "' {$_target}>", "</a>");
62 63
 		}
63 64
 		return $this->addToProperty("class", "link");
64 65
 	}
65 66
 
66 67
 	public function addLabel($label, $before=false, $emoji='slight_smile') {
67
-		if($before)
68
-			$this->wrap($label);
69
-		else
70
-			$this->wrap("", $label);
71
-		if(isset($emoji))
72
-			$this->setEmoji($emoji);
68
+		if($before) {
69
+					$this->wrap($label);
70
+		} else {
71
+					$this->wrap("", $label);
72
+		}
73
+		if(isset($emoji)) {
74
+					$this->setEmoji($emoji);
75
+		}
73 76
 		return $this;
74 77
 	}
75 78
 
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/emojis/People.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 abstract class People extends BaseEnum {
8
-	const ADULT='adult',ALIEN='alien',ANGEL='angel',ANGRY='angry',ANGUISHED='anguished',ASTONISHED='astonished',ATHLETIC_SHOE='athletic_shoe',BABY='baby',BALD='bald',BALLET_SHOES='ballet_shoes';
8
+	const ADULT='adult', ALIEN='alien', ANGEL='angel', ANGRY='angry', ANGUISHED='anguished', ASTONISHED='astonished', ATHLETIC_SHOE='athletic_shoe', BABY='baby', BALD='bald', BALLET_SHOES='ballet_shoes';
9 9
 }
Please login to merge, or discard this patch.