Completed
Push — master ( 195df7...541276 )
by Jean-Christophe
03:05
created
Ajax/semantic/html/base/HtmlSemDoubleElement.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	 * {@inheritDoc}
21 21
 	 * @see \Ajax\common\html\HtmlSingleElement::setSize()
22 22
 	 */
23
-	public function setSize($size){
23
+	public function setSize($size) {
24 24
 		return $this->addToPropertyCtrl("class", $size, Size::getConstants());
25 25
 	}
26 26
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * show it is currently unable to be interacted with
29 29
 	 * @return \Ajax\semantic\html\elements\HtmlSemDoubleElement
30 30
 	 */
31
-	public function setDisabled(){
31
+	public function setDisabled() {
32 32
 		return $this->addToProperty("class", "disabled");
33 33
 	}
34 34
 
@@ -36,28 +36,28 @@  discard block
 block discarded – undo
36 36
 	 * @param string $color
37 37
 	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
38 38
 	 */
39
-	public function setColor($color){
40
-		return $this->addToPropertyCtrl("class", $color,Color::getConstants());
39
+	public function setColor($color) {
40
+		return $this->addToPropertyCtrl("class", $color, Color::getConstants());
41 41
 	}
42 42
 
43
-	public function setPopupAttributes($variation=NULL,$popupEvent=NULL){
44
-		if(isset($this->_popup))
45
-			$this->_popup->setAttributes($variation,$popupEvent);
43
+	public function setPopupAttributes($variation=NULL, $popupEvent=NULL) {
44
+		if (isset($this->_popup))
45
+			$this->_popup->setAttributes($variation, $popupEvent);
46 46
 	}
47 47
 
48
-	public function addPopup($title="",$content="",$variation=NULL,$params=array()){
49
-		$this->_popup=new InternalPopup($this,$title,$content,$variation,$params);
48
+	public function addPopup($title="", $content="", $variation=NULL, $params=array()) {
49
+		$this->_popup=new InternalPopup($this, $title, $content, $variation, $params);
50 50
 		return $this;
51 51
 	}
52 52
 
53
-	public function addPopupHtml($html="",$variation=NULL,$params=array()){
53
+	public function addPopupHtml($html="", $variation=NULL, $params=array()) {
54 54
 		$this->_popup=new InternalPopup($this);
55 55
 		$this->_popup->setHtml($html);
56
-		$this->_popup->setAttributes($variation,$params);
56
+		$this->_popup->setAttributes($variation, $params);
57 57
 		return $this;
58 58
 	}
59 59
 
60
-	public function setFluid(){
60
+	public function setFluid() {
61 61
 		$this->addToProperty("class", "fluid");
62 62
 	}
63 63
 
@@ -68,16 +68,16 @@  discard block
 block discarded – undo
68 68
 	 * @param boolean $labeled
69 69
 	 * @return \Ajax\semantic\html\elements\HtmlIcon
70 70
 	 */
71
-	public function addIcon($icon,$before=true,$labeled=false){
71
+	public function addIcon($icon, $before=true, $labeled=false) {
72 72
 		$iconO=$icon;
73
-		if(\is_string($icon)){
73
+		if (\is_string($icon)) {
74 74
 			$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
75 75
 		}
76
-		if($labeled!==false){
76
+		if ($labeled!==false) {
77 77
 			$this->addToProperty("class", "labeled icon");
78 78
 			$this->tagName="div";
79 79
 		}
80
-		$this->addContent($iconO,$before);
80
+		$this->addContent($iconO, $before);
81 81
 		return $iconO;
82 82
 	}
83 83
 
@@ -85,18 +85,18 @@  discard block
 block discarded – undo
85 85
 	 * show a loading indicator
86 86
 	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
87 87
 	 */
88
-	public function asLoader(){
88
+	public function asLoader() {
89 89
 		return $this->addToProperty("class", "loading");
90 90
 	}
91 91
 
92
-	public function compile(JsUtils $js=NULL, View $view=NULL){
93
-		if(isset($this->_popup))
92
+	public function compile(JsUtils $js=NULL, View $view=NULL) {
93
+		if (isset($this->_popup))
94 94
 			$this->_popup->compile();
95
-		return parent::compile($js,$view);
95
+		return parent::compile($js, $view);
96 96
 	}
97
-	public function run(JsUtils $js){
97
+	public function run(JsUtils $js) {
98 98
 		parent::run($js);
99
-		if(isset($this->_popup)){
99
+		if (isset($this->_popup)) {
100 100
 			$this->_popup->run($js);
101 101
 			//$this->addEventsOnRun($js);
102 102
 			//return $this->_bsComponent;
Please login to merge, or discard this patch.
Ajax/semantic/html/base/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
 class SegmentType extends BaseEnum {
8
-	const RAISED="raised",STACKED="stacked",PILED="piled",NORMAL="";
8
+	const RAISED="raised", STACKED="stacked", PILED="piled", NORMAL="";
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlButton.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -47,20 +47,20 @@  discard block
 block discarded – undo
47 47
 	 * @return \Ajax\semantic\html\HtmlButton default : ""
48 48
 	 */
49 49
 	public function setStyle($cssStyle) {
50
-		return $this->addToProperty("class",$cssStyle);
50
+		return $this->addToProperty("class", $cssStyle);
51 51
 	}
52 52
 
53
-	public function setFocusable(){
53
+	public function setFocusable() {
54 54
 		$this->setProperty("tabindex", "0");
55 55
 	}
56 56
 
57
-	public function setAnimated($content,$animation=""){
57
+	public function setAnimated($content, $animation="") {
58 58
 		$this->setTagName("div");
59 59
 		$this->addToProperty("class", "animated ".$animation);
60
-		$visible=new HtmlSemDoubleElement("visible-".$this->identifier,"div");
60
+		$visible=new HtmlSemDoubleElement("visible-".$this->identifier, "div");
61 61
 		$visible->setClass("visible content");
62 62
 		$visible->setContent($this->content);
63
-		$hidden=new HtmlSemDoubleElement("hidden-".$this->identifier,"div");
63
+		$hidden=new HtmlSemDoubleElement("hidden-".$this->identifier, "div");
64 64
 		$hidden->setClass("hidden content");
65 65
 		$hidden->setContent($content);
66 66
 		$this->content=$visible.$hidden;
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
 	 * @param string|HtmlIcon $icon
71 71
 	 * @return \Ajax\semantic\html\elements\HtmlButton
72 72
 	 */
73
-	public function asIcon($icon){
73
+	public function asIcon($icon) {
74 74
 		$iconO=$icon;
75
-		if(\is_string($icon)){
75
+		if (\is_string($icon)) {
76 76
 			$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
77 77
 		}
78 78
 		$this->addToProperty("class", "icon");
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
 	 * @param string $before
87 87
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
88 88
 	 */
89
-	public function addLabel($caption,$before=false){
89
+	public function addLabel($caption, $before=false) {
90 90
 		$this->tagName="div";
91 91
 		$this->addToProperty("class", "labeled");
92
-		$this->content=new HtmlButton("button-".$this->identifier,$this->content);
92
+		$this->content=new HtmlButton("button-".$this->identifier, $this->content);
93 93
 		$this->content->setTagName("div");
94
-		$label=new HtmlLabel("label-".$this->identifier,$caption,"a");
94
+		$label=new HtmlLabel("label-".$this->identifier, $caption, "a");
95 95
 		$label->setBasic();
96
-		$this->addContent($label,$before);
96
+		$this->addContent($label, $before);
97 97
 		return $label;
98 98
 	}
99 99
 	/*
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	public function fromArray($array) {
104 104
 		$array=parent::fromArray($array);
105
-		foreach ( $array as $key => $value ) {
105
+		foreach ($array as $key => $value) {
106 106
 			$this->setProperty($key, $value);
107 107
 		}
108 108
 		return $array;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	 * can be formatted to appear on dark backgrounds
113 113
 	 * @return \Ajax\semantic\html\elements\HtmlButton
114 114
 	 */
115
-	public function setInverted(){
115
+	public function setInverted() {
116 116
 		return $this->addToProperty("class", "inverted");
117 117
 	}
118 118
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	 *  show it is currently the active user selection
121 121
 	 * @return \Ajax\semantic\html\elements\HtmlButton
122 122
 	 */
123
-	public function setActive(){
123
+	public function setActive() {
124 124
 		return $this->addToProperty("class", "active");
125 125
 	}
126 126
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	 * hint towards a positive consequence
129 129
 	 * @return \Ajax\semantic\html\elements\HtmlButton
130 130
 	 */
131
-	public function setPositive(){
131
+	public function setPositive() {
132 132
 		return $this->addToProperty("class", "positive");
133 133
 	}
134 134
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 * hint towards a negative consequence
137 137
 	 * @return \Ajax\semantic\html\elements\HtmlButton
138 138
 	 */
139
-	public function setNegative(){
139
+	public function setNegative() {
140 140
 		return $this->addToProperty("class", "negative");
141 141
 	}
142 142
 
@@ -144,14 +144,14 @@  discard block
 block discarded – undo
144 144
 	 * formatted to toggle on/off
145 145
 	 * @return \Ajax\semantic\html\elements\HtmlButton
146 146
 	 */
147
-	public function setToggle(){
147
+	public function setToggle() {
148 148
 		return $this->addToProperty("class", "toggle");
149 149
 	}
150 150
 
151 151
 	/**
152 152
 	 * @return \Ajax\semantic\html\elements\HtmlButton
153 153
 	 */
154
-	public function setCircular(){
154
+	public function setCircular() {
155 155
 		return $this->addToProperty("class", "circular");
156 156
 	}
157 157
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	 *  button is less pronounced
160 160
 	 * @return \Ajax\semantic\html\elements\HtmlButton
161 161
 	 */
162
-	public function setBasic(){
162
+	public function setBasic() {
163 163
 		return $this->addToProperty("class", "basic");
164 164
 	}
165 165
 }
166 166
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlSegmentGroups.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,18 +5,18 @@  discard block
 block discarded – undo
5 5
 use Ajax\common\html\html5\HtmlCollection;
6 6
 use Ajax\semantic\html\base\SegmentType;
7 7
 
8
-class HtmlSegmentGroups extends HtmlCollection{
8
+class HtmlSegmentGroups extends HtmlCollection {
9 9
 
10 10
 
11
-	public function __construct( $identifier, $items=array()){
12
-		parent::__construct( $identifier, "div");
11
+	public function __construct($identifier, $items=array()) {
12
+		parent::__construct($identifier, "div");
13 13
 		$this->setClass("ui segments");
14 14
 		$this->addItems($items);
15 15
 	}
16 16
 
17 17
 
18
-	protected function createItem($value){
19
-		return new HtmlSegment("segment-".$this->count(),$value);
18
+	protected function createItem($value) {
19
+		return new HtmlSegment("segment-".$this->count(), $value);
20 20
 	}
21 21
 
22 22
 	/**
@@ -24,17 +24,17 @@  discard block
 block discarded – undo
24 24
 	 * @param string $type one of "raised","stacked","piled" default : ""
25 25
 	 * @return \Ajax\semantic\html\elements\HtmlSegmentGroups
26 26
 	 */
27
-	public function setType($type){
27
+	public function setType($type) {
28 28
 		return $this->addToPropertyCtrl("class", $type, SegmentType::getConstants());
29 29
 	}
30 30
 
31
-	public function setSens($sens="vertical"){
32
-		return $this->addToPropertyCtrl("class", $sens, array("vertical","horizontal"));
31
+	public function setSens($sens="vertical") {
32
+		return $this->addToPropertyCtrl("class", $sens, array("vertical", "horizontal"));
33 33
 	}
34 34
 
35 35
 
36
-	public static function group($identifier,$items=array(),$type="",$sens="vertical"){
37
-		$group=new HtmlSegmentGroups($identifier,$items);
36
+	public static function group($identifier, $items=array(), $type="", $sens="vertical") {
37
+		$group=new HtmlSegmentGroups($identifier, $items);
38 38
 		$group->setSens($sens);
39 39
 		return $group->setType($type);
40 40
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlSegment.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -24,47 +24,47 @@
 block discarded – undo
24 24
 	 * @param string $type one of "raised","stacked","piled" default : ""
25 25
 	 * @return \Ajax\semantic\html\elements\HtmlSegment
26 26
 	 */
27
-	public function setType($type){
27
+	public function setType($type) {
28 28
 		return $this->addToPropertyCtrl("class", $type, SegmentType::getConstants());
29 29
 	}
30 30
 
31
-	public function setSens($sens="vertical"){
32
-		return $this->addToPropertyCtrl("class", $sens, array("vertical","horizontal"));
31
+	public function setSens($sens="vertical") {
32
+		return $this->addToPropertyCtrl("class", $sens, array("vertical", "horizontal"));
33 33
 	}
34 34
 
35
-	public function setInverted(){
35
+	public function setInverted() {
36 36
 		return $this->addToProperty("class", "inverted");
37 37
 	}
38 38
 
39
-	public function setAttached(){
39
+	public function setAttached() {
40 40
 		return $this->addToProperty("class", "attached");
41 41
 	}
42 42
 
43
-	public function setEmphasis($value="secondary"){
44
-		return $this->addToPropertyCtrl("class", $value, array("secondary","tertiary",""));
43
+	public function setEmphasis($value="secondary") {
44
+		return $this->addToPropertyCtrl("class", $value, array("secondary", "tertiary", ""));
45 45
 	}
46 46
 
47
-	public function setCircular(){
47
+	public function setCircular() {
48 48
 		return $this->addToProperty("class", "circular");
49 49
 	}
50 50
 
51
-	public function clear(){
51
+	public function clear() {
52 52
 		return $this->addToProperty("class", "clearing");
53 53
 	}
54 54
 
55
-	public function setFloating($value="left"){
56
-		return $this->addToPropertyCtrl("class", "floated ".$value,array("floated right","floated left"));
55
+	public function setFloating($value="left") {
56
+		return $this->addToPropertyCtrl("class", "floated ".$value, array("floated right", "floated left"));
57 57
 	}
58 58
 
59
-	public function setTextAlignment($value="left"){
60
-		return $this->addToPropertyCtrl("class", "aligned ".$value,array("aligned right","aligned left","aligned center"));
59
+	public function setTextAlignment($value="left") {
60
+		return $this->addToPropertyCtrl("class", "aligned ".$value, array("aligned right", "aligned left", "aligned center"));
61 61
 	}
62 62
 
63
-	public function setCompact(){
63
+	public function setCompact() {
64 64
 		return $this->addToProperty("class", "compact");
65 65
 	}
66 66
 
67
-	public function setBasic(){
67
+	public function setBasic() {
68 68
 		return $this->setProperty("class", "ui basic segment");
69 69
 	}
70 70
 
Please login to merge, or discard this patch.
Ajax/Semantic.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * @param string $identifier
56 56
 	 * @param string $icon
57 57
 	 */
58
-	public function htmlIcon($identifier,$icon){
58
+	public function htmlIcon($identifier, $icon) {
59 59
 		return $this->addHtmlComponent(new HtmlIcon($identifier, $icon));
60 60
 	}
61 61
 
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
 	 * @param string $size
65 65
 	 * @param array $icons
66 66
 	 */
67
-	public function htmlIconGroups($identifier,$size="",$icons=array()){
68
-		$group=new HtmlIconGroups($identifier,$size);
69
-		if(JArray::isAssociative($icons)){
70
-			foreach ($icons as $icon=>$size){
71
-				$group->add($icon,$size);
67
+	public function htmlIconGroups($identifier, $size="", $icons=array()) {
68
+		$group=new HtmlIconGroups($identifier, $size);
69
+		if (JArray::isAssociative($icons)) {
70
+			foreach ($icons as $icon=>$size) {
71
+				$group->add($icon, $size);
72 72
 			}
73
-		}else{
74
-			foreach ($icons as $icon){
73
+		}else {
74
+			foreach ($icons as $icon) {
75 75
 				$group->add($icon);
76 76
 			}
77 77
 		}
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
 	 * @param array $elements
84 84
 	 * @param boolean $asIcons
85 85
 	 */
86
-	public function htmlButtonGroups($identifier,$elements=array(),$asIcons=false){
87
-		return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements,$asIcons));
86
+	public function htmlButtonGroups($identifier, $elements=array(), $asIcons=false) {
87
+		return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements, $asIcons));
88 88
 	}
89 89
 
90 90
 	/**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	 * @param string $identifier
93 93
 	 * @param string $content
94 94
 	 */
95
-	public function htmlContainer($identifier,$content=""){
95
+	public function htmlContainer($identifier, $content="") {
96 96
 		return $this->addHtmlComponent(new HtmlContainer($identifier, $content));
97 97
 	}
98 98
 
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
 	 * @param string $identifier
101 101
 	 * @param string $content
102 102
 	 */
103
-	public function htmlDivider($identifier,$content="",$tagName="div"){
104
-		return $this->addHtmlComponent(new HtmlDivider($identifier, $content,$tagName));
103
+	public function htmlDivider($identifier, $content="", $tagName="div") {
104
+		return $this->addHtmlComponent(new HtmlDivider($identifier, $content, $tagName));
105 105
 	}
106 106
 
107 107
 	/**
@@ -109,16 +109,16 @@  discard block
 block discarded – undo
109 109
 	 * @param string $content
110 110
 	 * @param string $tagName
111 111
 	 */
112
-	public function htmlLabel($identifier,$content="",$tagName="div"){
113
-		return $this->addHtmlComponent(new HtmlLabel($identifier, $content,$tagName));
112
+	public function htmlLabel($identifier, $content="", $tagName="div") {
113
+		return $this->addHtmlComponent(new HtmlLabel($identifier, $content, $tagName));
114 114
 	}
115 115
 
116 116
 	/**
117 117
 	 * @param string $identifier
118 118
 	 * @param array $items
119 119
 	 */
120
-	public function htmlMenu($identifier,$items=array()){
121
-		return $this->addHtmlComponent(new HtmlMenu($identifier,$items));
120
+	public function htmlMenu($identifier, $items=array()) {
121
+		return $this->addHtmlComponent(new HtmlMenu($identifier, $items));
122 122
 	}
123 123
 
124 124
 	/**
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 	 * @param string $value
127 127
 	 * @param array $items
128 128
 	 */
129
-	public function htmlDropdown($identifier, $value="", $items=array()){
130
-		return $this->addHtmlComponent(new HtmlDropdown($identifier,$value,$items));
129
+	public function htmlDropdown($identifier, $value="", $items=array()) {
130
+		return $this->addHtmlComponent(new HtmlDropdown($identifier, $value, $items));
131 131
 	}
132 132
 
133 133
 	/**
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 	 * @param string $identifier
136 136
 	 * @param string $content
137 137
 	 */
138
-	public function htmlMessage($identifier, $content=""){
139
-		return $this->addHtmlComponent(new HtmlMessage($identifier,$content));
138
+	public function htmlMessage($identifier, $content="") {
139
+		return $this->addHtmlComponent(new HtmlMessage($identifier, $content));
140 140
 	}
141 141
 
142 142
 	/**
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
 	 * @param string $identifier
145 145
 	 * @param string $content
146 146
 	 */
147
-	public function htmlSegment($identifier, $content=""){
148
-		return $this->addHtmlComponent(new HtmlSegment($identifier,$content));
147
+	public function htmlSegment($identifier, $content="") {
148
+		return $this->addHtmlComponent(new HtmlSegment($identifier, $content));
149 149
 	}
150 150
 
151 151
 	/**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 * @param string $identifier
154 154
 	 * @param array $items the segments
155 155
 	 */
156
-	public function htmlSegmentGroups($identifier, $items=array()){
157
-		return $this->addHtmlComponent(new HtmlSegmentGroups($identifier,$items));
156
+	public function htmlSegmentGroups($identifier, $items=array()) {
157
+		return $this->addHtmlComponent(new HtmlSegmentGroups($identifier, $items));
158 158
 	}
159 159
 }
160 160
\ No newline at end of file
Please login to merge, or discard this patch.