Passed
Push — master ( 906736...695c9a )
by Jean-Christophe
03:24
created
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/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
 		return $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
 		return $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
 		return $this;
37 37
 	}
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 	 * $values is an associative array with keys (min,max,start,end,step,smooth)
41 41
 	 * @param array $values
42 42
 	 */
43
-	public function asRange($values=NULL){
43
+	public function asRange($values=NULL) {
44 44
 		$this->addClass('range');
45
-		if(\is_array($values)){
46
-			$this->_params=\array_merge($this->_params,$values);
45
+		if (\is_array($values)) {
46
+			$this->_params=\array_merge($this->_params, $values);
47 47
 		}
48 48
 		return $this;
49 49
 	}
@@ -52,22 +52,22 @@  discard block
 block discarded – undo
52 52
 	 * $values is an associative array with keys (min,max,start,step,smooth)
53 53
 	 * @param array $values
54 54
 	 */
55
-	public function setValues($values=NULL){
56
-		if(\is_array($values)){
57
-			$this->_params=\array_merge($this->_params,$values);
55
+	public function setValues($values=NULL) {
56
+		if (\is_array($values)) {
57
+			$this->_params=\array_merge($this->_params, $values);
58 58
 		}
59 59
 		return $this;
60 60
 	}
61 61
 	
62
-	public function setReversed($value=true){
63
-		if($value){
62
+	public function setReversed($value=true) {
63
+		if ($value) {
64 64
 			$this->addClass('reversed');
65 65
 		}
66 66
 		return $this;
67 67
 	}
68 68
 	
69
-	public function setVertical($value=true){
70
-		if($value){
69
+	public function setVertical($value=true) {
70
+		if ($value) {
71 71
 			$this->addClass('vertical');
72 72
 		}
73 73
 		return $this;
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 	 * @see BaseHtml::run()
79 79
 	 */
80 80
 	public function run(JsUtils $js) {
81
-		if(isset($this->_bsComponent)===false){
82
-			$this->_bsComponent=$js->semantic()->slider('#'.$this->identifier,$this->_params,$this->_paramParts);
81
+		if (isset($this->_bsComponent)===false) {
82
+			$this->_bsComponent=$js->semantic()->slider('#'.$this->identifier, $this->_params, $this->_paramParts);
83 83
 		}
84 84
 		$this->addEventsOnRun($js);
85 85
 		return $this->_bsComponent;
Please login to merge, or discard this patch.
Ajax/semantic/components/Toast.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,56 +19,56 @@
 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
 		return $this;
29 29
 	}
30 30
 	
31
-	public function setCloseIcon(){
31
+	public function setCloseIcon() {
32 32
 		$this->params['closeIcon']=true;
33 33
 		return $this;
34 34
 	}
35 35
 	
36
-	public function setShowIcon($value=false){
36
+	public function setShowIcon($value=false) {
37 37
 		$this->params['showIcon']=$value;
38 38
 		return $this;
39 39
 	}
40 40
 	
41
-	public function setCloseOnClick($value){
41
+	public function setCloseOnClick($value) {
42 42
 		$this->params['closeOnClick']=$value;
43 43
 		return $this;
44 44
 	}
45 45
 	
46
-	public function setTitle($title){
46
+	public function setTitle($title) {
47 47
 		$this->params['title']=$title;
48 48
 		return $this;
49 49
 	}
50 50
 	
51
-	public function setMessage($message){
51
+	public function setMessage($message) {
52 52
 		$this->params['message']=$message;
53 53
 		return $this;
54 54
 	}
55 55
 	
56
-	public function setPosition($position){
56
+	public function setPosition($position) {
57 57
 		$this->params['position']=$position;
58 58
 		return $this;
59 59
 	}
60 60
 	
61
-	public function setDisplayTime($time){
61
+	public function setDisplayTime($time) {
62 62
 		$this->params['displayTime']=$time;
63 63
 		return $this;
64 64
 	}
65 65
 	
66
-	public function setShowProgress($value='top'){
66
+	public function setShowProgress($value='top') {
67 67
 		$this->params['showProgress']=$value;
68 68
 		return $this;
69 69
 	}
70 70
 	
71
-	public function setClassProgress($value){
71
+	public function setClassProgress($value) {
72 72
 		$this->params['classProgress']=$value;
73 73
 		return $this;
74 74
 	}
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
@@ -54,22 +54,22 @@
 block discarded – undo
54 54
 	 * @param string $target
55 55
 	 * @return HtmlEmoji
56 56
 	 */
57
-	public function asLink($href=NULL,$target=NULL) {
57
+	public function asLink($href=NULL, $target=NULL) {
58 58
 		if (isset($href)) {
59 59
 			$_target="";
60
-			if(isset($target))
60
+			if (isset($target))
61 61
 				$_target="target='{$target}'";
62
-			$this->wrap("<a href='" . $href . "' {$_target}>", "</a>");
62
+			$this->wrap("<a href='".$href."' {$_target}>", "</a>");
63 63
 		}
64 64
 		return $this->addToProperty("class", "link");
65 65
 	}
66 66
 
67 67
 	public function addLabel($label, $before=false, $emoji=null) {
68
-		if($before)
68
+		if ($before)
69 69
 			$this->wrap($label);
70 70
 		else
71 71
 			$this->wrap("", $label);
72
-		if($emoji!=null)
72
+		if ($emoji!=null)
73 73
 			$this->setEmoji($emoji);
74 74
 		return $this;
75 75
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlListItem.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,23 +8,23 @@  discard block
 block discarded – undo
8 8
 
9 9
 	protected $image;
10 10
 
11
-	public function __construct($identifier, $content = NULL) {
11
+	public function __construct($identifier, $content=NULL) {
12 12
 		parent::__construct($identifier, "item", $content);
13 13
 	}
14 14
 
15 15
 	protected function initContent($content) {
16 16
 		if (\is_array($content)) {
17
-			if (JArray::isAssociative($content) === false) {
18
-				$icon = $content[0] ?? null;
19
-				$title = $content[1] ?? null;
20
-				$desc = $content[2] ?? null;
17
+			if (JArray::isAssociative($content)===false) {
18
+				$icon=$content[0] ?? null;
19
+				$title=$content[1] ?? null;
20
+				$desc=$content[2] ?? null;
21 21
 			} else {
22
-				$icon = $content["icon"] ?? null;
23
-				$image = $content["image"] ?? null;
24
-				$title = $content["title"] ?? null;
25
-				$header = $content["header"] ?? null;
26
-				$desc = $content["description"] ?? null;
27
-				$items = $content["items"] ?? null;
22
+				$icon=$content["icon"] ?? null;
23
+				$image=$content["image"] ?? null;
24
+				$title=$content["title"] ?? null;
25
+				$header=$content["header"] ?? null;
26
+				$desc=$content["description"] ?? null;
27
+				$items=$content["items"] ?? null;
28 28
 			}
29 29
 			if (isset($icon)) {
30 30
 				$this->setIcon($icon);
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
 		}
46 46
 	}
47 47
 
48
-	public function addList($items = array(), $ordered = false) {
49
-		$list = new HtmlList("", $items);
48
+	public function addList($items=array(), $ordered=false) {
49
+		$list=new HtmlList("", $items);
50 50
 		if ($ordered)
51 51
 			$list->setOrdered();
52 52
 		$list->setClass("list");
53
-		$this->content["list"] = $list;
53
+		$this->content["list"]=$list;
54 54
 		return $list;
55 55
 	}
56 56
 
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/checkbox/AbstractCheckbox.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@  discard block
 block discarded – undo
7 7
 
8 8
 abstract class AbstractCheckbox extends HtmlSemDoubleElement {
9 9
 
10
-	protected $_params = [];
10
+	protected $_params=[];
11 11
 
12
-	public function __construct($identifier, $name = NULL, $label = NULL, $value = NULL, $inputType = "checkbox", $type = "checkbox") {
13
-		parent::__construct("ck-" . $identifier, "div", "ui " . $type);
14
-		$this->_identifier = $identifier;
15
-		$field = new \Ajax\common\html\html5\HtmlInput($identifier, $inputType, $value);
12
+	public function __construct($identifier, $name=NULL, $label=NULL, $value=NULL, $inputType="checkbox", $type="checkbox") {
13
+		parent::__construct("ck-".$identifier, "div", "ui ".$type);
14
+		$this->_identifier=$identifier;
15
+		$field=new \Ajax\common\html\html5\HtmlInput($identifier, $inputType, $value);
16 16
 		$field->setProperty("name", $name);
17 17
 		$this->setField($field);
18 18
 		if (isset($label))
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 		$this->setLibraryId($identifier);
21 21
 	}
22 22
 
23
-	public function setChecked($value = true) {
24
-		if ($value === true) {
23
+	public function setChecked($value=true) {
24
+		if ($value===true) {
25 25
 			$this->getField()->setProperty("checked", "checked");
26 26
 		} else {
27 27
 			$this->getField()->removeProperty("checked");
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		return $this;
30 30
 	}
31 31
 
32
-	public function forceValue($value = 'true') {
32
+	public function forceValue($value='true') {
33 33
 		$this->getField()->forceValue($value);
34 34
 		return $this;
35 35
 	}
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
 		return $this->addToPropertyCtrl("class", $checkboxType, CheckboxType::getConstants());
39 39
 	}
40 40
 
41
-	public function setLabel($label, $value = null) {
42
-		$labelO = $label;
41
+	public function setLabel($label, $value=null) {
42
+		$labelO=$label;
43 43
 		if (\is_string($label)) {
44
-			$labelO = new HtmlSemDoubleElement("", "label", "");
44
+			$labelO=new HtmlSemDoubleElement("", "label", "");
45 45
 			$labelO->setContent($label);
46 46
 			$labelO->setProperty("for", $this->getField()
47 47
 				->getIdentifier());
48 48
 			if (isset($value))
49 49
 				$labelO->setProperty("data-value", $value);
50 50
 		}
51
-		$this->content["label"] = $labelO;
51
+		$this->content["label"]=$labelO;
52 52
 	}
53 53
 
54 54
 	public function setField($field) {
55
-		$this->content["field"] = $field;
55
+		$this->content["field"]=$field;
56 56
 	}
57 57
 
58 58
 	/**
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
 	 * puts the label before or behind
79 79
 	 */
80 80
 	public function swapLabel() {
81
-		$label = $this->getLabel();
81
+		$label=$this->getLabel();
82 82
 		unset($this->content["label"]);
83
-		$this->content["label"] = $label;
83
+		$this->content["label"]=$label;
84 84
 	}
85 85
 
86 86
 	public function setReadonly() {
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
 	 *        	action to execute : check, uncheck or NULL for toggle
98 98
 	 * @return AbstractCheckbox
99 99
 	 */
100
-	public function attachEvent($selector, $action = NULL) {
101
-		if (isset($action) || \is_numeric($action) === true) {
102
-			$js = '$("#%identifier%").checkbox("attach events", "' . $selector . '", "' . $action . '");';
100
+	public function attachEvent($selector, $action=NULL) {
101
+		if (isset($action) || \is_numeric($action)===true) {
102
+			$js='$("#%identifier%").checkbox("attach events", "'.$selector.'", "'.$action.'");';
103 103
 		} else {
104
-			$js = '$("#%identifier%").checkbox("attach events", "' . $selector . '");';
104
+			$js='$("#%identifier%").checkbox("attach events", "'.$selector.'");';
105 105
 		}
106
-		$js = \str_replace("%identifier%", $this->identifier, $js);
106
+		$js=\str_replace("%identifier%", $this->identifier, $js);
107 107
 		return $this->executeOnRun($js);
108 108
 	}
109 109
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 *        	associative array of events to attach ex : ["#bt-toggle","check"=>"#bt-check","uncheck"=>"#bt-uncheck"]
115 115
 	 * @return AbstractCheckbox
116 116
 	 */
117
-	public function attachEvents($events = array()) {
117
+	public function attachEvents($events=array()) {
118 118
 		if (\is_array($events)) {
119 119
 			foreach ($events as $action => $selector) {
120 120
 				$this->attachEvent($selector, $action);
@@ -128,23 +128,23 @@  discard block
 block discarded – undo
128 128
 	}
129 129
 
130 130
 	public function setOnChecked($jsCode) {
131
-		$this->_params["onChecked"] = $jsCode;
131
+		$this->_params["onChecked"]=$jsCode;
132 132
 		return $this;
133 133
 	}
134 134
 
135 135
 	public function setOnUnchecked($jsCode) {
136
-		$this->_params["onUnchecked"] = $jsCode;
136
+		$this->_params["onUnchecked"]=$jsCode;
137 137
 		return $this;
138 138
 	}
139 139
 
140 140
 	public function setOnChange($jsCode) {
141
-		$this->_params["onChange"] = $jsCode;
141
+		$this->_params["onChange"]=$jsCode;
142 142
 		return $this;
143 143
 	}
144 144
 
145 145
 	public function run(JsUtils $js) {
146
-		if (! isset($this->_bsComponent))
147
-			$this->_bsComponent = $js->semantic()->checkbox("#" . $this->identifier, $this->_params);
146
+		if (!isset($this->_bsComponent))
147
+			$this->_bsComponent=$js->semantic()->checkbox("#".$this->identifier, $this->_params);
148 148
 		return parent::run($js);
149 149
 	}
150 150
 }
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlInput.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 	protected $_placeholder;
11 11
 
12
-	public function __construct($identifier, $type = "text", $value = NULL, $placeholder = NULL) {
12
+	public function __construct($identifier, $type="text", $value=NULL, $placeholder=NULL) {
13 13
 		parent::__construct($identifier, "input");
14 14
 		$this->setProperty("name", $identifier);
15 15
 		$this->setValue($value);
@@ -27,23 +27,23 @@  discard block
 block discarded – undo
27 27
 		return $this->setProperty("type", $value);
28 28
 	}
29 29
 
30
-	public function forceValue($value = 'true') {
31
-		$this->wrap('<input type="hidden" value="false" name="' . $this->identifier . '"/>');
30
+	public function forceValue($value='true') {
31
+		$this->wrap('<input type="hidden" value="false" name="'.$this->identifier.'"/>');
32 32
 		$this->setValue($value);
33 33
 		return $this;
34 34
 	}
35 35
 
36 36
 	public function setPlaceholder($value) {
37 37
 		if (JString::isNotNull($value))
38
-			$this->_placeholder = $value;
38
+			$this->_placeholder=$value;
39 39
 		return $this;
40 40
 	}
41 41
 
42
-	public function compile(JsUtils $js = NULL, &$view = NULL) {
43
-		$value = $this->_placeholder;
42
+	public function compile(JsUtils $js=NULL, &$view=NULL) {
43
+		$value=$this->_placeholder;
44 44
 		if (JString::isNull($value)) {
45 45
 			if (JString::isNotNull($this->getProperty("name")))
46
-				$value = \ucfirst($this->getProperty("name"));
46
+				$value=\ucfirst($this->getProperty("name"));
47 47
 		}
48 48
 		$this->setProperty("placeholder", $value);
49 49
 		return parent::compile($js, $view);
Please login to merge, or discard this patch.
Ajax/service/JString.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -4,64 +4,64 @@
 block discarded – undo
4 4
 class JString {
5 5
 
6 6
 	public static function contains($hay, $needle) {
7
-		return strpos($hay, "$needle") !== false;
7
+		return strpos($hay, "$needle")!==false;
8 8
 	}
9 9
 
10 10
 	public static function startswith($hay, $needle) {
11
-		return substr($hay, 0, strlen($needle)) === $needle;
11
+		return substr($hay, 0, strlen($needle))===$needle;
12 12
 	}
13 13
 
14 14
 	public static function endswith($hay, $needle) {
15
-		return substr($hay, - strlen($needle)) === $needle;
15
+		return substr($hay, - strlen($needle))===$needle;
16 16
 	}
17 17
 
18 18
 	public static function isNull($s) {
19
-		return (! isset($s) || NULL === $s || "" === $s);
19
+		return (!isset($s) || NULL===$s || ""===$s);
20 20
 	}
21 21
 
22 22
 	public static function isNotNull($s) {
23
-		return (isset($s) && NULL !== $s && "" !== $s);
23
+		return (isset($s) && NULL!==$s && ""!==$s);
24 24
 	}
25 25
 
26 26
 	public static function isBoolean($value) {
27
-		return \is_bool($value) || $value == 1 || $value == 0;
27
+		return \is_bool($value) || $value==1 || $value==0;
28 28
 	}
29 29
 
30 30
 	public static function isBooleanTrue($value) {
31
-		return $value == 1 || $value;
31
+		return $value==1 || $value;
32 32
 	}
33 33
 
34 34
 	public static function isBooleanFalse($value) {
35
-		return $value == 0 || ! $value;
35
+		return $value==0 || !$value;
36 36
 	}
37 37
 
38
-	public static function camelCaseToSeparated($input, $separator = " ") {
39
-		return strtolower(preg_replace('/(?<!^)[A-Z]/', $separator . '$0', $input));
38
+	public static function camelCaseToSeparated($input, $separator=" ") {
39
+		return strtolower(preg_replace('/(?<!^)[A-Z]/', $separator.'$0', $input));
40 40
 	}
41 41
 
42 42
 	public static function replaceAtFirst($subject, $from, $to) {
43
-		$from = '/\A' . preg_quote($from, '/') . '/';
43
+		$from='/\A'.preg_quote($from, '/').'/';
44 44
 		return \preg_replace($from, $to, $subject, 1);
45 45
 	}
46 46
 
47 47
 	public static function replaceAtLast($subject, $from, $to) {
48
-		$from = '/' . preg_quote($from, '/') . '\z/';
48
+		$from='/'.preg_quote($from, '/').'\z/';
49 49
 		return \preg_replace($from, $to, $subject, 1);
50 50
 	}
51 51
 
52 52
 	public static function replaceAtFirstAndLast($subject, $fromFirst, $toFirst, $fromLast, $toLast) {
53
-		$s = self::replaceAtFirst($subject, $fromFirst, $toFirst);
53
+		$s=self::replaceAtFirst($subject, $fromFirst, $toFirst);
54 54
 		return self::replaceAtLast($s, $fromLast, $toLast);
55 55
 	}
56 56
 
57
-	public static function getValueBetween(&$str, $before = "{{", $after = "}}") {
58
-		$matches = [];
59
-		$result = null;
60
-		$_before = \preg_quote($before);
61
-		$_after = \preg_quote($after);
62
-		if (\preg_match('/' . $_before . '(.*?)' . $_after . '/s', $str, $matches) === 1) {
63
-			$result = $matches[1];
64
-			$str = \str_replace($before . $result . $after, "", $str);
57
+	public static function getValueBetween(&$str, $before="{{", $after="}}") {
58
+		$matches=[];
59
+		$result=null;
60
+		$_before=\preg_quote($before);
61
+		$_after=\preg_quote($after);
62
+		if (\preg_match('/'.$_before.'(.*?)'.$_after.'/s', $str, $matches)===1) {
63
+			$result=$matches[1];
64
+			$str=\str_replace($before.$result.$after, "", $str);
65 65
 		}
66 66
 		return $result;
67 67
 	}
Please login to merge, or discard this patch.