Passed
Push — master ( bb9729...87cc87 )
by Jean-Christophe
03:10
created
Ajax/semantic/html/modules/HtmlShape.php 2 patches
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function getSideContent($index){
54 54
 		$item= $this->getItem($index);
55
-		if(isset($item))
56
-			return $item->getContent();
55
+		if(isset($item)) {
56
+					return $item->getContent();
57
+		}
57 58
 		return null;
58 59
 	}
59 60
 
@@ -147,15 +148,17 @@  discard block
 block discarded – undo
147 148
 	 * @see BaseHtml::run()
148 149
 	 */
149 150
 	public function run(JsUtils $js) {
150
-		if (isset($this->_bsComponent) === false)
151
-			$this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params);
151
+		if (isset($this->_bsComponent) === false) {
152
+					$this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params);
153
+		}
152 154
 		$this->addEventsOnRun($js);
153 155
 		return $this->_bsComponent;
154 156
 	}
155 157
 
156 158
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
157
-		if($this->_autoActive)
158
-			$this->setActiveSide(0);
159
+		if($this->_autoActive) {
160
+					$this->setActiveSide(0);
161
+		}
159 162
 		return parent::compile($js,$view);
160 163
 	}
161 164
 }
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
 use Ajax\common\html\BaseHtml;
9 9
 
10 10
 
