Passed
Push — master ( 525a36...ddab02 )
by Jean-Christophe
13:28
created
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 1 patch
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.
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.
Ajax/semantic/html/base/constants/emojis/Nature.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,6 +5,6 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 abstract class Nature extends BaseEnum {
8
-	const ANT='ant',BABY_CHICK='baby_chick',BADGER='badger',BANBOO='banboo',BAT='bat',BEAR='bear',BEE='bee',BEETLE='beetle',BIRD='bird',BLOSSOM='blossom',BLOWFISH='blowfish',BOAR='boar',BOOM='boom',BOUQUET='bouquet',BUG='bug',
9
-	BUTTERFLY='butterfly',CACTUS='cactus',CAMEL='camel',CAT2='cat2',CAT='cat',CHERRY_BLOSSOM='cherry_blossom',CHICKEN='chicken',CHIPMUNK='chipmunk',CHRISTMAS_TREE='christmas_tree',CLOUD='cloud';
8
+	const ANT='ant', BABY_CHICK='baby_chick', BADGER='badger', BANBOO='banboo', BAT='bat', BEAR='bear', BEE='bee', BEETLE='beetle', BIRD='bird', BLOSSOM='blossom', BLOWFISH='blowfish', BOAR='boar', BOOM='boom', BOUQUET='bouquet', BUG='bug',
9
+	BUTTERFLY='butterfly', CACTUS='cactus', CAMEL='camel', CAT2='cat2', CAT='cat', CHERRY_BLOSSOM='cherry_blossom', CHICKEN='chicken', CHIPMUNK='chipmunk', CHRISTMAS_TREE='christmas_tree', CLOUD='cloud';
10 10
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormFields.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		}
36 36
 		if (isset($label))
37 37
 			$this->setLabel($label);
38
-		foreach ( $fields as $field ) {
38
+		foreach ($fields as $field) {
39 39
 			$this->addItem($field);
40 40
 		}
41 41
 		return $this;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 	public function addItem($item) {
59 59
 		$item=parent::addItem($item);
60
-		if($item instanceof HtmlFormField)
60
+		if ($item instanceof HtmlFormField)
61 61
 			$item->setContainer($this);
62 62
 		return $item;
63 63
 	}
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	/**
66 66
 	 * @return HtmlFormField
67 67
 	 */
68
-	public function getItem($index){
68
+	public function getItem($index) {
69 69
 		return parent::getItem($index);
70 70
 	}
71 71
 
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
 	}
105 105
 
106 106
 
107
-	public static function radios($identifier,$name, $items=array(), $label=NULL, $value=null, $type=NULL) {
108
-		$fields=array ();
107
+	public static function radios($identifier, $name, $items=array(), $label=NULL, $value=null, $type=NULL) {
108
+		$fields=array();
109 109
 		$i=0;
110
-		foreach ( $items as $val => $caption ) {
110
+		foreach ($items as $val => $caption) {
111 111
 			$itemO=new HtmlFormRadio($name."-".$i++, $name, $caption, $val, $type);
112 112
 			if ($val===$value) {
113 113
 				$itemO->getDataField()->setProperty("checked", "");
@@ -115,19 +115,19 @@  discard block
 block discarded – undo
115 115
 			$fields[]=$itemO;
116 116
 		}
117 117
 		$radios=new HtmlFormFields($identifier, $fields);
118
-		if (isset($label)){
118
+		if (isset($label)) {
119 119
 			$lbl=$radios->setLabel($label);
120
-			if($lbl instanceof HtmlSemDoubleElement){
120
+			if ($lbl instanceof HtmlSemDoubleElement) {
121 121
 				$lbl->setProperty("for", $name);
122 122
 			}
123 123
 		}
124 124
 		return $radios;
125 125
 	}
126 126
 
127
-	public static function checkeds($identifier,$name, $items=array(), $label=NULL, $values=array(), $type=NULL) {
128
-		$fields=array ();
127
+	public static function checkeds($identifier, $name, $items=array(), $label=NULL, $values=array(), $type=NULL) {
128
+		$fields=array();
129 129
 		$i=0;
130
-		foreach ( $items as $val => $caption ) {
130
+		foreach ($items as $val => $caption) {
131 131
 			$itemO=new HtmlFormCheckbox($name."-".$i++, $caption, $val, $type);
132 132
 			$itemO->setName($name);
133 133
 			if (\array_search($val, $values)!==false) {
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		return $this;
147 147
 	}
148 148
 	
149
-	public function run(JsUtils $js){
149
+	public function run(JsUtils $js) {
150 150
 		return parent::run($js);
151 151
 		//return $result->setItemSelector("[data-value]");
152 152
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/view/HtmlViewGroups.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 abstract class HtmlViewGroups extends HtmlSemCollection {
11 11
 
12
-	public function __construct($identifier, $uiClass,$items=array()) {
12
+	public function __construct($identifier, $uiClass, $items=array()) {
13 13
 		parent::__construct($identifier, "div", $uiClass);
14 14
 		$this->addItems($items);
15 15
 	}
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 * @param int $wide
42 42
 	 */
43 43
 	public function setWide($wide) {
44
-		$wide=Wide::getConstants()["W" . $wide];
44
+		$wide=Wide::getConstants()["W".$wide];
45 45
 		return $this->addToPropertyCtrl("class", $wide, Wide::getConstants());
46 46
 	}
47 47
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	/**
51 51
 	 * @return HtmlViewGroups
52 52
 	 */
53
-	public function getItem($index){
53
+	public function getItem($index) {
54 54
 		return parent::getItem($index);
55 55
 	}
56 56
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		$item=$this->getItem($itemIndex);
59 59
 		if (isset($item)) {
60 60
 			$content=$item->getContent();
61
-			if(isset($content[$contentIndex]))
61
+			if (isset($content[$contentIndex]))
62 62
 				return $content[$contentIndex];
63 63
 			return $content;
64 64
 		}
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		return $this->addItem($function($object));
69 69
 	}
70 70
 
71
-	public function run(JsUtils $js){
71
+	public function run(JsUtils $js) {
72 72
 		$result=parent::run($js);
73 73
 		return $result->setItemSelector(".item");
74 74
 	}
Please login to merge, or discard this patch.