Completed
Push — master ( 73aa8e...3a9bcf )
by Jean-Christophe
06:21
created
Ajax/semantic/html/elements/HtmlIconGroups.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -13,6 +13,9 @@
 block discarded – undo
13 13
  */
14 14
 class HtmlIconGroups extends HtmlSemCollection {
15 15
 
16
+	/**
17
+	 * @param string $identifier
18
+	 */
16 19
 	public function __construct($identifier, $icons=array(), $size="") {
17 20
 		parent::__construct($identifier, "i", "icons");
18 21
 		$this->addItems($icons);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 			$icon=JArray::getValue($value, "icon", 0);
26 26
 			$size=JArray::getValue($value, "size", 1);
27 27
 		}
28
-		$iconO=new HtmlIcon("icon-" . $this->identifier, $icon);
28
+		$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
29 29
 		if (isset($size)) {
30 30
 			$iconO->setSize($size);
31 31
 		}
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	}
34 34
 
35 35
 	protected function createCondition($value) {
36
-		return ($value instanceof HtmlIcon) === false;
36
+		return ($value instanceof HtmlIcon)===false;
37 37
 	}
38 38
 
39 39
 	public function getIcon($index) {
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlLabel.php 4 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
 
21 21
 	/**
22 22
 	 *
23
-	 * @param string $side
24 23
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
25 24
 	 */
26 25
 	public function setPointing($value=Direction::NONE) {
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -91,12 +91,12 @@
 block discarded – undo
91 91
 	}
92 92
 
93 93
 	/**
94
-	*  Adds an image
95
-	* @param string $src
96
-	* @param string $alt
97
-	* @param boolean $before
98
-	* @return \Ajax\semantic\html\elements\html5\HtmlImg
99
-	*/
94
+	 *  Adds an image
95
+	 * @param string $src
96
+	 * @param string $alt
97
+	 * @param boolean $before
98
+	 * @return \Ajax\semantic\html\elements\html5\HtmlImg
99
+	 */
100 100
 	public function addImage($src, $alt="", $before=true) {
101 101
 		$img=new HtmlImg("image-" . $this->identifier, $src, $alt);
102 102
 		$img->setClass("");
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
25 25
 	 */
26 26
 	public function setPointing($value=Direction::NONE) {
27
-		if($value==="left" || $value==="right")
27
+		if ($value==="left" || $value==="right")
28 28
 			return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
29 29
 		else
30
-			return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true));
30
+			return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing", true));
31 31
 	}
32 32
 
33 33
 	/**
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
37 37
 	 */
38 38
 	public function toCorner($side="left") {
39
-		return $this->addToPropertyCtrl("class", $side . " corner", array ("right corner","left corner" ));
39
+		return $this->addToPropertyCtrl("class", $side." corner", array("right corner", "left corner"));
40 40
 	}
41 41
 
