Passed
Push — master ( b05b27...d75614 )
by Jean-Christophe
02:11
created
Ajax/semantic/html/base/traits/MenuItemTrait.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -19,16 +19,16 @@  discard block
 block discarded – undo
19 19
 	abstract public function setClass($classNames);
20 20
 	abstract public function addIcon($icon, $before=true);
21 21
 
22
-	public function setContent($content){
23
-		if($content==="-"){
22
+	public function setContent($content) {
23
+		if ($content==="-") {
24 24
 			$this->asDivider();
25
-		}elseif($content==="-search-"){
26
-			$values=\explode(",",$content,-1);
27
-			$this->asSearchInput(JArray::getDefaultValue($values, 0, "Search..."),JArray::getDefaultValue($values, 1, "search"));
28
-		}elseif(JString::startswith($content, "-")){
29
-			$content=\ltrim($content,"-");
25
+		}elseif ($content==="-search-") {
26
+			$values=\explode(",", $content, -1);
27
+			$this->asSearchInput(JArray::getDefaultValue($values, 0, "Search..."), JArray::getDefaultValue($values, 1, "search"));
28
+		}elseif (JString::startswith($content, "-")) {
29
+			$content=\ltrim($content, "-");
30 30
 			$this->asHeader($content);
31
-		}else
31
+		} else
32 32
 			parent::setContent($content);
33 33
 		return $this;
34 34
 	}
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
 	 * @param string $icon
39 39
 	 * @return HtmlDropdownItem|HtmlMenuItem
40 40
 	 */
41
-	public function asSearchInput($placeholder=NULL,$icon=NULL){
41
+	public function asSearchInput($placeholder=NULL, $icon=NULL) {
42 42
 		$this->setClass("ui icon search input");
43 43
 		$input=new HtmlInput("search-".$this->identifier);
44
-		if(isset($placeholder))
44
+		if (isset($placeholder))
45 45
 			$input->setProperty("placeholder", $placeholder);
46 46
 			$this->content=$input;
47
-			if(isset($icon))
47
+			if (isset($icon))
48 48
 				$this->addIcon($icon);
49 49
 				return $this;
50 50
 	}
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	/**
53 53
 	 * @return HtmlDropdownItem|HtmlMenuItem
54 54
 	 */
55
-	public function asDivider(){
55
+	public function asDivider() {
56 56
 		$this->content=NULL;
57 57
 		$this->tagName="div";
58 58
 		$this->setClass("divider");
@@ -64,16 +64,16 @@  discard block
 block discarded – undo
64 64
 	 * @param string $icon
65 65
 	 * @return HtmlDropdownItem|HtmlMenuItem
66 66
 	 */
67
-	public function asHeader($caption=NULL,$icon=NULL){
67
+	public function asHeader($caption=NULL, $icon=NULL) {
68 68
 		$this->setClass("header");
69 69
 		$this->tagName="div";
70 70
 		$this->content=$caption;
71
-		if(isset($icon))
72
-			$this->addIcon($icon,Direction::LEFT);
71
+		if (isset($icon))
72
+			$this->addIcon($icon, Direction::LEFT);
73 73
 			return $this;
74 74
 	}
75 75
 
76
-	public function setPosition($direction){
77
-		$this->addToProperty("class",$direction);
76
+	public function setPosition($direction) {
77
+		$this->addToProperty("class", $direction);
78 78
 	}
79 79
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/TextAlignmentTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,23 +12,23 @@
 block discarded – undo
12 12
 	 * @param string $value
13 13
 	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
14 14
 	 */
15
-	public function setTextAlignment($value=TextAlignment::LEFT){
16
-		return $this->addToPropertyCtrl("class", $value,TextAlignment::getConstants());
15
+	public function setTextAlignment($value=TextAlignment::LEFT) {
16
+		return $this->addToPropertyCtrl("class", $value, TextAlignment::getConstants());
17 17
 	}
18 18
 
19
-	public function textCenterAligned(){
19
+	public function textCenterAligned() {
20 20
 		return $this->setTextAlignment(TextAlignment::CENTER);
21 21
 	}
22 22
 
23
-	public function textJustified(){
23
+	public function textJustified() {
24 24
 		return $this->setTextAlignment(TextAlignment::JUSTIFIED);
25 25
 	}
26 26
 
27
-	public function textRightAligned(){
27
+	public function textRightAligned() {
28 28
 		return $this->setTextAlignment(TextAlignment::RIGHT);
29 29
 	}
30 30
 
31
-	public function textLeftAligned(){
31
+	public function textLeftAligned() {
32 32
 		return $this->setTextAlignment();
33 33
 	}
34 34
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/views/HtmlCard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 class HtmlCard extends HtmlViewItem {
8 8
 
9
-	public function __construct($identifier,$content=NULL) {
9
+	public function __construct($identifier, $content=NULL) {
10 10
 		parent::__construct($identifier, "ui card", $content);
11 11
 	}
12 12
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlGridCol.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	public function setWidth($width) {
32 32
 		if (\is_int($width)) {
33
-			$width=Wide::getConstants()["W" . $width];
33
+			$width=Wide::getConstants()["W".$width];
34 34
 		}
35 35
 		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
36
-		return $this->addToPropertyCtrl("class", "wide", array ("wide" ));
36
+		return $this->addToPropertyCtrl("class", "wide", array("wide"));
37 37
 	}
38 38
 
39 39
 	public function setValue($value) {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			$divider->setVertical();
52 52
 		else
53 53
 			$divider->setHorizontal();
54
-		$this->wrap($divider,"");
54
+		$this->wrap($divider, "");
55 55
 		return $divider;
56 56
 	}
57 57
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlLabeledIconMenu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
  * @author jc
13 13
  * @version 1.001
14 14
  */
15
-class HtmlLabeledIconMenu extends HtmlMenu{
15
+class HtmlLabeledIconMenu extends HtmlMenu {
16 16
 
17 17
 
18 18
 	/**
19 19
 	 * @param string $identifier
20 20
 	 * @param array $items icons
21 21
 	 */
22
-	public function __construct( $identifier, $items=array()){
23
-		parent::__construct( $identifier, $items);
22
+	public function __construct($identifier, $items=array()) {
23
+		parent::__construct($identifier, $items);
24 24
 		$this->addToProperty("class", "labeled icon");
25 25
 	}
26 26
 
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 	protected function createItem($value) {
32 32
 		$text="";
33 33
 		$v=$value;
34
-		if(\is_array($value)){
34
+		if (\is_array($value)) {
35 35
 			$v=@$value[0];
36 36
 			$text=@$value[1];
37 37
 		}
38 38
 		$count=\sizeof($this->content);
39 39
 		$value=new HtmlIcon("icon-".$count, $v);
40
-		$value->wrap("",$text);
41
-		$itemO=new HtmlLink("item-".$count,"",$value);
40
+		$value->wrap("", $text);
41
+		$itemO=new HtmlLink("item-".$count, "", $value);
42 42
 		return $itemO->setClass("item");
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlIconMenu.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
  * @author jc
13 13
  * @version 1.001
14 14
  */
15
-class HtmlIconMenu extends HtmlMenu{
15
+class HtmlIconMenu extends HtmlMenu {
16 16
 
17 17
 
18 18
 	/**
19 19
 	 * @param string $identifier
20 20
 	 * @param array $items icons
21 21
 	 */
22
-	public function __construct( $identifier, $items=array()){
23
-		parent::__construct( $identifier, $items);
22
+	public function __construct($identifier, $items=array()) {
23
+		parent::__construct($identifier, $items);
24 24
 		$this->addToProperty("class", "icon");
25 25
 	}
26 26
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	protected function createItem($value) {
33 33
 		$count=\sizeof($this->content);
34 34
 		$value=new HtmlIcon("icon-".$count, $value);
35
-		$itemO=new HtmlLink("item-".$count,"",$value);
35
+		$itemO=new HtmlLink("item-".$count, "", $value);
36 36
 		return $itemO->setClass("item");
37 37
 	}
38 38
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormTextarea.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
 class HtmlFormTextarea extends HtmlFormField {
10 10
 	use TextFieldsTrait;
11 11
 
12
-	public function __construct($identifier, $label=NULL,$value=NULL,$placeholder=NULL,$rows=NULL) {
13
-		if(!isset($placeholder))
12
+	public function __construct($identifier, $label=NULL, $value=NULL, $placeholder=NULL, $rows=NULL) {
13
+		if (!isset($placeholder))
14 14
 			$placeholder=$label;
15
-		parent::__construct("field-".$identifier, new HtmlTextarea($identifier,$value,$placeholder,$rows), $label);
15
+		parent::__construct("field-".$identifier, new HtmlTextarea($identifier, $value, $placeholder, $rows), $label);
16 16
 		$this->_identifier=$identifier;
17 17
 	}
18 18
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	 * Defines the textarea row count
21 21
 	 * @param int $count
22 22
 	 */
23
-	public function setRows($count){
23
+	public function setRows($count) {
24 24
 		$this->getField()->setRows($count);
25 25
 	}
26 26
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 		return $this->content["field"];
29 29
 	}
30 30
 
31
-	public function setName($name){
32
-		$this->getDataField()->setProperty("name",$name);
31
+	public function setName($name) {
32
+		$this->getDataField()->setProperty("name", $name);
33 33
 	}
34 34
 }
Please login to merge, or discard this patch.
Ajax/semantic/widgets/datatable/PositionInTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,5 +3,5 @@
 block discarded – undo
3 3
 use Ajax\common\BaseEnum;
4 4
 
5 5
 abstract class PositionInTable extends BaseEnum {
6
-	const BEFORETABLE="beforeTable",AFTERTABLE="afterTable",HEADER="thead",FOOTER="tfoot",BODY="tbody";
6
+	const BEFORETABLE="beforeTable", AFTERTABLE="afterTable", HEADER="thead", FOOTER="tfoot", BODY="tbody";
7 7
 }
Please login to merge, or discard this patch.
Ajax/semantic/widgets/business/BusinessForm.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -16,17 +16,17 @@  discard block
 block discarded – undo
16 16
 	 *
17 17
 	 * @see \Ajax\semantic\widgets\dataform\DataForm::__construct()
18 18
 	 */
19
-	public function __construct($identifier,$modelInstance=null,$fieldsOrder,$fieldsDefinition,$fields=[],$captions=[],$separators=[]) {
20
-		if(!isset($modelInstance)){
19
+	public function __construct($identifier, $modelInstance=null, $fieldsOrder, $fieldsDefinition, $fields=[], $captions=[], $separators=[]) {
20
+		if (!isset($modelInstance)) {
21 21
 			$modelInstance=$this->getDefaultModelInstance();
22 22
 		}
23
-		parent::__construct($identifier,$modelInstance);
24
-		$this->_initForm($fieldsOrder, $fieldsDefinition,$fields,$captions,$separators);
23
+		parent::__construct($identifier, $modelInstance);
24
+		$this->_initForm($fieldsOrder, $fieldsDefinition, $fields, $captions, $separators);
25 25
 	}
26 26
 
27 27
 	abstract protected function getDefaultModelInstance();
28 28
 
29
-	protected function _initForm($fieldsOrder,$fieldsDefinition,$fields=[],$captions=[],$separators=[]){
29
+	protected function _initForm($fieldsOrder, $fieldsDefinition, $fields=[], $captions=[], $separators=[]) {
30 30
 		$this->_fieldsOrder=$fieldsOrder;
31 31
 		$this->setFields($fields);
32 32
 		$this->setSeparators($separators);
@@ -34,26 +34,26 @@  discard block
 block discarded – undo
34 34
 		$this->setCaptions($captions);
35 35
 	}
36 36
 
37
-	protected function _getIndex($fieldName){
37
+	protected function _getIndex($fieldName) {
38 38
 		$index=$fieldName;
39
-		if(\is_string($fieldName)){
39
+		if (\is_string($fieldName)) {
40 40
 			$index=\array_search($fieldName, $this->_fieldsOrder);
41 41
 		}
42 42
 		return $index;
43 43
 	}
44
-	protected function _fieldAs($elementCallback,&$index,$attributes=NULL,$prefix=null){
44
+	protected function _fieldAs($elementCallback, &$index, $attributes=NULL, $prefix=null) {
45 45
 		$index=$this->_getIndex($index);
46
-		return parent::_fieldAs($elementCallback, $index,$attributes,$prefix);
46
+		return parent::_fieldAs($elementCallback, $index, $attributes, $prefix);
47 47
 	}
48 48
 
49 49
 
50
-	public function removeField($fieldName){
50
+	public function removeField($fieldName) {
51 51
 		parent::removeField($fieldName);
52
-		\array_splice($this->_fieldsOrder,$this->_getIndex($fieldName),1);
52
+		\array_splice($this->_fieldsOrder, $this->_getIndex($fieldName), 1);
53 53
 		return $this;
54 54
 	}
55 55
 
56
-	public function compile(JsUtils $js=NULL,&$view=NULL){
57
-		return parent::compile($js,$view);
56
+	public function compile(JsUtils $js=NULL, &$view=NULL) {
57
+		return parent::compile($js, $view);
58 58
 	}
59 59
 }
Please login to merge, or discard this patch.