11
-class HtmlShape extends HtmlSemCollection{
11
+class HtmlShape extends HtmlSemCollection {
12 12
 
13 13
 	protected $_params=array();
14 14
 	protected $_autoActive=true;
15 15
 
16
-	public function __construct( $identifier, $sides){
17
-		parent::__construct( $identifier, "div", "ui shape");
16
+	public function __construct($identifier, $sides) {
17
+		parent::__construct($identifier, "div", "ui shape");
18 18
 		$this->_template='<%tagName% id="%identifier%" %properties%><div class="sides">%wrapContentBefore%%content%%wrapContentAfter%</div></%tagName%>';
19 19
 		$this->addItems($sides);
20 20
 	}
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	 * {@inheritDoc}
24 24
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
25 25
 	 */
26
-	protected function createItem($value){
27
-		if(\is_object($value)===false){
28
-			$value=new HtmlSemDoubleElement("","div","content",$value);
26
+	protected function createItem($value) {
27
+		if (\is_object($value)===false) {
28
+			$value=new HtmlSemDoubleElement("", "div", "content", $value);
29 29
 		}
30 30
 		return new HtmlShapeItem("side-".$this->identifier."-".$this->count(), $value);
31 31
 	}
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 * {@inheritDoc}
35 35
 	 * @see \Ajax\common\html\HtmlCollection::createCondition()
36 36
 	 */
37
-	protected function createCondition($value){
37
+	protected function createCondition($value) {
38 38
 		return ($value instanceof HtmlShapeItem)===false;
39 39
 	}
40 40
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 * @param int $index
43 43
 	 * @return \Ajax\semantic\html\content\HtmlShapeItem
44 44
 	 */
45
-	public function getSide($index){
45
+	public function getSide($index) {
46 46
 		return $this->getItem($index);
47 47
 	}
48 48
 
@@ -50,96 +50,96 @@  discard block
 block discarded – undo
50 50
 	 * @param int $index
51 51
 	 * @return mixed|NULL
52 52
 	 */
53
-	public function getSideContent($index){
54
-		$item= $this->getItem($index);
55
-		if(isset($item))
53
+	public function getSideContent($index) {
54
+		$item=$this->getItem($index);
55
+		if (isset($item))
56 56
 			return $item->getContent();
57 57
 		return null;
58 58
 	}
59 59
 
60
-	public function jsDo($action){
60
+	public function jsDo($action) {
61 61
 		return "$('#".$this->identifier."').shape('".$action."');";
62 62
 	}
63 63
 
64
-	public function jsFlipLeft(){
64
+	public function jsFlipLeft() {
65 65
 		return $this->jsDo("flip left");
66 66
 	}
67 67
 
68
-	public function jsFlipRight(){
68
+	public function jsFlipRight() {
69 69
 		return $this->jsDo("flip right");
70 70
 	}
71 71
 
72
-	public function jsFlipUp(){
72
+	public function jsFlipUp() {
73 73
 		return $this->jsDo("flip up");
74 74
 	}
75 75
 
76
-	public function jsFlipDown(){
76
+	public function jsFlipDown() {
77 77
 		return $this->jsDo("flip down");
78 78
 	}
79 79
 
80
-	public function jsFlipOver(){
80
+	public function jsFlipOver() {
81 81
 		return $this->jsDo("flip over");
82 82
 	}
83 83
 
84
-	public function jsFlipBack(){
84
+	public function jsFlipBack() {
85 85
 		return $this->jsDo("flip back");
86 86
 	}
87 87
 
88
-	private function doActionOn($element,$event,$what){
89
-		if($element instanceof BaseHtml){
90
-			return $element->on($event, $what,true,true);
88
+	private function doActionOn($element, $event, $what) {
89
+		if ($element instanceof BaseHtml) {
90
+			return $element->on($event, $what, true, true);
91 91
 		}
92 92
 	}
93 93
 
94
-	public function flipLeftOn($element,$event){
94
+	public function flipLeftOn($element, $event) {
95 95
 		return $this->doActionOn($element, $event, $this->jsFlipLeft());
96 96
 	}
97 97
 
98
-	public function flipRightOn($element,$event){
98
+	public function flipRightOn($element, $event) {
99 99
 		return $this->doActionOn($element, $event, $this->jsFlipRight());
100 100
 	}
101 101
 
102
-	public function flipUpOn($element,$event){
102
+	public function flipUpOn($element, $event) {
103 103
 		return $this->doActionOn($element, $event, $this->jsFlipUp());
104 104
 	}
105 105
 
106
-	public function flipDownOn($element,$event){
106
+	public function flipDownOn($element, $event) {
107 107
 		return $this->doActionOn($element, $event, $this->jsFlipDown());
108 108
 	}
109 109
 
110
-	public function flipBackOn($element,$event){
110
+	public function flipBackOn($element, $event) {
111 111
 		return $this->doActionOn($element, $event, $this->jsFlipBack());
112 112
 	}
113 113
 
114
-	public function flipOverOn($element,$event){
114
+	public function flipOverOn($element, $event) {
115 115
 		return $this->doActionOn($element, $event, $this->jsFlipOver());
116 116
 	}
117 117
 
118
-	public function setActiveSide($index){
118
+	public function setActiveSide($index) {
119 119
 		$side=$this->getSide($index);
120
-		if(isset($side)){
120
+		if (isset($side)) {
121 121
 			$side->setActive(true);
122 122
 		}
123 123
 		return $this;
124 124
 	}
125 125
 
126
-	public function asCube(){
126
+	public function asCube() {
127 127
 		return $this->addToPropertyCtrl("class", "cube", ["cube"]);
128 128
 	}
129 129
 
130
-	public function asText(){
130
+	public function asText() {
131 131
 		return $this->addToPropertyCtrl("class", "text", ["text"]);
132 132
 	}
133 133
 
134
-	public function setWidth($width="initial"){
134
+	public function setWidth($width="initial") {
135 135
 		$this->_params["width"]=$width;
136 136
 	}
137
-	public function onChange($jsCode){
138
-		return $this->_params["onChange"]="%function(){" . $jsCode . "}%";
137
+	public function onChange($jsCode) {
138
+		return $this->_params["onChange"]="%function(){".$jsCode."}%";
139 139
 	}
140 140
 
141
-	public function beforeChange($jsCode){
142
-		return $this->_params["beforeChange"]="%function(){" . $jsCode . "}%";
141
+	public function beforeChange($jsCode) {
142
+		return $this->_params["beforeChange"]="%function(){".$jsCode."}%";
143 143
 	}
144 144
 
145 145
 	/*
@@ -147,15 +147,15 @@  discard block
 block discarded – undo
147 147
 	 * @see BaseHtml::run()
148 148
 	 */
149 149
 	public function run(JsUtils $js) {
150
-		if (isset($this->_bsComponent) === false)
151
-			$this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params);
150
+		if (isset($this->_bsComponent)===false)
151
+			$this->_bsComponent=$js->semantic()->shape("#".$this->identifier, $this->_params);
152 152
 		$this->addEventsOnRun($js);
153 153
 		return $this->_bsComponent;
154 154
 	}
155 155
 
156 156
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
157
-		if($this->_autoActive)
157
+		if ($this->_autoActive)
158 158
 			$this->setActiveSide(0);
159
-		return parent::compile($js,$view);
159
+		return parent::compile($js, $view);
160 160
 	}
161 161
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/SegmentType.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 SegmentType extends BaseEnum {
8
-	const RAISED="raised",STACKED="stacked",PILED="piled",NORMAL="";
8
+	const RAISED="raised", STACKED="stacked", PILED="piled", NORMAL="";
9 9
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Side.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 Side extends BaseEnum {
8
-	const BOTTOM="bottom",BOTH="",TOP="top";
8
+	const BOTTOM="bottom", BOTH="", TOP="top";
9 9
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Wide.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 namespace Ajax\semantic\html\base\constants;
3 3
 	use Ajax\common\BaseEnum;
4 4
 abstract class Wide extends BaseEnum {
5
-	const W1="one", W2="two", W3="three", W4="four",W5="five", W6="six", W7="seven", W8="eight",W9="nine",W10="ten",W11="eleven",W12="twelve",W13="thirteen",W14="fourteen",W15="fifteen",W16="sixteen";
5
+	const W1="one", W2="two", W3="three", W4="four", W5="five", W6="six", W7="seven", W8="eight", W9="nine", W10="ten", W11="eleven", W12="twelve", W13="thirteen", W14="fourteen", W15="fifteen", W16="sixteen";
6 6
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/VerticalAlignment.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
 class VerticalAlignment extends BaseEnum {
8
-	const TOP="top",MIDDLE="middle",BOTTOM="bottom";
8
+	const TOP="top", MIDDLE="middle", BOTTOM="bottom";
9 9
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Style.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 Style extends BaseEnum {
8
-	const INFO="info",SUCCESS="success",POSITIVE="positive",WARNING="warning",ERROR="error",NEGATIVE="negative";
8
+	const INFO="info", SUCCESS="success", POSITIVE="positive", WARNING="warning", ERROR="error", NEGATIVE="negative";
9 9
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Emphasis.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 Emphasis extends BaseEnum {
8
-	const PRIMARY="primary",SECONDARY="secondary",TERTIARY="tertiary";
8
+	const PRIMARY="primary", SECONDARY="secondary", TERTIARY="tertiary";
9 9
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Transition.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@
 block discarded – undo
3 3
 use Ajax\common\BaseEnum;
4 4
 abstract class Transition extends BaseEnum {
5 5
 	const SCALE="scale",
6
-	FADE="fade",FADE_UP="fadeUp",FADE_DOWN="fadeDown",FADE_LEFT="fadeLeft",FADE_RIGHT="fadeRight",
7
-	HORIZONTAL_FLIP="horizontalFlip",VERTICAL_FLIP="verticalFlip",
6
+	FADE="fade", FADE_UP="fadeUp", FADE_DOWN="fadeDown", FADE_LEFT="fadeLeft", FADE_RIGHT="fadeRight",
7
+	HORIZONTAL_FLIP="horizontalFlip", VERTICAL_FLIP="verticalFlip",
8 8
 	DROP="drop",
9
-	FLY_LEFT="flyLeft",FLY_RIGHT="flyRight",FLY_UP="flyUp",FLY_DOWN="flyDown",
10
-	SWING_LEFT="swingLeft",SWING_RIGHT="swingRight",SWING_UP="swingUp",SWING_DOWN="swingDown",
11
-	BROWSE="browse",BROWSE_RIGHT="browseRight",
12
-	SLIDE_LEFT="slideLeft",SLIDE_RIGHT="slideRight",SLIDE_UP="slideUp",SLIDE_DOWN="slideDown",
13
-	JIGGLE="jiggle",FLASH="flash",SHAKE="shake",PULSE="pulse",TADA="tada",BOUNCE="bounce";
9
+	FLY_LEFT="flyLeft", FLY_RIGHT="flyRight", FLY_UP="flyUp", FLY_DOWN="flyDown",
10
+	SWING_LEFT="swingLeft", SWING_RIGHT="swingRight", SWING_UP="swingUp", SWING_DOWN="swingDown",
11
+	BROWSE="browse", BROWSE_RIGHT="browseRight",
12
+	SLIDE_LEFT="slideLeft", SLIDE_RIGHT="slideRight", SLIDE_UP="slideUp", SLIDE_DOWN="slideDown",
13
+	JIGGLE="jiggle", FLASH="flash", SHAKE="shake", PULSE="pulse", TADA="tada", BOUNCE="bounce";
14 14
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Sens.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 namespace Ajax\semantic\html\base\constants;
3 3
 	use Ajax\common\BaseEnum;
4 4
 abstract class Sens extends BaseEnum {
5
-	const VERTICAL="vertical", HORIZONTAL="horizontal",NONE="";
5
+	const VERTICAL="vertical", HORIZONTAL="horizontal", NONE="";
6 6
 }
Please login to merge, or discard this patch.