Completed
Push — master ( 5df1fc...70601d )
by Jean-Christophe
03:41
created
Ajax/common/html/html5/HtmlTextarea.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,26 +7,26 @@
 block discarded – undo
7 7
 
8 8
 class HtmlTextarea extends HtmlDoubleElement {
9 9
 
10
-	public function __construct($identifier,$value=NULL,$placeholder=NULL,$rows=NULL) {
10
+	public function __construct($identifier, $value=NULL, $placeholder=NULL, $rows=NULL) {
11 11
 		parent::__construct($identifier, "textarea");
12 12
 		$this->setValue($value);
13 13
 		$this->setPlaceholder($placeholder);
14
-		if(isset($rows))
14
+		if (isset($rows))
15 15
 			$this->setRows($rows);
16 16
 	}
17 17
 	public function setValue($value) {
18
-		if(isset($value))
18
+		if (isset($value))
19 19
 			$this->setContent($value);
20 20
 		return $this;
21 21
 	}
22 22
 
23
-	public function setPlaceholder($value){
24
-		if(JString::isNotNull($value))
23
+	public function setPlaceholder($value) {
24
+		if (JString::isNotNull($value))
25 25
 			$this->setProperty("placeholder", $value);
26 26
 		return $this;
27 27
 	}
28 28
 
29
-	public function setRows($count){
29
+	public function setRows($count) {
30 30
 		$this->setProperty("rows", $count);
31 31
 	}
32 32
 }
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/html/HtmlCollection.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -13,35 +13,35 @@  discard block
 block discarded – undo
13 13
  */
14 14
 abstract class HtmlCollection extends HtmlDoubleElement {
15 15
 
16
-	public function __construct($identifier,$tagName="div"){
17
-		parent::__construct($identifier,$tagName);
16
+	public function __construct($identifier, $tagName="div") {
17
+		parent::__construct($identifier, $tagName);
18 18
 		$this->content=array();
19 19
 	}
20 20
 
21
-	public function addItems($items){
22
-		if(JArray::isAssociative($items)){
23
-			foreach ($items as $k=>$v){
24
-				$this->addItem([$k,$v]);
21
+	public function addItems($items) {
22
+		if (JArray::isAssociative($items)) {
23
+			foreach ($items as $k=>$v) {
24
+				$this->addItem([$k, $v]);
25 25
 			}
26
-		}else{
27
-			foreach ($items as $item){
26
+		}else {
27
+			foreach ($items as $item) {
28 28
 				$this->addItem($item);
29 29
 			}
30 30
 		}
31 31
 	}
32 32
 
33
-	public function setItems($items){
33
+	public function setItems($items) {
34 34
 		$this->content=$items;
35 35
 		return $this;
36 36
 	}
37 37
 
38
-	public function getItems(){
38
+	public function getItems() {
39 39
 		return $this->content;
40 40
 	}
41 41
 
42
-	protected function getItemToAdd($item){
42
+	protected function getItemToAdd($item) {
43 43
 		$itemO=$item;
44
-		if($this->createCondition($item)===true){
44
+		if ($this->createCondition($item)===true) {
45 45
 			$itemO=$this->createItem($item);
46 46
 		}
47 47
 		return $itemO;
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
 	 * @param HtmlDoubleElement|string $item
53 53
 	 * @return \Ajax\common\html\HtmlDoubleElement
54 54
 	 */
55
-	public function addItem($item){
55
+	public function addItem($item) {
56 56
 		$itemO=$this->getItemToAdd($item);
57 57
 		$this->addContent($itemO);
58 58
 		return $itemO;
59 59
 	}
60 60
 
61
-	public function insertItem($item,$position=0){
61
+	public function insertItem($item, $position=0) {
62 62
 		$itemO=$this->getItemToAdd($item);
63
-		\array_splice( $this->content, $position, 0, array($itemO));
63
+		\array_splice($this->content, $position, 0, array($itemO));
64 64
 		return $itemO;
65 65
 	}
66 66
 
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
 		return $this;
84 84
 	}
85 85
 
86
-	public function removeItem($index){
86
+	public function removeItem($index) {
87 87
 		return array_splice($this->content, $index, 1);
88 88
 	}
89 89
 
90
-	public function count(){
90
+	public function count() {
91 91
 		return \sizeof($this->content);
92 92
 	}
93 93
 
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 		$this->addItem($function($object));
99 99
 	}
100 100
 
101
-	public function apply($callBack){
102
-		foreach ($this->content as $item){
101
+	public function apply($callBack) {
102
+		foreach ($this->content as $item) {
103 103
 			$callBack($item);
104 104
 		}
105 105
 	}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	protected abstract function createItem($value);
119 119
 
120
-	protected function createCondition($value){
120
+	protected function createCondition($value) {
121 121
 		return \is_object($value)===false;
122 122
 	}
123 123
 
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 		return $this->_bsComponent;
133 133
 	}
134 134
 
135
-	protected function contentAs($tagName){
136
-		foreach ($this->content as $item){
135
+	protected function contentAs($tagName) {
136
+		foreach ($this->content as $item) {
137 137
 			$item->setTagName($tagName);
138 138
 		}
139 139
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormTextarea.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@
 block discarded – undo
8 8
 class HtmlFormTextarea extends HtmlFormField {
9 9
 	use TextFieldsTrait;
10 10
 
11
-	public function __construct($identifier, $label=NULL,$value=NULL,$placeholder=NULL,$rows=NULL) {
12
-		if(!isset($placeholder))
11
+	public function __construct($identifier, $label=NULL, $value=NULL, $placeholder=NULL, $rows=NULL) {
12
+		if (!isset($placeholder))
13 13
 			$placeholder=$label;
14
-		parent::__construct("field-".$identifier, new HtmlTextarea($identifier,$value,$placeholder,$rows), $label);
14
+		parent::__construct("field-".$identifier, new HtmlTextarea($identifier, $value, $placeholder, $rows), $label);
15 15
 	}
16 16
 
17 17
 	/**
18 18
 	 * Defines the textarea row count
19 19
 	 * @param int $count
20 20
 	 */
21
-	public function setRows($count){
21
+	public function setRows($count) {
22 22
 		$this->getField()->setRows($count);
23 23
 	}
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/State.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 State extends BaseEnum {
8
-	const ACTIVE="active",DISABLED="disabled",ERROR="error",FOCUS="focus",LOADING="loading",SUCCESS="success",WARNING="warning";
8
+	const ACTIVE="active", DISABLED="disabled", ERROR="error", FOCUS="focus", LOADING="loading", SUCCESS="success", WARNING="warning";
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormRadio.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
  */
11 11
 class HtmlFormRadio extends AbstractHtmlFormRadioCheckbox {
12 12
 
13
-	public function __construct($identifier, $name=NULL,$label=NULL,$value=NULL) {
14
-		parent::__construct($identifier, $name,$label,$value);
13
+	public function __construct($identifier, $name=NULL, $label=NULL, $value=NULL) {
14
+		parent::__construct($identifier, $name, $label, $value);
15 15
 		$this->_input->getField()->setProperty("type", "radio");
16 16
 		$this->_input->setClass("ui radio checkbox");
17
-		if(isset($name))
17
+		if (isset($name))
18 18
 			$this->_input->getField()->setProperty("name", $name);
19 19
 	}
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormCheckbox.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@
 block discarded – undo
10 10
  * @version 1.001
11 11
  */
12 12
 class HtmlFormCheckbox extends AbstractHtmlFormRadioCheckbox {
13
-	public function __construct($identifier, $label=NULL,$value=NULL,$type=NULL) {
14
-		parent::__construct($identifier, NULL,$label,$value);
13
+	public function __construct($identifier, $label=NULL, $value=NULL, $type=NULL) {
14
+		parent::__construct($identifier, NULL, $label, $value);
15 15
 		$this->_input->setClass("ui checkbox");
16
-		if(isset($type))
16
+		if (isset($type))
17 17
 			$this->setType($type);
18 18
 	}
19 19
 
20
-	public function setType($checkboxType){
20
+	public function setType($checkboxType) {
21 21
 		return $this->_input->addToPropertyCtrl("class", $checkboxType, CheckboxType::getConstants());
22 22
 	}
23 23
 }
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormInput.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 class HtmlFormInput extends HtmlFormField {
8 8
 	use TextFieldsTrait;
9 9
 
10
-	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
11
-		if(!isset($placeholder) && $type==="text")
10
+	public function __construct($identifier, $label=NULL, $type="text", $value=NULL, $placeholder=NULL) {
11
+		if (!isset($placeholder) && $type==="text")
12 12
 			$placeholder=$label;
13
-		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
13
+		parent::__construct("field-".$identifier, new HtmlInput($identifier, $type, $value, $placeholder), $label);
14 14
 	}
15 15
 }
16 16
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/AbstractHtmlFormRadioCheckbox.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@
 block discarded – undo
11 11
 abstract class AbstractHtmlFormRadioCheckbox extends HtmlFormField {
12 12
 	protected $_input;
13 13
 
14
-	public function __construct($identifier, $name=NULL,$label=NULL,$value=NULL) {
15
-		$input=new HtmlFormInput($identifier,$label,"checkbox",$value);
14
+	public function __construct($identifier, $name=NULL, $label=NULL, $value=NULL) {
15
+		$input=new HtmlFormInput($identifier, $label, "checkbox", $value);
16 16
 		parent::__construct("rField-".$identifier, $input);
17
-		if(isset($label)){
17
+		if (isset($label)) {
18 18
 			$input->swapLabel();
19 19
 			$label=$input->getLabel();
20 20
 			$label->setClass="hidden";
21
-			$label->setProperty("tabindex",0);
21
+			$label->setProperty("tabindex", 0);
22 22
 		}
23 23
 		$this->_input=$input;
24 24
 	}
Please login to merge, or discard this patch.
Ajax/Semantic.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 use Ajax\semantic\traits\SemanticHtmlElementsTrait;
21 21
 
22 22
 class Semantic extends BaseGui {
23
-	use SemanticComponentsTrait,SemanticHtmlElementsTrait;
23
+	use SemanticComponentsTrait, SemanticHtmlElementsTrait;
24 24
 	public function __construct($autoCompile=true) {
25 25
 		parent::__construct($autoCompile=true);
26 26
 	}
@@ -31,24 +31,24 @@  discard block
 block discarded – undo
31 31
 	 * @param array $items
32 32
 	 * @return Ajax\semantic\html\collections\HtmlMenu
33 33
 	 */
34
-	public function htmlMenu($identifier,$items=array()){
35
-		return $this->addHtmlComponent(new HtmlMenu($identifier,$items));
34
+	public function htmlMenu($identifier, $items=array()) {
35
+		return $this->addHtmlComponent(new HtmlMenu($identifier, $items));
36 36
 	}
37 37
 
38 38
 	/**Adds an icon menu
39 39
 	 * @param string $identifier
40 40
 	 * @param array $items icons
41 41
 	 */
42
-	public function htmlIconMenu($identifier,$items=array()){
43
-		return $this->addHtmlComponent(new HtmlIconMenu($identifier,$items));
42
+	public function htmlIconMenu($identifier, $items=array()) {
43
+		return $this->addHtmlComponent(new HtmlIconMenu($identifier, $items));
44 44
 	}
45 45
 
46 46
 	/**Adds an labeled icon menu
47 47
 	 * @param string $identifier
48 48
 	 * @param array $items icons
49 49
 	 */
50
-	public function htmlLabeledIconMenu($identifier,$items=array()){
51
-		return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier,$items));
50
+	public function htmlLabeledIconMenu($identifier, $items=array()) {
51
+		return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier, $items));
52 52
 	}
53 53
 
54 54
 	/**
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 	 * @param string $value
57 57
 	 * @param array $items
58 58
 	 */
59
-	public function htmlDropdown($identifier, $value="", $items=array()){
60
-		return $this->addHtmlComponent(new HtmlDropdown($identifier,$value,$items));
59
+	public function htmlDropdown($identifier, $value="", $items=array()) {
60
+		return $this->addHtmlComponent(new HtmlDropdown($identifier, $value, $items));
61 61
 	}
62 62
 
63 63
 	/**
@@ -65,16 +65,16 @@  discard block
 block discarded – undo
65 65
 	 * @param string $identifier
66 66
 	 * @param string $content
67 67
 	 */
68
-	public function htmlMessage($identifier, $content=""){
69
-		return $this->addHtmlComponent(new HtmlMessage($identifier,$content));
68
+	public function htmlMessage($identifier, $content="") {
69
+		return $this->addHtmlComponent(new HtmlMessage($identifier, $content));
70 70
 	}
71 71
 
72 72
 	/**
73 73
 	 * @param string $identifier
74 74
 	 * @param mixed $content
75 75
 	 */
76
-	public function htmlPopup(BaseHtml $container,$identifier,$content){
77
-		return $this->addHtmlComponent(new HtmlPopup($container,$identifier,$content));
76
+	public function htmlPopup(BaseHtml $container, $identifier, $content) {
77
+		return $this->addHtmlComponent(new HtmlPopup($container, $identifier, $content));
78 78
 	}
79 79
 
80 80
 	/**
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 	 * @param boolean $createCols
85 85
 	 * @param boolean $implicitRows
86 86
 	 */
87
-	public function htmlGrid($identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){
88
-		return $this->addHtmlComponent(new HtmlGrid($identifier,$numRows,$numCols,$createCols,$implicitRows));
87
+	public function htmlGrid($identifier, $numRows=1, $numCols=NULL, $createCols=true, $implicitRows=false) {
88
+		return $this->addHtmlComponent(new HtmlGrid($identifier, $numRows, $numCols, $createCols, $implicitRows));
89 89
 	}
90 90
 
91 91
 
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 	 * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()}
99 99
 	 * @return HtmlBreadcrumb
100 100
 	 */
101
-	public function htmlBreadcrumb( $identifier,$items=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){
102
-		return $this->addHtmlComponent(new HtmlBreadcrumb($identifier,$items,$autoActive,$startIndex,$hrefFunction));
101
+	public function htmlBreadcrumb($identifier, $items=array(), $autoActive=true, $startIndex=0, $hrefFunction=NULL) {
102
+		return $this->addHtmlComponent(new HtmlBreadcrumb($identifier, $items, $autoActive, $startIndex, $hrefFunction));
103 103
 	}
104 104
 
105 105
 	/**
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
 	 * @param string $identifier
117 117
 	 * @return HtmlAccordion
118 118
 	 */
119
-	public function htmlAccordionMenu($identifier,$items=array()) {
120
-		return $this->addHtmlComponent(new HtmlAccordionMenu($identifier,$items));
119
+	public function htmlAccordionMenu($identifier, $items=array()) {
120
+		return $this->addHtmlComponent(new HtmlAccordionMenu($identifier, $items));
121 121
 	}
122 122
 
123 123
 	/**
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	 * @param string $identifier
126 126
 	 * @param array $elements
127 127
 	 */
128
-	public function htmlForm($identifier,$elements=array()) {
129
-		return $this->addHtmlComponent(new HtmlForm($identifier,$elements));
128
+	public function htmlForm($identifier, $elements=array()) {
129
+		return $this->addHtmlComponent(new HtmlForm($identifier, $elements));
130 130
 	}
131 131
 }
132 132
\ No newline at end of file
Please login to merge, or discard this patch.