42
-	public function setHorizontal(){
43
-		return $this->addToPropertyCtrl("class", "hozizontal",array("horizontal"));
42
+	public function setHorizontal() {
43
+		return $this->addToPropertyCtrl("class", "hozizontal", array("horizontal"));
44 44
 	}
45 45
 
46
-	public function setFloating(){
47
-		return $this->addToPropertyCtrl("class", "floating",array("floating"));
46
+	public function setFloating() {
47
+		return $this->addToPropertyCtrl("class", "floating", array("floating"));
48 48
 	}
49 49
 
50 50
 	/**
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
 		return $this->addToProperty("class", "tag");
56 56
 	}
57 57
 
58
-	public function setEmpty(){
58
+	public function setEmpty() {
59 59
 		$this->content=NULL;
60
-		return $this->addToPropertyCtrl("class", "empty",array("empty"));
60
+		return $this->addToPropertyCtrl("class", "empty", array("empty"));
61 61
 	}
62 62
 
63 63
 	public function setBasic() {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 */
74 74
 	public function addEmphasisImage($src, $alt="", $before=true) {
75 75
 		$this->addToProperty("class", "image");
76
-		return $this->addImage($src,$alt,$before);
76
+		return $this->addImage($src, $alt, $before);
77 77
 	}
78 78
 
79 79
 	/**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 * @return \Ajax\semantic\html\elements\html5\HtmlImg
85 85
 	 */
86 86
 	public function addAvatarImage($src, $alt="", $before=true) {
87
-		$img=$this->addImage($src,$alt,$before);
87
+		$img=$this->addImage($src, $alt, $before);
88 88
 		$img->setClass("ui image");
89 89
 		$img->asAvatar();
90 90
 		return $img;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	* @return \Ajax\semantic\html\elements\html5\HtmlImg
99 99
 	*/
100 100
 	public function addImage($src, $alt="", $before=true) {
101
-		$img=new HtmlImg("image-" . $this->identifier, $src, $alt);
101
+		$img=new HtmlImg("image-".$this->identifier, $src, $alt);
102 102
 		$img->setClass("");
103 103
 		$this->addContent($img, $before);
104 104
 		return $img;
@@ -110,21 +110,21 @@  discard block
 block discarded – undo
110 110
 	 * @return \Ajax\common\html\HtmlDoubleElement
111 111
 	 */
112 112
 	public function addDetail($detail) {
113
-		$div=new HtmlSemDoubleElement("detail-" . $this->identifier, $this->tagName,"detail");
113
+		$div=new HtmlSemDoubleElement("detail-".$this->identifier, $this->tagName, "detail");
114 114
 		$div->setContent($detail);
115 115
 		$this->addContent($div);
116 116
 		return $div;
117 117
 	}
118 118
 
119 119
 	public function asRibbon($direction=Direction::NONE) {
120
-		return $this->addToPropertyCtrl("class", $direction." ribbon", array ("ribbon","right ribbon","left ribbon" ));
120
+		return $this->addToPropertyCtrl("class", $direction." ribbon", array("ribbon", "right ribbon", "left ribbon"));
121 121
 	}
122 122
 
123
-	public function setAttached($side=Side::TOP,$direction=Direction::NONE){
124
-		if($direction!==Direction::NONE)
125
-			return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached"));
123
+	public function setAttached($side=Side::TOP, $direction=Direction::NONE) {
124
+		if ($direction!==Direction::NONE)
125
+			return $this->addToPropertyCtrl("class", $side." ".$direction." attached", Side::getConstantValues($direction." attached"));
126 126
 		else
127
-			return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached"));
127
+			return $this->addToPropertyCtrl("class", $side." attached", Side::getConstantValues("attached"));
128 128
 	}
129 129
 
130 130
 	public static function ribbon($identifier, $caption) {
Please login to merge, or discard this patch.
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@  discard block
 block discarded – undo
14 14
 	public function __construct($identifier, $caption="", $icon=NULL, $tagName="div") {
15 15
 		parent::__construct($identifier, $tagName, "ui label");
16 16
 		$this->content=$caption;
17
-		if (isset($icon)===true)
18
-			$this->addIcon($icon);
17
+		if (isset($icon)===true) {
18
+					$this->addIcon($icon);
19
+		}
19 20
 	}
20 21
 
21 22
 	/**
@@ -24,10 +25,11 @@  discard block
 block discarded – undo
24 25
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
25 26
 	 */
26 27
 	public function setPointing($value=Direction::NONE) {
27
-		if($value==="left" || $value==="right")
28
-			return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
29
-		else
30
-			return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true));
28
+		if($value==="left" || $value==="right") {
29
+					return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
30
+		} else {
31
+					return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true));
32
+		}
31 33
 	}
32 34
 
33 35
 	/**
@@ -121,10 +123,11 @@  discard block
 block discarded – undo
121 123
 	}
122 124
 
123 125
 	public function setAttached($side=Side::TOP,$direction=Direction::NONE){
124
-		if($direction!==Direction::NONE)
125
-			return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached"));
126
-		else
127
-			return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached"));
126
+		if($direction!==Direction::NONE) {
127
+					return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached"));
128
+		} else {
129
+					return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached"));
130
+		}
128 131
 	}
129 132
 
130 133
 	public static function ribbon($identifier, $caption) {
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlList.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -10,6 +10,9 @@  discard block
 block discarded – undo
10 10
 class HtmlList extends HtmlSemCollection {
11 11
 	protected $_hasCheckedList;
12 12
 
13
+	/**
14
+	 * @param string $identifier
15
+	 */
13 16
 	public function __construct($identifier, $items=array()) {
14 17
 		parent::__construct($identifier, "div", "ui list");
15 18
 		$this->addItems($items);
@@ -22,6 +25,9 @@  discard block
 block discarded – undo
22 25
 		return $item;
23 26
 	}
24 27
 
28
+	/**
29
+	 * @param integer $niveau
30
+	 */
25 31
 	public function addHeader($niveau, $content) {
26 32
 		$header=new HtmlHeader("header-" . $this->identifier, $niveau, $content, "page");
27 33
 		$this->wrap($header);
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@  discard block
 block discarded – undo
18 18
 
19 19
 	protected function createItem($value) {
20 20
 		$count=$this->count();
21
-		$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value);
21
+		$item=new HtmlListItem("item-".$this->identifier."-".$count, $value);
22 22
 		return $item;
23 23
 	}
24 24
 
25 25
 	public function addHeader($niveau, $content) {
26
-		$header=new HtmlHeader("header-" . $this->identifier, $niveau, $content, "page");
26
+		$header=new HtmlHeader("header-".$this->identifier, $niveau, $content, "page");
27 27
 		$this->wrap($header);
28 28
 		return $header;
29 29
 	}
30 30
 
31
-	public function getItemPart($index,$partName="header"){
31
+	public function getItemPart($index, $partName="header") {
32 32
 		return $this->getItem($index)->getPart($partName);
33 33
 	}
34 34
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 
39 39
 	public function asLink() {
40
-		$this->addToPropertyCtrl("class", "link", array ("link" ));
40
+		$this->addToPropertyCtrl("class", "link", array("link"));
41 41
 		return $this->contentAs("a");
42 42
 	}
43 43
 
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 	}
61 61
 
62 62
 	public function run(JsUtils $js) {
63
-		if ($this->_hasCheckedList === true) {
64
-			$jsCode=include dirname(__FILE__) . '/../../components/jsTemplates/tplCheckedList.php';
65
-			$jsCode=\str_replace("%identifier%", "#" . $this->identifier, $jsCode);
63
+		if ($this->_hasCheckedList===true) {
64
+			$jsCode=include dirname(__FILE__).'/../../components/jsTemplates/tplCheckedList.php';
65
+			$jsCode=\str_replace("%identifier%", "#".$this->identifier, $jsCode);
66 66
 			$this->executeOnRun($jsCode);
67 67
 		}
68 68
 		return parent::run($js);
@@ -86,24 +86,24 @@  discard block
 block discarded – undo
86 86
 
87 87
 	public function addCheckedList($items=array(), $masterItem=NULL, $values=array()) {
88 88
 		$count=$this->count();
89
-		$identifier=$this->identifier . "-" . $count;
89
+		$identifier=$this->identifier."-".$count;
90 90
 		if (isset($masterItem)) {
91
-			$masterO=new HtmlFormCheckbox("master-" . $identifier, $masterItem);
91
+			$masterO=new HtmlFormCheckbox("master-".$identifier, $masterItem);
92 92
 			$masterO->getField()->addToProperty("class", "master");
93 93
 			$masterO->setClass("item");
94 94
 			$this->addItem($masterO);
95 95
 		}
96
-		$fields=array ();
96
+		$fields=array();
97 97
 		$i=0;
98
-		foreach ( $items as $val => $caption ) {
99
-			$itemO=new HtmlFormCheckbox($identifier . "-" . $i++, $caption, $val, "child");
100
-			if (\array_search($val, $values) !== false) {
98
+		foreach ($items as $val => $caption) {
99
+			$itemO=new HtmlFormCheckbox($identifier."-".$i++, $caption, $val, "child");
100
+			if (\array_search($val, $values)!==false) {
101 101
 				$itemO->getField()->getField()->setProperty("checked", "");
102 102
 			}
103 103
 			$itemO->setClass("item");
104 104
 			$fields[]=$itemO;
105 105
 		}
106
-		if (isset($masterO) === true) {
106
+		if (isset($masterO)===true) {
107 107
 			$list=new HtmlList("", $fields);
108 108
 			$list->setClass("list");
109 109
 			$masterO->addContent($list);
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlAccordion.php 3 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -10,6 +10,9 @@  discard block
 block discarded – undo
10 10
 
11 11
 	protected $params=array();
12 12
 
13
+	/**
14
+	 * @param string $identifier
15
+	 */
13 16
 	public function __construct( $identifier, $tagName="div", $baseClass="ui"){
14 17
 		parent::__construct( $identifier, "div", "ui accordion");
15 18
 	}
@@ -29,6 +32,9 @@  discard block
 block discarded – undo
29 32
 		return ($value instanceof HtmlAccordionItem)===false;
30 33
 	}
31 34
 
35
+	/**
36
+	 * @param string $title
37
+	 */
32 38
 	public function addPanel($title,$content){
33 39
 		return $this->addItem([$title,$content]);
34 40
 	}
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -6,31 +6,31 @@  discard block
 block discarded – undo
6 6
 use Ajax\semantic\html\content\HtmlAccordionItem;
7 7
 use Ajax\JsUtils;
8 8
 
9
-class HtmlAccordion extends HtmlSemCollection{
9
+class HtmlAccordion extends HtmlSemCollection {
10 10
 
11 11
 	protected $params=array();
12 12
 
13
-	public function __construct( $identifier, $tagName="div", $baseClass="ui"){
14
-		parent::__construct( $identifier, "div", "ui accordion");
13
+	public function __construct($identifier, $tagName="div", $baseClass="ui") {
14
+		parent::__construct($identifier, "div", "ui accordion");
15 15
 	}
16 16
 
17 17
 
18
-	protected function createItem($value){
18
+	protected function createItem($value) {
19 19
 		$count=$this->count();
20 20
 		$title=$value;
21 21
 		$content=NULL;
22
-		if(\is_array($value)){
23
-			$title=@$value[0];$content=@$value[1];
22
+		if (\is_array($value)) {
23
+			$title=@$value[0]; $content=@$value[1];
24 24
 		}
25
-		return new HtmlAccordionItem("item-".$this->identifier."-".$count, $title,$content);
25
+		return new HtmlAccordionItem("item-".$this->identifier."-".$count, $title, $content);
26 26
 	}
27 27
 
28
-	protected function createCondition($value){
28
+	protected function createCondition($value) {
29 29
 		return ($value instanceof HtmlAccordionItem)===false;
30 30
 	}
31 31
 
32
-	public function addPanel($title,$content){
33
-		return $this->addItem([$title,$content]);
32
+	public function addPanel($title, $content) {
33
+		return $this->addItem([$title, $content]);
34 34
 	}
35 35
 
36 36
 	/**
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 	 * @param string $action a Phalcon action
43 43
 	 * @param array $params
44 44
 	 */
45
-	public function forwardPanel(JsUtils $js,$title,$initialController,$controller,$action,$params=array()){
46
-		return $this->addPanel($title, $js->forward($initialController, $controller, $action,$params));
45
+	public function forwardPanel(JsUtils $js, $title, $initialController, $controller, $action, $params=array()) {
46
+		return $this->addPanel($title, $js->forward($initialController, $controller, $action, $params));
47 47
 	}
48 48
 
49 49
 	/**
@@ -54,30 +54,30 @@  discard block
 block discarded – undo
54 54
 	 * @param string $viewName
55 55
 	 * @param $params The parameters to pass to the view
56 56
 	 */
57
-	public function renderViewPanel(JsUtils $js,$title,$initialController, $viewName, $params=array()) {
58
-		return $this->addPanel($title, $js->renderContent($initialController, $viewName,$params));
57
+	public function renderViewPanel(JsUtils $js, $title, $initialController, $viewName, $params=array()) {
58
+		return $this->addPanel($title, $js->renderContent($initialController, $viewName, $params));
59 59
 	}
60 60
 	/*
61 61
 	 * (non-PHPdoc)
62 62
 	 * @see BaseHtml::run()
63 63
 	 */
64 64
 	public function run(JsUtils $js) {
65
-		if(isset($this->_bsComponent)===false)
66
-			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
65
+		if (isset($this->_bsComponent)===false)
66
+			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier, $this->params);
67 67
 			$this->addEventsOnRun($js);
68 68
 			return $this->_bsComponent;
69 69
 	}
70 70
 
71
-	public function setStyled(){
71
+	public function setStyled() {
72 72
 		return $this->addToProperty("class", "styled");
73 73
 	}
74 74
 
75
-	public function setActive($index){
75
+	public function setActive($index) {
76 76
 		$this->getItem($index)->setActive(true);
77 77
 		return $this;
78 78
 	}
79 79
 
80
-	public function setExclusive($value){
80
+	public function setExclusive($value) {
81 81
 		$this->params["exclusive"]=$value;
82 82
 	}
83 83
 }
84 84
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,9 @@
 block discarded – undo
62 62
 	 * @see BaseHtml::run()
63 63
 	 */
64 64
 	public function run(JsUtils $js) {
65
-		if(isset($this->_bsComponent)===false)
66
-			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
65
+		if(isset($this->_bsComponent)===false) {
66
+					$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
67
+		}
67 68
 			$this->addEventsOnRun($js);
68 69
 			return $this->_bsComponent;
69 70
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlModal.php 3 patches
Doc Comments   +9 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,9 @@  discard block
 block discarded – undo
14 14
 	protected $_params=array();
15 15
 	protected $_paramParts=array();
16 16
 
17
+	/**
18
+	 * @param string $identifier
19
+	 */
17 20
 	public function __construct($identifier, $header="", $content="", $actions=array()) {
18 21
 		parent::__construct($identifier, "div","ui modal");
19 22
 		if(isset($header)){
@@ -27,6 +30,9 @@  discard block
 block discarded – undo
27 30
 		}
28 31
 	}
29 32
 
33
+	/**
34
+	 * @param string $value
35
+	 */
30 36
 	public function setHeader($value) {
31 37
 		$this->content["header"]=new HtmlSemDoubleElement("header-" . $this->identifier, "a", "header", $value);
32 38
 		return $this;
@@ -103,6 +109,9 @@  discard block
 block discarded – undo
103 109
 		return $this->addElementInPart(new HtmlSemDoubleElement($part."-" . $this->identifier, "div", $uiClass, $content), $part);
104 110
 	}
105 111
 
112
+	/**
113
+	 * @param BaseHtml $element
114
+	 */
106 115
 	private function addElementInPart($element,$part) {
107 116
 		$this->content[$part]->addContent($element);
108 117
 		return $element;
@@ -145,7 +154,6 @@  discard block
 block discarded – undo
145 154
 	/**
146 155
 	 * render the content of $controller::$action and set the response to the modal content
147 156
 	 * @param JsUtils $js
148
-	 * @param string $title The panel title
149 157
 	 * @param Controller $initialControllerInstance
150 158
 	 * @param string $controllerName the controller name
151 159
 	 * @param string $actionName the action name
Please login to merge, or discard this patch.
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -15,120 +15,120 @@  discard block
 block discarded – undo
15 15
 	protected $_paramParts=array();
16 16
 
17 17
 	public function __construct($identifier, $header="", $content="", $actions=array()) {
18
-		parent::__construct($identifier, "div","ui modal");
19
-		if(isset($header)){
18
+		parent::__construct($identifier, "div", "ui modal");
19
+		if (isset($header)) {
20 20
 			$this->setHeader($header);
21 21
 		}
22
-		if(isset($content)){
22
+		if (isset($content)) {
23 23
 			$this->setContent($content);
24 24
 		}
25
-		if(isset($actions)){
25
+		if (isset($actions)) {
26 26
 			$this->setActions($actions);
27 27
 		}
28 28
 	}
29 29
 
30 30
 	public function setHeader($value) {
31
-		$this->content["header"]=new HtmlSemDoubleElement("header-" . $this->identifier, "a", "header", $value);
31
+		$this->content["header"]=new HtmlSemDoubleElement("header-".$this->identifier, "a", "header", $value);
32 32
 		return $this;
33 33
 	}
34 34
 
35 35
 	public function setContent($value) {
36
-		$this->content["content"]=new HtmlSemDoubleElement("content-" . $this->identifier, "div", "content", $value);
36
+		$this->content["content"]=new HtmlSemDoubleElement("content-".$this->identifier, "div", "content", $value);
37 37
 		return $this;
38 38
 	}
39 39
 
40 40
 	public function setActions($actions) {
41
-		$this->content["actions"]=new HtmlSemDoubleElement("content-" . $this->identifier, "div", "actions");
42
-		if(\is_array($actions)){
43
-			foreach ($actions as $action){
41
+		$this->content["actions"]=new HtmlSemDoubleElement("content-".$this->identifier, "div", "actions");
42
+		if (\is_array($actions)) {
43
+			foreach ($actions as $action) {
44 44
 				$this->addAction($action);
45 45
 			}
46 46
 		}
47
-		else{
47
+		else {
48 48
 			$this->addAction($actions);
49 49
 		}
50 50
 		return $this;
51 51
 	}
52 52
 
53
-	public function addAction($action){
54
-		if(!$action instanceof BaseHtml){
53
+	public function addAction($action) {
54
+		if (!$action instanceof BaseHtml) {
55 55
 			$class="";
56
-			if(\array_search($action, ["Okay","Yes"])!==false){
56
+			if (\array_search($action, ["Okay", "Yes"])!==false) {
57 57
 				$class="approve";
58 58
 			}
59
-			if(\array_search($action, ["Cancel","No"])!==false){
59
+			if (\array_search($action, ["Cancel", "No"])!==false) {
60 60
 				$class="cancel";
61 61
 			}
62
-			$action=new HtmlButton("action-".$this->identifier,$action);
63
-			if($class!=="")
62
+			$action=new HtmlButton("action-".$this->identifier, $action);
63
+			if ($class!=="")
64 64
 				$action->addToProperty("class", $class);
65 65
 		}
66 66
 		return $this->addElementInPart($action, "actions");
67 67
 	}
68 68
 
69
-	public function addContent($content,$before=false){
70
-		$this->content["content"]->addContent($content,$before);
69
+	public function addContent($content, $before=false) {
70
+		$this->content["content"]->addContent($content, $before);
71 71
 		return $this;
72 72
 	}
73 73
 
74
-	public function addImageContent($image,$description=NULL){
74
+	public function addImageContent($image, $description=NULL) {
75 75
 		$content=$this->content["content"];
76
-		if(isset($description)){
77
-			$description=new HtmlSemDoubleElement("description-".$this->identifier,"div","description",$description);
78
-			$content->addContent($description,true);
76
+		if (isset($description)) {
77
+			$description=new HtmlSemDoubleElement("description-".$this->identifier, "div", "description", $description);
78
+			$content->addContent($description, true);
79 79
 		}
80
-		if($image!==""){
81
-			$img=new HtmlImage("image-".$this->identifier,$image,"","medium");
82
-			$content->addContent($img,true);
83
-			$content->addToProperty("class","image");
80
+		if ($image!=="") {
81
+			$img=new HtmlImage("image-".$this->identifier, $image, "", "medium");
82
+			$content->addContent($img, true);
83
+			$content->addToProperty("class", "image");
84 84
 		}
85 85
 		return $this;
86 86
 	}
87 87
 
88
-	public function addIconContent($icon,$description=NULL){
88
+	public function addIconContent($icon, $description=NULL) {
89 89
 		$content=$this->content["content"];
90
-		if(isset($description)){
91
-			$description=new HtmlSemDoubleElement("description-".$this->identifier,"div","description",$description);
92
-			$content->addContent($description,true);
90
+		if (isset($description)) {
91
+			$description=new HtmlSemDoubleElement("description-".$this->identifier, "div", "description", $description);
92
+			$content->addContent($description, true);
93 93
 		}
94
-		if($icon!==""){
95
-			$img=new HtmlIcon("image-".$this->identifier,$icon);
96
-			$content->addContent($img,true);
97
-			$content->addToProperty("class","image");
94
+		if ($icon!=="") {
95
+			$img=new HtmlIcon("image-".$this->identifier, $icon);
96
+			$content->addContent($img, true);
97
+			$content->addToProperty("class", "image");
98 98
 		}
99 99
 		return $this;
100 100
 	}
101 101
 
102
-	private function addContentInPart($content,$uiClass,$part) {
103
-		return $this->addElementInPart(new HtmlSemDoubleElement($part."-" . $this->identifier, "div", $uiClass, $content), $part);
102
+	private function addContentInPart($content, $uiClass, $part) {
103
+		return $this->addElementInPart(new HtmlSemDoubleElement($part."-".$this->identifier, "div", $uiClass, $content), $part);
104 104
 	}
105 105
 
106
-	private function addElementInPart($element,$part) {
106
+	private function addElementInPart($element, $part) {
107 107
 		$this->content[$part]->addContent($element);
108 108
 		return $element;
109 109
 	}
110 110
 
111
-	public function showDimmer($value){
112
-		$value=$value?"show":"hide";
111
+	public function showDimmer($value) {
112
+		$value=$value ? "show" : "hide";
113 113
 		$this->_paramParts[]=["'".$value." dimmer'"];
114 114
 		return $this;
115 115
 	}
116 116
 
117
-	public function setInverted(){
117
+	public function setInverted() {
118 118
 		$this->_params["inverted"]=true;
119 119
 		return $this;
120 120
 	}
121 121
 
122
-	public function setBasic(){
122
+	public function setBasic() {
123 123
 		return $this->addToProperty("class", "basic");
124 124
 	}
125 125
 
126
-	public function setActive(){
126
+	public function setActive() {
127 127
 		return $this->addToProperty("class", "active");
128 128
 	}
129 129
 
130
-	public function setTransition($value){
131
-		$this->_paramParts[]=["'setting'","'transition'","'".$value."'"];
130
+	public function setTransition($value) {
131
+		$this->_paramParts[]=["'setting'", "'transition'", "'".$value."'"];
132 132
 	}
133 133
 
134 134
 	/**
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 	 * @param string $viewName
139 139
 	 * @param $params The parameters to pass to the view
140 140
 	 */
141
-	public function renderView(JsUtils $js,$initialController,$viewName, $params=array()) {
142
-		return $this->setContent($js->renderContent($initialController, $viewName,$params));
141
+	public function renderView(JsUtils $js, $initialController, $viewName, $params=array()) {
142
+		return $this->setContent($js->renderContent($initialController, $viewName, $params));
143 143
 	}
144 144
 
145 145
 	/**
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 	 * @param string $controllerName the controller name
151 151
 	 * @param string $actionName the action name
152 152
 	 */
153
-	public function forward(JsUtils $js,$initialControllerInstance,$controllerName,$actionName,$params=NULL){
154
-		return $this->setContent($js->forward($initialControllerInstance, $controllerName, $actionName,$params));
153
+	public function forward(JsUtils $js, $initialControllerInstance, $controllerName, $actionName, $params=NULL) {
154
+		return $this->setContent($js->forward($initialControllerInstance, $controllerName, $actionName, $params));
155 155
 	}
156 156
 
157 157
 	/**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
162 162
 	 */
163 163
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
164
-		$this->content=JArray::sortAssociative($this->content, ["header","content","actions" ]);
164
+		$this->content=JArray::sortAssociative($this->content, ["header", "content", "actions"]);
165 165
 		return parent::compile($js, $view);
166 166
 	}
167 167
 	/*
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
 	 * @see BaseHtml::run()
170 170
 	 */
171 171
 	public function run(JsUtils $js) {
172
-		if(isset($this->_bsComponent)===false)
173
-			$this->_bsComponent=$js->semantic()->modal("#".$this->identifier,$this->_params,$this->_paramParts);
172
+		if (isset($this->_bsComponent)===false)
173
+			$this->_bsComponent=$js->semantic()->modal("#".$this->identifier, $this->_params, $this->_paramParts);
174 174
 		$this->addEventsOnRun($js);
175 175
 		return $this->_bsComponent;
176 176
 	}
Please login to merge, or discard this patch.
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@  discard block
 block discarded – undo
43 43
 			foreach ($actions as $action){
44 44
 				$this->addAction($action);
45 45
 			}
46
-		}
47
-		else{
46
+		} else{
48 47
 			$this->addAction($actions);
49 48
 		}
50 49
 		return $this;
@@ -60,8 +59,9 @@  discard block
 block discarded – undo
60 59
 				$class="cancel";
61 60
 			}
62 61
 			$action=new HtmlButton("action-".$this->identifier,$action);
63
-			if($class!=="")
64
-				$action->addToProperty("class", $class);
62
+			if($class!=="") {
63
+							$action->addToProperty("class", $class);
64
+			}
65 65
 		}
66 66
 		return $this->addElementInPart($action, "actions");
67 67
 	}
@@ -169,8 +169,9 @@  discard block
 block discarded – undo
169 169
 	 * @see BaseHtml::run()
170 170
 	 */
171 171
 	public function run(JsUtils $js) {
172
-		if(isset($this->_bsComponent)===false)
173
-			$this->_bsComponent=$js->semantic()->modal("#".$this->identifier,$this->_params,$this->_paramParts);
172
+		if(isset($this->_bsComponent)===false) {
173
+					$this->_bsComponent=$js->semantic()->modal("#".$this->identifier,$this->_params,$this->_paramParts);
174
+		}
174 175
 		$this->addEventsOnRun($js);
175 176
 		return $this->_bsComponent;
176 177
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlProgress.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Ajax\semantic\html\base\HtmlSemDoubleElement;
6 6
 use Ajax\JsUtils;
7 7
 use Ajax\service\JArray;
8
-
9 8
 use Ajax\semantic\html\base\constants\State;
10 9
 
11 10
 class HtmlProgress extends HtmlSemDoubleElement {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -9,26 +9,26 @@  discard block
 block discarded – undo
9 9
 use Ajax\semantic\html\base\constants\State;
10 10
 
11 11
 class HtmlProgress extends HtmlSemDoubleElement {
12
-	private $_params=array ();
12
+	private $_params=array();
13 13
 
14 14
 	public function __construct($identifier, $value=NULL, $label=NULL, $attributes=array()) {
15 15
 		parent::__construct($identifier, "div", "ui progress");
16
-		if (isset($value) === true)
16
+		if (isset($value)===true)
17 17
 			$this->setProperty("data-percent", $value);
18 18
 		$this->createBar();
19
-		if (isset($label) === true)
19
+		if (isset($label)===true)
20 20
 			$this->setLabel($label);
21
-		$this->_states=[ State::SUCCESS,State::WARNING,State::ERROR,State::ACTIVE,State::DISABLED ];
21
+		$this->_states=[State::SUCCESS, State::WARNING, State::ERROR, State::ACTIVE, State::DISABLED];
22 22
 		$this->addToProperty("class", $attributes);
23 23
 	}
24 24
 
25 25
 	public function setLabel($label) {
26
-		$this->content["label"]=new HtmlSemDoubleElement("lbl-" . $this->identifier, "div", "label", $label);
26
+		$this->content["label"]=new HtmlSemDoubleElement("lbl-".$this->identifier, "div", "label", $label);
27 27
 		return $this;
28 28
 	}
29 29
 
30 30
 	private function createBar() {
31
-		$bar=new HtmlSemDoubleElement("bar-" . $this->identifier, "div", "bar", new HtmlSemDoubleElement("progress-" . $this->identifier, "div", "progress"));
31
+		$bar=new HtmlSemDoubleElement("bar-".$this->identifier, "div", "bar", new HtmlSemDoubleElement("progress-".$this->identifier, "div", "progress"));
32 32
 		$this->content["bar"]=$bar;
33 33
 		return $this;
34 34
 	}
@@ -68,20 +68,20 @@  discard block
 block discarded – undo
68 68
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
69 69
 	 */
70 70
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
71
-		$this->content=JArray::sortAssociative($this->content, [ "bar","label" ]);
71
+		$this->content=JArray::sortAssociative($this->content, ["bar", "label"]);
72 72
 		return parent::compile($js, $view);
73 73
 	}
74 74
 
75 75
 	public function jsSetValue($value) {
76
-		return '$("#' . $this->identifier . '").progress({value:' . $value . '});';
76
+		return '$("#'.$this->identifier.'").progress({value:'.$value.'});';
77 77
 	}
78 78
 
79 79
 	public function jsIncValue() {
80
-		return '$("#' . $this->identifier . '").progress("increment");';
80
+		return '$("#'.$this->identifier.'").progress("increment");';
81 81
 	}
82 82
 
83 83
 	public function jsDecValue() {
84
-		return '$("#' . $this->identifier . '").progress("decrement");';
84
+		return '$("#'.$this->identifier.'").progress("decrement");';
85 85
 	}
86 86
 
87 87
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 * @return HtmlProgress
96 96
 	 */
97 97
 	public function setTextValues($active=false, $error=false, $success=false, $warning=false, $percent="{percent}%", $ratio="{value} of {total}") {
98
-		if (\is_array($active) == true) {
98
+		if (\is_array($active)==true) {
99 99
 			$array=$active;
100 100
 			$active=JArray::getDefaultValue($array, "active", false);
101 101
 			$success=JArray::getDefaultValue($array, "success", $success);
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
 			$percent=JArray::getDefaultValue($array, "percent", $percent);
104 104
 			$ratio=JArray::getDefaultValue($array, "ratio", $ratio);
105 105
 		}
106
-		$this->_params["text"]="%{active  : " . \var_export($active, true) . ",error: " . \var_export($error, true) . ",success : " . \var_export($success, true) . ",warning : " . \var_export($warning, true) . ",percent : " . \var_export($percent, true) . ",ratio   : " . \var_export($ratio, true) . "}%";
106
+		$this->_params["text"]="%{active  : ".\var_export($active, true).",error: ".\var_export($error, true).",success : ".\var_export($success, true).",warning : ".\var_export($warning, true).",percent : ".\var_export($percent, true).",ratio   : ".\var_export($ratio, true)."}%";
107 107
 		return $this;
108 108
 	}
109 109
 
110 110
 	public function onChange($jsCode) {
111
-		return $this->_params["onChange"]="%function(percent, value, total){" . $jsCode . "}%";
111
+		return $this->_params["onChange"]="%function(percent, value, total){".$jsCode."}%";
112 112
 	}
113 113
 
114 114
 	/*
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
 	 * @see BaseHtml::run()
117 117
 	 */
118 118
 	public function run(JsUtils $js) {
119
-		if (isset($this->_bsComponent) === false)
120
-			$this->_bsComponent=$js->semantic()->progress("#" . $this->identifier, $this->_params);
119
+		if (isset($this->_bsComponent)===false)
120
+			$this->_bsComponent=$js->semantic()->progress("#".$this->identifier, $this->_params);
121 121
 		$this->addEventsOnRun($js);
122 122
 		return $this->_bsComponent;
123 123
 	}
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,11 +13,13 @@  discard block
 block discarded – undo
13 13
 
14 14
 	public function __construct($identifier, $value=NULL, $label=NULL, $attributes=array()) {
15 15
 		parent::__construct($identifier, "div", "ui progress");
16
-		if (isset($value) === true)
17
-			$this->setProperty("data-percent", $value);
16
+		if (isset($value) === true) {
17
+					$this->setProperty("data-percent", $value);
18
+		}
18 19
 		$this->createBar();
19
-		if (isset($label) === true)
20
-			$this->setLabel($label);
20
+		if (isset($label) === true) {
21
+					$this->setLabel($label);
22
+		}
21 23
 		$this->_states=[ State::SUCCESS,State::WARNING,State::ERROR,State::ACTIVE,State::DISABLED ];
22 24
 		$this->addToProperty("class", $attributes);
23 25
 	}
@@ -116,8 +118,9 @@  discard block
 block discarded – undo
116 118
 	 * @see BaseHtml::run()
117 119
 	 */
118 120
 	public function run(JsUtils $js) {
119
-		if (isset($this->_bsComponent) === false)
120
-			$this->_bsComponent=$js->semantic()->progress("#" . $this->identifier, $this->_params);
121
+		if (isset($this->_bsComponent) === false) {
122
+					$this->_bsComponent=$js->semantic()->progress("#" . $this->identifier, $this->_params);
123
+		}
121 124
 		$this->addEventsOnRun($js);
122 125
 		return $this->_bsComponent;
123 126
 	}
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticHtmlModulesTrait.php 2 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,6 @@
 block discarded – undo
30 30
 	/**
31 31
 	 *
32 32
 	 * @param string $identifier
33
-	 * @param int $rowCount
34
-	 * @param int $colCount
35 33
 	 * @return HtmlRating
36 34
 	 */
37 35
 	public function htmlRating($identifier, $value, $max, $icon="") {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,6 +78,6 @@
 block discarded – undo
78 78
 	 * @return HtmlModal
79 79
 	 */
80 80
 	public function htmlModal($identifier, $header="", $content="", $actions=array()) {
81
-		return $this->addHtmlComponent(new HtmlModal($identifier, $header,$content,$actions));
81
+		return $this->addHtmlComponent(new HtmlModal($identifier, $header, $content, $actions));
82 82
 	}
83 83
 }
84 84
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/Semantic.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 use Ajax\semantic\traits\SemanticHtmlViewsTrait;
25 25
 
26 26
 class Semantic extends BaseGui {
27
-	use SemanticComponentsTrait,SemanticHtmlElementsTrait,SemanticHtmlCollectionsTrait,
28
-	SemanticHtmlModulesTrait,SemanticHtmlViewsTrait;
27
+	use SemanticComponentsTrait, SemanticHtmlElementsTrait, SemanticHtmlCollectionsTrait,
28
+	SemanticHtmlModulesTrait, SemanticHtmlViewsTrait;
29 29
 
30 30
 	public function __construct($autoCompile=true) {
31 31
 		parent::__construct($autoCompile=true);
Please login to merge, or discard this patch.
Ajax/ui/properties/Animation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 	 * @param string $value default : swing
31 31
 	 */
32 32
 	public function setEasing($value) {
33
-		$this->setParamCtrl("easing", $value, array (
33
+		$this->setParamCtrl("easing", $value, array(
34 34
 				"linear",
35 35
 				"swing",
36 36
 				"easeInQuad",
Please login to merge, or discard this patch.