Completed
Push — master ( e6529d...cd0fd2 )
by Jean-Christophe
03:35
created
Ajax/semantic/html/base/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
 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/collections/HtmlMessage.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -24,38 +24,38 @@  discard block
 block discarded – undo
24 24
 		$this->setContent($content);
25 25
 	}
26 26
 
27
-	public function addHeader($header){
27
+	public function addHeader($header) {
28 28
 		$headerO=$header;
29
-		if(\is_string($header)){
30
-			$headerO=new HtmlSemDoubleElement("header-".$this->identifier,"div");
29
+		if (\is_string($header)) {
30
+			$headerO=new HtmlSemDoubleElement("header-".$this->identifier, "div");
31 31
 			$headerO->setClass("header");
32 32
 			$headerO->setContent($header);
33 33
 		}
34
-		return $this->addContent($headerO,true);
34
+		return $this->addContent($headerO, true);
35 35
 	}
36 36
 
37
-	public function addList($elements,$ordered=false){
38
-		$list=new HtmlList("list-".$this->identifier,$elements);
37
+	public function addList($elements, $ordered=false) {
38
+		$list=new HtmlList("list-".$this->identifier, $elements);
39 39
 		$list->setOrdered($ordered);
40 40
 		$list->setClass("ui list");
41 41
 		$this->addContent($list);
42 42
 	}
43 43
 
44
-	public function setIcon($icon){
44
+	public function setIcon($icon) {
45 45
 		$this->addToProperty("class", "icon");
46
-		$this->wrapContent("<div class='content'>","</div>");
46
+		$this->wrapContent("<div class='content'>", "</div>");
47 47
 		$this->icon=new HtmlIcon("icon-".$this->identifier, $icon);
48 48
 		return $this;
49 49
 	}
50 50
 
51
-	public function addLoader($loaderIcon="notched circle"){
51
+	public function addLoader($loaderIcon="notched circle") {
52 52
 		$this->setIcon($loaderIcon);
53 53
 		$this->icon->addToIcon("loading");
54 54
 		return $this;
55 55
 	}
56 56
 
57
-	public function setDismissable($dismiss=true){
58
-		if($dismiss===true)
57
+	public function setDismissable($dismiss=true) {
58
+		if ($dismiss===true)
59 59
 			$this->close=new HtmlIcon("close-".$this->identifier, "close");
60 60
 		else
61 61
 			$this->close=NULL;
@@ -66,28 +66,28 @@  discard block
 block discarded – undo
66 66
 	 * {@inheritDoc}
67 67
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
68 68
 	 */
69
-	public function run(JsUtils $js){
69
+	public function run(JsUtils $js) {
70 70
 		parent::run($js);
71
-		if(isset($this->close)){
71
+		if (isset($this->close)) {
72 72
 			$js->execOn("click", "#".$this->identifier." .close", "$(this).closest('.message').transition('fade')");
73 73
 		}
74 74
 	}
75 75
 
76
-	public function setState($visible=true){
77
-		$visible=($visible===true)?"visible":"hidden";
78
-		return $this->addToPropertyCtrl("class", $visible, array("visible","hidden"));
76
+	public function setState($visible=true) {
77
+		$visible=($visible===true) ? "visible" : "hidden";
78
+		return $this->addToPropertyCtrl("class", $visible, array("visible", "hidden"));
79 79
 	}
80 80
 
81
-	public function setVariation($value="floating"){
82
-		return $this->addToPropertyCtrl("class", $value, array("floating","compact"));
81
+	public function setVariation($value="floating") {
82
+		return $this->addToPropertyCtrl("class", $value, array("floating", "compact"));
83 83
 	}
84 84
 
85
-	public function setStyle($style){
85
+	public function setStyle($style) {
86 86
 		return $this->addToPropertyCtrl("class", $style, Style::getConstants());
87 87
 	}
88 88
 
89
-	public function setAttached(HtmlDoubleElement $toElement=NULL){
90
-		if(isset($toElement)){
89
+	public function setAttached(HtmlDoubleElement $toElement=NULL) {
90
+		if (isset($toElement)) {
91 91
 			$toElement->addToProperty("class", "attached");
92 92
 		}
93 93
 		return $this->addToProperty("class", "attached");
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,10 +55,11 @@
 block discarded – undo
55 55
 	}
56 56
 
57 57
 	public function setDismissable($dismiss=true){
58
-		if($dismiss===true)
59
-			$this->close=new HtmlIcon("close-".$this->identifier, "close");
60
-		else
61
-			$this->close=NULL;
58
+		if($dismiss===true) {
59
+					$this->close=new HtmlIcon("close-".$this->identifier, "close");
60
+		} else {
61
+					$this->close=NULL;
62
+		}
62 63
 		return $this;
63 64
 	}
64 65
 
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 		parent::__construct($identifier, "ul");
14 14
 		$this->addItems($items);
15 15
 	}
16
-	public function setOrdered($ordered=true){
17
-		$this->tagName=($ordered===true)?"ol":"ul";
16
+	public function setOrdered($ordered=true) {
17
+		$this->tagName=($ordered===true) ? "ol" : "ul";
18 18
 	}
19 19
 
20 20
 	/**
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/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/collections/HtmlMenu.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
 	protected $_tabsType="tabs";
21 21
 	protected $stacked="";
22 22
 
23
+	/**
24
+	 * @param string $identifier
25
+	 */
23 26
 	public function __construct($identifier, $tagName="ul") {
24 27
 		parent::__construct($identifier, $tagName);
25 28
 		$this->_template="<%tagName% %properties%>%tabs%</%tagName%>%content%";
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	public function __construct($identifier, $items=array()) {
16 16
 		parent::__construct($identifier, "div");
17 17
 		$this->setClass("ui menu");
18
-		foreach ($items as $item){
18
+		foreach ($items as $item) {
19 19
 			$this->addItem($item);
20 20
 		}
21 21
 	}
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
 	 * @param string $type one of text,item
26 26
 	 * @return \Ajax\semantic\html\collections\HtmlMenu
27 27
 	 */
28
-	public function setType($type=""){
29
-		return $this->addToPropertyCtrl("class", $type, array("","item","text"));
28
+	public function setType($type="") {
29
+		return $this->addToPropertyCtrl("class", $type, array("", "item", "text"));
30 30
 	}
31 31
 
32
-	public function setActiveItem($index){
32
+	public function setActiveItem($index) {
33 33
 		$item=$this->getItem($index);
34
-		if($item!==null){
34
+		if ($item!==null) {
35 35
 			$item->addToProperty("class", "active");
36 36
 		}
37 37
 		return $this;
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 * {@inheritDoc}
42 42
 	 * @see \Ajax\common\html\html5\HtmlCollection::addItem()
43 43
 	 */
44
-	public function addItem($item){
44
+	public function addItem($item) {
45 45
 		$item=parent::addItem($item);
46 46
 		$item->addToProperty("class", "item");
47 47
 	}
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
 	 * @see \Ajax\common\html\html5\HtmlCollection::createItem()
51 51
 	 */
52 52
 	protected function createItem($value) {
53
-		$itemO=new HtmlLink("item-".\sizeof($this->content),"",$value);
53
+		$itemO=new HtmlLink("item-".\sizeof($this->content), "", $value);
54 54
 		return $itemO->setClass("item");
55 55
 	}
56 56
 
57
-	public function setInverted(){
57
+	public function setInverted() {
58 58
 		return $this->addToProperty("class", "inverted");
59 59
 	}
60 60
 }
61 61
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlPopup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 class HtmlPopup extends HtmlSemDoubleElement {
11 11
 	private $params;
12 12
 	private $_container;
13
-	public function __construct(BaseHtml $container,$identifier, $content="") {
13
+	public function __construct(BaseHtml $container, $identifier, $content="") {
14 14
 		parent::__construct($identifier, "div");
15 15
 		$this->_container=$container;
16 16
 		$this->setClass("ui popup");
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 		$this->params=array("on"=>"click");
19 19
 	}
20 20
 
21
-	public function setFlowing(){
21
+	public function setFlowing() {
22 22
 		$this->addToProperty("class", "flowing");
23 23
 	}
24 24
 
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 	 * {@inheritDoc}
27 27
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
28 28
 	 */
29
-	public function run(JsUtils $js){
29
+	public function run(JsUtils $js) {
30 30
 		$this->params["popup"]="#".$this->identifier;
31
-		$js->semantic()->popup("#".$this->_container->getIdentifier(),$this->params);
31
+		$js->semantic()->popup("#".$this->_container->getIdentifier(), $this->params);
32 32
 	}
33 33
 }
34 34
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/components/Popup.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 		return $this->setParam("onShow", "%function(){".$jsCode."}%");
31 31
 	}
32 32
 
33
-	public function setExclusive($value){
33
+	public function setExclusive($value) {
34 34
 		return $this->setParam("exclusive", $value);
35 35
 	}
36 36
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 * @param string $popup the css selector of the popup
40 40
 	 * @return \Ajax\semantic\components\Popup
41 41
 	 */
42
-	public function setPopup($popup){
42
+	public function setPopup($popup) {
43 43
 		return $this->setParam("popup", $popup);
44 44
 	}
45 45
 	//TODO other events implementation
Please login to merge, or discard this patch.
Ajax/semantic/html/base/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;
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.