Completed
Push — master ( 541276...03d1b2 )
by Jean-Christophe
03:16
created
Ajax/semantic/html/elements/HtmlButtonGroups.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -11,36 +11,36 @@  discard block
 block discarded – undo
11 11
  */
12 12
 class HtmlButtonGroups extends HtmlSemDoubleElement {
13 13
 
14
-	public function __construct($identifier, $elements=array(),$asIcons=false) {
14
+	public function __construct($identifier, $elements=array(), $asIcons=false) {
15 15
 		parent::__construct($identifier, "div");
16 16
 		$this->setProperty("class", "ui buttons");
17 17
 		$this->content=array();
18
-		if($asIcons===true)
18
+		if ($asIcons===true)
19 19
 			$this->asIcons();
20
-		$this->addElements($elements,$asIcons);
20
+		$this->addElements($elements, $asIcons);
21 21
 	}
22
-	public function addElement($element,$asIcon=false){
22
+	public function addElement($element, $asIcon=false) {
23 23
 		$elementO=$element;
24
-		if(\is_string($element)){
25
-			if($asIcon){
24
+		if (\is_string($element)) {
25
+			if ($asIcon) {
26 26
 				$elementO=new HtmlButton("button-".\sizeof($this->content));
27 27
 				$elementO->asIcon($element);
28 28
 			}else
29
-				$elementO=new HtmlButton("button-".\sizeof($this->content),$element);
29
+				$elementO=new HtmlButton("button-".\sizeof($this->content), $element);
30 30
 		}
31 31
 		$this->addContent($elementO);
32 32
 	}
33 33
 
34 34
 
35
-	public function addElements($elements,$asIcons=false) {
36
-		foreach ( $elements as $element ) {
37
-			$this->addElement($element,$asIcons);
35
+	public function addElements($elements, $asIcons=false) {
36
+		foreach ($elements as $element) {
37
+			$this->addElement($element, $asIcons);
38 38
 		}
39 39
 		return $this;
40 40
 	}
41 41
 
42
-	public function insertOr($aferIndex=0,$or="OR"){
43
-		$orElement=new HtmlSemDoubleElement("or-".$this->identifier,"div");
42
+	public function insertOr($aferIndex=0, $or="OR") {
43
+		$orElement=new HtmlSemDoubleElement("or-".$this->identifier, "div");
44 44
 		$orElement->setClass("or");
45 45
 		$orElement->setProperty("data-text", $or);
46 46
 		array_splice($this->content, $aferIndex+1, 0, array($orElement));
@@ -54,15 +54,15 @@  discard block
 block discarded – undo
54 54
 		$this->addElements($array);
55 55
 	}
56 56
 
57
-	public function asIcons(){
57
+	public function asIcons() {
58 58
 		return $this->addToProperty("class", "icons");
59 59
 	}
60 60
 
61
-	public function setVertical(){
61
+	public function setVertical() {
62 62
 		return $this->addToProperty("class", "vertical");
63 63
 	}
64 64
 
65
-	public function setLabeled(){
65
+	public function setLabeled() {
66 66
 		return $this->addToProperty("class", "labeled icon");
67 67
 	}
68 68
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
91 91
 	 */
92 92
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
93
-		foreach ( $this->content as $element ) {
93
+		foreach ($this->content as $element) {
94 94
 			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
95 95
 		}
96 96
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/base/Size.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 Size extends BaseEnum {
5
-	const MINI="mini", TINY="tiny", SMALL="small", MEDIUM="",LARGE="large", BIG="big", HUGE="huge", MASSIVE="massive";
5
+	const MINI="mini", TINY="tiny", SMALL="small", MEDIUM="", LARGE="large", BIG="big", HUGE="huge", MASSIVE="massive";
6 6
 }
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlInput.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 class HtmlInput extends HtmlSingleElement {
8 8
 
9
-	public function __construct($identifier,$type="text") {
9
+	public function __construct($identifier, $type="text") {
10 10
 		parent::__construct($identifier, "input");
11 11
 		$this->setProperty("name", $identifier);
12 12
 		$this->setProperty("value", "");
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 SimpleBsComponent 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/BaseComponent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
  * @version 1.001
11 11
  */
12 12
 abstract class BaseComponent {
13
-	public $jquery_code_for_compile=array ();
14
-	protected $params=array ();
13
+	public $jquery_code_for_compile=array();
14
+	protected $params=array();
15 15
 	
16 16
 	/**
17 17
 	 *
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		if (is_array($typeCtrl)) {
60 60
 			if (array_search($value, $typeCtrl)===false)
61 61
 				throw new \Exception("La valeur passée a propriété `".$key."` ne fait pas partie des valeurs possibles : {".implode(",", $typeCtrl)."}");
62
-		} else {
62
+		}else {
63 63
 			if (!$typeCtrl($value)) {
64 64
 				throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$key);
65 65
 			}
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	}
69 69
 
70 70
 	public function setParams($params) {
71
-		foreach ( $params as $k => $v ) {
71
+		foreach ($params as $k => $v) {
72 72
 			$method="set".ucfirst($k);
73 73
 			if (method_exists($this, $method))
74 74
 				$this->$method($v);
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
@@ -9,9 +9,9 @@
 block discarded – undo
9 9
 	 * @see \Ajax\bootstrap\components\SimpleBsComponent::getScript()
10 10
 	 */
11 11
 	public function getScript() {
12
-		$this->jquery_code_for_compile=array ();
13
-		foreach ( $this->jsCodes as $jsCode ) {
14
-			$this->jquery_code_for_compile []=$jsCode->compile(array (
12
+		$this->jquery_code_for_compile=array();
13
+		foreach ($this->jsCodes as $jsCode) {
14
+			$this->jquery_code_for_compile []=$jsCode->compile(array(
15 15
 					"identifier" => $this->attachTo 
16 16
 			));
17 17
 		}
Please login to merge, or discard this patch.
Ajax/common/components/SimpleComponent.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 
17 17
 	public function __construct(JsUtils $js) {
18 18
 		parent::__construct($js);
19
-		$this->events=array ();
19
+		$this->events=array();
20 20
 	}
21 21
 
22 22
 	protected function compileEvents() {
23
-		foreach ( $this->events as $event => $jsCode ) {
23
+		foreach ($this->events as $event => $jsCode) {
24 24
 			$this->jquery_code_for_compile []="$( \"".$this->attachTo."\" ).on(\"".$event."\" , function( event, data ) {".$jsCode."});";
25 25
 		}
26 26
 	}
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		$result=implode("\n", $this->jquery_code_for_compile);
30 30
 		$result=str_ireplace("\"%", "", $result);
31 31
 		$result=str_ireplace("%\"", "", $result);
32
-		$result=str_replace(array (
32
+		$result=str_replace(array(
33 33
 				"\\n",
34 34
 				"\\r",
35 35
 				"\\t" 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
 	public function getScript() {
41 41
 		$allParams=$this->params;
42
-		$this->jquery_code_for_compile=array ();
42
+		$this->jquery_code_for_compile=array();
43 43
 		$this->jquery_code_for_compile []="$( \"".$this->attachTo."\" ).{$this->uiName}(".$this->getParamsAsJSON($allParams).");";
44 44
 		$this->compileEvents();
45 45
 		return $this->compileJQueryCode();
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		if (is_array($typeCtrl)) {
67 67
 			if (array_search($value, $typeCtrl)===false)
68 68
 				throw new \Exception("La valeur passée a propriété `".$key."` pour le composant `".$this->uiName."` ne fait pas partie des valeurs possibles : {".implode(",", $typeCtrl)."}");
69
-		} else {
69
+		}else {
70 70
 			if (!$typeCtrl($value)) {
71 71
 				throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$key." au composant ".$this->uiName);
72 72
 			}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlLabel.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
 
9 9
 class HtmlLabel extends HtmlSemDoubleElement {
10 10
 
11
-	public function __construct($identifier,$caption="",$tagName="div") {
12
-		parent::__construct($identifier,$tagName);
11
+	public function __construct($identifier, $caption="", $tagName="div") {
12
+		parent::__construct($identifier, $tagName);
13 13
 		$this->setProperty("class", "ui label");
14 14
 		$this->content=$caption;
15 15
 	}
@@ -18,26 +18,26 @@  discard block
 block discarded – undo
18 18
 	 * @param string $side
19 19
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
20 20
 	 */
21
-	public function setPointing($side=""){
22
-		return $this->addToPropertyCtrl("class", $side." pointing",array("right pointing","left pointing"," pointing"));
21
+	public function setPointing($side="") {
22
+		return $this->addToPropertyCtrl("class", $side." pointing", array("right pointing", "left pointing", " pointing"));
23 23
 	}
24 24
 
25 25
 	/**
26 26
 	 * @param string $side
27 27
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
28 28
 	 */
29
-	public function toCorner($side="left"){
30
-		return $this->addToPropertyCtrl("class", $side." corner",array("right corner","left corner"));
29
+	public function toCorner($side="left") {
30
+		return $this->addToPropertyCtrl("class", $side." corner", array("right corner", "left corner"));
31 31
 	}
32 32
 
33 33
 	/**
34 34
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
35 35
 	 */
36
-	public function asTag(){
36
+	public function asTag() {
37 37
 		return $this->addToProperty("class", "tag");
38 38
 	}
39 39
 
40
-	public function setBasic(){
40
+	public function setBasic() {
41 41
 		return $this->addToProperty("class", "basic");
42 42
 	}
43 43
 
@@ -48,17 +48,17 @@  discard block
 block discarded – undo
48 48
 	 * @param string $before
49 49
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
50 50
 	 */
51
-	public function addImage($src,$alt="",$before=true){
51
+	public function addImage($src, $alt="", $before=true) {
52 52
 		$this->addToProperty("class", "image");
53
-		return $this->addContent(new HtmlImg("image-".$this->identifier,$src,$alt),$before);
53
+		return $this->addContent(new HtmlImg("image-".$this->identifier, $src, $alt), $before);
54 54
 	}
55 55
 
56 56
 	/**
57 57
 	 * @param string $detail
58 58
 	 * @return \Ajax\common\html\HtmlDoubleElement
59 59
 	 */
60
-	public function addDetail($detail){
61
-		$div=new HtmlDoubleElement("detail-".$this->identifier,$this->tagName);
60
+	public function addDetail($detail) {
61
+		$div=new HtmlDoubleElement("detail-".$this->identifier, $this->tagName);
62 62
 		$div->setClass("detail");
63 63
 		$div->setContent($detail);
64 64
 		$this->addContent($div);
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlContainer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
 		$this->setProperty("class", "ui container");
18 18
 	}
19 19
 
20
-	public function setAlignement($value="justified"){
21
-		if($value!=="justified")
20
+	public function setAlignement($value="justified") {
21
+		if ($value!=="justified")
22 22
 			$value.=" aligned";
23 23
 		return $this->addToProperty("class", $value);
24 24
 	}
25 25
 
26
-	public function setTextContainer(){
26
+	public function setTextContainer() {
27 27
 		return $this->addToProperty("class", "text");
28 28
 	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.