Completed
Push — master ( f20dfb...faaf91 )
by Jean-Christophe
02:55
created
Ajax/semantic/html/elements/HtmlIcon.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 	protected $attributes;
18 18
 	protected $color;
19 19
 
20
-	public function __construct($identifier,$icon) {
20
+	public function __construct($identifier, $icon) {
21 21
 		parent::__construct($identifier, "i");
22 22
 		$this->icon=$icon;
23 23
 		$this->_template='<i class="%icon% icon %size% %attributes% %color%"></i>';
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 	 * @see \Ajax\common\html\HtmlSingleElement::setSize()
43 43
 	 */
44 44
 	public function setSize($size) {
45
-		$this->setMemberCtrl($this->size, $size,Size::getConstants());
45
+		$this->setMemberCtrl($this->size, $size, Size::getConstants());
46 46
 		return $this;
47 47
 	}
48 48
 
49
-	public function setDisabled(){
49
+	public function setDisabled() {
50 50
 		return $this->addToMember($this->attributes, "disabled");
51 51
 	}
52 52
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 *  Icon used as a simple loader
55 55
 	 * @return \Ajax\semantic\html\HtmlIcon
56 56
 	 */
57
-	public function asLoader(){
57
+	public function asLoader() {
58 58
 		return $this->addToMember($this->attributes, "loading");
59 59
 	}
60 60
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 * An icon can be fitted, without any space to the left or right of it.
63 63
 	 * @return \Ajax\semantic\html\HtmlIcon
64 64
 	 */
65
-	public function setFitted(){
65
+	public function setFitted() {
66 66
 		return $this->addToMember($this->attributes, "fitted");
67 67
 	}
68 68
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 * @param string $sens horizontally or vertically
71 71
 	 * @return \Ajax\semantic\html\HtmlIcon
72 72
 	 */
73
-	public function setFlipped($sens="horizontally"){
73
+	public function setFlipped($sens="horizontally") {
74 74
 		return $this->addToMember($this->attributes, "flipped ".$sens);
75 75
 	}
76 76
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 * @param string $sens clockwise or counterclockwise
79 79
 	 * @return \Ajax\semantic\html\HtmlIcon
80 80
 	 */
81
-	public function setRotated($sens="clockwise"){
81
+	public function setRotated($sens="clockwise") {
82 82
 		return $this->addToMember($this->attributes, "rotated ".$sens);
83 83
 	}
84 84
 
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
 	 * icon formatted as a link
87 87
 	 * @return \Ajax\semantic\html\HtmlIcon
88 88
 	 */
89
-	public function asLink(){
89
+	public function asLink() {
90 90
 		return $this->addToMember($this->attributes, "link");
91 91
 	}
92 92
 
93
-	public function setCircular($inverted=false){
93
+	public function setCircular($inverted=false) {
94 94
 		$invertedStr="";
95
-		if($inverted!==false)
95
+		if ($inverted!==false)
96 96
 			$invertedStr=" inverted";
97 97
 		return $this->addToMember($this->attributes, "circular".$invertedStr);
98 98
 	}
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	/**
101 101
 	 * @return \Ajax\semantic\html\HtmlIcon
102 102
 	 */
103
-	public function setInverted(){
103
+	public function setInverted() {
104 104
 		return $this->addToMember($this->attributes, "inverted");
105 105
 	}
106 106
 
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 	 * @param string $inverted
109 109
 	 * @return \Ajax\semantic\html\HtmlIcon
110 110
 	 */
111
-	public function setBordered($inverted=false){
111
+	public function setBordered($inverted=false) {
112 112
 		$invertedStr="";
113
-		if($inverted!==false)
113
+		if ($inverted!==false)
114 114
 			$invertedStr=" inverted";
115 115
 			return $this->addToMember($this->attributes, "bordered".$invertedStr);
116 116
 	}
@@ -119,14 +119,14 @@  discard block
 block discarded – undo
119 119
 	 * @param string $color
120 120
 	 * @return \Ajax\semantic\html\HtmlIcon
121 121
 	 */
122
-	public function setColor($color){
122
+	public function setColor($color) {
123 123
 		return $this->setMemberCtrl($this->color, $color, Color::getConstants());
124 124
 	}
125 125
 
126 126
 	/**
127 127
 	 * @return \Ajax\semantic\html\HtmlIcon
128 128
 	 */
129
-	public function toCorner(){
129
+	public function toCorner() {
130 130
 		return $this->addToMember($this->attributes, "corner");
131 131
 	}
132 132
 }
133 133
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlDivider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 class HtmlDivider extends HtmlDoubleElement {
13 13
 
14
-	public function __construct($identifier, $content="",$tagName="div") {
14
+	public function __construct($identifier, $content="", $tagName="div") {
15 15
 		parent::__construct($identifier, $tagName);
16 16
 		$this->setClass("ui divider");
17 17
 		$this->content=$content;
@@ -21,23 +21,23 @@  discard block
 block discarded – undo
21 21
 	 * vertical divider
22 22
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
23 23
 	 */
24
-	public function setVertical(){
25
-		return $this->addToPropertyUnique("class", "vertical", array("vertical","horizontal"));
24
+	public function setVertical() {
25
+		return $this->addToPropertyUnique("class", "vertical", array("vertical", "horizontal"));
26 26
 	}
27 27
 
28 28
 	/**
29 29
 	 * horizontal divider
30 30
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
31 31
 	 */
32
-	public function setHorizontal(){
33
-		return $this->addToPropertyUnique("class", "horizontal", array("vertical","horizontal"));
32
+	public function setHorizontal() {
33
+		return $this->addToPropertyUnique("class", "horizontal", array("vertical", "horizontal"));
34 34
 	}
35 35
 
36 36
 	/**
37 37
 	 * hide the divider
38 38
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
39 39
 	 */
40
-	public function setHidden(){
40
+	public function setHidden() {
41 41
 		return $this->addToProperty("class", "hidden");
42 42
 	}
43 43
 
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
 	 * fitted, without any space above or below it
46 46
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
47 47
 	 */
48
-	public function setFitted(){
48
+	public function setFitted() {
49 49
 		return $this->addToProperty("class", "fitted");
50 50
 	}
51 51
 
52 52
 	/**
53 53
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
54 54
 	 */
55
-	public function asHeader(){
55
+	public function asHeader() {
56 56
 		return $this->addToProperty("class", "header");
57 57
 	}
58 58
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 * inverts the divider colors
61 61
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
62 62
 	 */
63
-	public function setInverted(){
63
+	public function setInverted() {
64 64
 		return $this->addToProperty("class", "inverted");
65 65
 	}
66 66
 }
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
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/Semantic.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 * @param string $identifier
53 53
 	 * @param string $icon
54 54
 	 */
55
-	public function htmlIcon($identifier,$icon){
55
+	public function htmlIcon($identifier, $icon) {
56 56
 		return $this->addHtmlComponent(new HtmlIcon($identifier, $icon));
57 57
 	}
58 58
 
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
 	 * @param string $size
62 62
 	 * @param array $icons
63 63
 	 */
64
-	public function htmlIconGroups($identifier,$size="",$icons=array()){
65
-		$group=new HtmlIconGroups($identifier,$size);
66
-		if(JArray::isAssociative($icons)){
67
-			foreach ($icons as $icon=>$size){
68
-				$group->add($icon,$size);
64
+	public function htmlIconGroups($identifier, $size="", $icons=array()) {
65
+		$group=new HtmlIconGroups($identifier, $size);
66
+		if (JArray::isAssociative($icons)) {
67
+			foreach ($icons as $icon=>$size) {
68
+				$group->add($icon, $size);
69 69
 			}
70
-		}else{
71
-			foreach ($icons as $icon){
70
+		}else {
71
+			foreach ($icons as $icon) {
72 72
 				$group->add($icon);
73 73
 			}
74 74
 		}
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
 	 * @param array $elements
81 81
 	 * @param boolean $asIcons
82 82
 	 */
83
-	public function htmlButtonGroups($identifier,$elements=array(),$asIcons=false){
84
-		return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements,$asIcons));
83
+	public function htmlButtonGroups($identifier, $elements=array(), $asIcons=false) {
84
+		return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements, $asIcons));
85 85
 	}
86 86
 
87 87
 	/**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * @param string $identifier
90 90
 	 * @param string $content
91 91
 	 */
92
-	public function htmlContainer($identifier,$content=""){
92
+	public function htmlContainer($identifier, $content="") {
93 93
 		return $this->addHtmlComponent(new HtmlContainer($identifier, $content));
94 94
 	}
95 95
 
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
 	 * @param string $identifier
98 98
 	 * @param string $content
99 99
 	 */
100
-	public function htmlDivider($identifier,$content="",$tagName="div"){
101
-		return $this->addHtmlComponent(new HtmlDivider($identifier, $content,$tagName));
100
+	public function htmlDivider($identifier, $content="", $tagName="div") {
101
+		return $this->addHtmlComponent(new HtmlDivider($identifier, $content, $tagName));
102 102
 	}
103 103
 
104 104
 	/**
@@ -106,16 +106,16 @@  discard block
 block discarded – undo
106 106
 	 * @param string $content
107 107
 	 * @param string $tagName
108 108
 	 */
109
-	public function htmlLabel($identifier,$content="",$tagName="div"){
110
-		return $this->addHtmlComponent(new HtmlLabel($identifier, $content,$tagName));
109
+	public function htmlLabel($identifier, $content="", $tagName="div") {
110
+		return $this->addHtmlComponent(new HtmlLabel($identifier, $content, $tagName));
111 111
 	}
112 112
 
113 113
 	/**
114 114
 	 * @param string $identifier
115 115
 	 * @param array $items
116 116
 	 */
117
-	public function htmlMenu($identifier,$items=array()){
118
-		return $this->addHtmlComponent(new HtmlMenu($identifier,$items));
117
+	public function htmlMenu($identifier, $items=array()) {
118
+		return $this->addHtmlComponent(new HtmlMenu($identifier, $items));
119 119
 	}
120 120
 
121 121
 	/**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 * @param string $value
124 124
 	 * @param array $items
125 125
 	 */
126
-	public function htmlDropdown($identifier, $value="", $items=array()){
127
-		return $this->addHtmlComponent(new HtmlDropdown($identifier,$value,$items));
126
+	public function htmlDropdown($identifier, $value="", $items=array()) {
127
+		return $this->addHtmlComponent(new HtmlDropdown($identifier, $value, $items));
128 128
 	}
129 129
 }
130 130
\ 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.