Completed
Push — master ( 525ea5...e3c757 )
by Jean-Christophe
03:48
created
Ajax/semantic/html/collections/form/traits/TextFieldsTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,11 +5,11 @@
 block discarded – undo
5 5
 trait TextFieldsTrait {
6 6
 
7 7
 	public abstract function getField();
8
-	public function setPlaceholder($value){
8
+	public function setPlaceholder($value) {
9 9
 		return $this->getField()->setPlaceholder($value);
10 10
 	}
11 11
 
12
-	public function setValue($value){
12
+	public function setValue($value) {
13 13
 		return $this->getField()->setValue($value);
14 14
 	}
15 15
 }
16 16
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlPopup.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 class HtmlPopup extends HtmlSemDoubleElement {
13 13
 	private $_params;
14 14
 	private $_container;
15
-	public function __construct(BaseHtml $container,$identifier, $content="") {
15
+	public function __construct(BaseHtml $container, $identifier, $content="") {
16 16
 		parent::__construct($identifier, "div");
17 17
 		$this->_container=$container;
18 18
 		$this->setClass("ui popup");
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 		$this->_params=array("on"=>"hover");
21 21
 	}
22 22
 
23
-	public function addList($items=array(),$header=NULL){
24
-		if(!$this->content instanceof HtmlGrid){
25
-			$this->content=new HtmlGrid("Grid-".$this->identifier,0);
23
+	public function addList($items=array(), $header=NULL) {
24
+		if (!$this->content instanceof HtmlGrid) {
25
+			$this->content=new HtmlGrid("Grid-".$this->identifier, 0);
26 26
 		}
27 27
 		$grid=$this->content;
28 28
 
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 		$colCount++;
31 31
 		$grid->setColsCount($colCount);
32 32
 
33
-		$list=new HtmlList("",$items);
33
+		$list=new HtmlList("", $items);
34 34
 		$list->asLink();
35
-		if(isset($header)){
36
-			$list->addHeader(4,$header);
35
+		if (isset($header)) {
36
+			$list->addHeader(4, $header);
37 37
 		}
38
-		$grid->getCell(0,$colCount-1)->setContent($list);
38
+		$grid->getCell(0, $colCount-1)->setContent($list);
39 39
 		$grid->setDivided()->setRelaxed(true);
40 40
 		return $list;
41 41
 	}
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 	/**
44 44
 	 * A popup can have no maximum width and continue to flow to fit its content
45 45
 	 */
46
-	public function setFlowing(){
46
+	public function setFlowing() {
47 47
 		return $this->addToProperty("class", "flowing");
48 48
 	}
49 49
 
50 50
 	/**
51 51
 	 * A popup can provide more basic formatting
52 52
 	 */
53
-	public function setBasic(){
53
+	public function setBasic() {
54 54
 		return $this->addToProperty("class", "basic");
55 55
 	}
56 56
 
@@ -58,22 +58,22 @@  discard block
 block discarded – undo
58 58
 	 * {@inheritDoc}
59 59
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
60 60
 	 */
61
-	public function run(JsUtils $js){
61
+	public function run(JsUtils $js) {
62 62
 		$this->_params["popup"]="#".$this->identifier;
63
-		$js->semantic()->popup("#".$this->_container->getIdentifier(),$this->_params);
63
+		$js->semantic()->popup("#".$this->_container->getIdentifier(), $this->_params);
64 64
 	}
65 65
 
66
-	public function setOn($event="click"){
66
+	public function setOn($event="click") {
67 67
 		$this->_params["on"]=$event;
68 68
 		return $this;
69 69
 	}
70 70
 
71
-	public function setInline($value=true){
71
+	public function setInline($value=true) {
72 72
 		$this->_params["inline"]=$value;
73 73
 		return $this;
74 74
 	}
75 75
 
76
-	public function setPosition($position){
76
+	public function setPosition($position) {
77 77
 		$this->_params["position"]=$position;
78 78
 		return $this;
79 79
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlImage.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,8 +12,9 @@  discard block
 block discarded – undo
12 12
 		$image=new HtmlImg("img-", $src, $alt);
13 13
 		$image->setClass("");
14 14
 		parent::__construct($identifier, "div", "ui image", $image);
15
-		if (isset($size))
16
-			$this->setSize($size);
15
+		if (isset($size)) {
16
+					$this->setSize($size);
17
+		}
17 18
 	}
18 19
 
19 20
 	public function setCircular() {
@@ -21,8 +22,9 @@  discard block
 block discarded – undo
21 22
 	}
22 23
 
23 24
 	public function asAvatar($caption=NULL) {
24
-		if (isset($caption))
25
-			$this->wrap("", $caption);
25
+		if (isset($caption)) {
26
+					$this->wrap("", $caption);
27
+		}
26 28
 		return $this->addToProperty("class", "avatar");
27 29
 	}
28 30
 
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
 }
10 10
\ No newline at end of file
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
 }
7 7
\ No newline at end of file
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
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	}
49 49
 
50 50
 	public function addDimmer($params=array(), $content=NULL) {
51
-		$dimmer=new HtmlDimmer("dimmer-" . $this->identifier, $content);
51
+		$dimmer=new HtmlDimmer("dimmer-".$this->identifier, $content);
52 52
 		$dimmer->setParams($params);
53 53
 		$dimmer->setContainer($this);
54 54
 		$this->addContent($dimmer);
@@ -57,20 +57,20 @@  discard block
 block discarded – undo
57 57
 
58 58
 	public function addLabel($label, $before=false, $icon=NULL) {
59 59
 		$labelO=$label;
60
-		if (\is_object($label) === false) {
61
-			$labelO=new HtmlLabel("label-" . $this->identifier, $label);
60
+		if (\is_object($label)===false) {
61
+			$labelO=new HtmlLabel("label-".$this->identifier, $label);
62 62
 			if (isset($icon))
63 63
 				$labelO->addIcon($icon);
64
-		} else {
65
-			$labelO->addToPropertyCtrl("class", "label", array ("label" ));
64
+		}else {
65
+			$labelO->addToPropertyCtrl("class", "label", array("label"));
66 66
 		}
67 67
 		$this->addContent($labelO, $before);
68 68
 		return $labelO;
69 69
 	}
70 70
 
71
-	public function attachLabel($label,$side,$direction=Direction::NONE,$icon=NULL){
72
-		$label=$this->addLabel($label,true,$icon);
73
-		$label->setAttached($side,$direction);
71
+	public function attachLabel($label, $side, $direction=Direction::NONE, $icon=NULL) {
72
+		$label=$this->addLabel($label, true, $icon);
73
+		$label->setAttached($side, $direction);
74 74
 		return $this;
75 75
 	}
76 76
 
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
 
87 87
 	public function jsShowDimmer($show=true) {
88 88
 		$status="hide";
89
-		if ($show === true)
89
+		if ($show===true)
90 90
 			$status="show";
91
-		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
91
+		return '$("#.'.$this->identifier.').dimmer("'.$status.'");';
92 92
 	}
93 93
 
94 94
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	}
99 99
 
100 100
 	public function run(JsUtils $js) {
101
-		$this->_bsComponent=$js->semantic()->generic("#" . $this->identifier);
101
+		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
102 102
 		parent::run($js);
103 103
 		$this->addEventsOnRun($js);
104 104
 		if (isset($this->_popup)) {
Please login to merge, or discard this patch.
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@  discard block
 block discarded – undo
31 31
 	}
32 32
 
33 33
 	public function setPopupAttributes($variation=NULL, $popupEvent=NULL) {
34
-		if (isset($this->_popup))
35
-			$this->_popup->setAttributes($variation, $popupEvent);
34
+		if (isset($this->_popup)) {
35
+					$this->_popup->setAttributes($variation, $popupEvent);
36
+		}
36 37
 	}
37 38
 
38 39
 	public function addPopup($title="", $content="", $variation=NULL, $params=array()) {
@@ -59,8 +60,9 @@  discard block
 block discarded – undo
59 60
 		$labelO=$label;
60 61
 		if (\is_object($label) === false) {
61 62
 			$labelO=new HtmlLabel("label-" . $this->identifier, $label);
62
-			if (isset($icon))
63
-				$labelO->addIcon($icon);
63
+			if (isset($icon)) {
64
+							$labelO->addIcon($icon);
65
+			}
64 66
 		} else {
65 67
 			$labelO->addToPropertyCtrl("class", "label", array ("label" ));
66 68
 		}
@@ -79,21 +81,24 @@  discard block
 block discarded – undo
79 81
 	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
80 82
 	 */
81 83
 	public function asLink($href=NULL) {
82
-		if (isset($href))
83
-			$this->setProperty("href", $href);
84
+		if (isset($href)) {
85
+					$this->setProperty("href", $href);
86
+		}
84 87
 		return $this->setTagName("a");
85 88
 	}
86 89
 
87 90
 	public function jsShowDimmer($show=true) {
88 91
 		$status="hide";
89
-		if ($show === true)
90
-			$status="show";
92
+		if ($show === true) {
93
+					$status="show";
94
+		}
91 95
 		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
92 96
 	}
93 97
 
94 98
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
95
-		if (isset($this->_popup))
96
-			$this->_popup->compile();
99
+		if (isset($this->_popup)) {
100
+					$this->_popup->compile();
101
+		}
97 102
 		return parent::compile($js, $view);
98 103
 	}
99 104
 
Please login to merge, or discard this patch.
Ajax/common/components/SimpleExtComponent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
 use Ajax\common\JsCode;
7 7
 
8 8
 class SimpleExtComponent extends SimpleComponent {
9
-	protected $events=array ();
10
-	protected $jsCodes=array ();
9
+	protected $events=array();
10
+	protected $jsCodes=array();
11 11
 
12 12
 	public function addEvent($event, $jsCode) {
13 13
 		$this->events [$event]=$jsCode;
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
 
16 16
 	public function getScript() {
17 17
 		parent::getScript();
18
-		foreach ( $this->jsCodes as $jsCode ) {
19
-			$this->jquery_code_for_compile []=$jsCode->compile(array (
18
+		foreach ($this->jsCodes as $jsCode) {
19
+			$this->jquery_code_for_compile []=$jsCode->compile(array(
20 20
 					"identifier" => $this->attachTo
21 21
 			));
22 22
 		}
Please login to merge, or discard this patch.
Ajax/common/components/GenericComponent.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
 	 * @see \Ajax\common\components\SimpleExtComponent::getScript()
12 12
 	 */
13 13
 	public function getScript() {
14
-		$this->jquery_code_for_compile=array ();
15
-		foreach ( $this->jsCodes as $jsCode ) {
16
-			$this->jquery_code_for_compile []=$jsCode->compile(array (
14
+		$this->jquery_code_for_compile=array();
15
+		foreach ($this->jsCodes as $jsCode) {
16
+			$this->jquery_code_for_compile []=$jsCode->compile(array(
17 17
 					"identifier" => $this->attachTo
18 18
 			));
19 19
 		}
Please login to merge, or discard this patch.