Passed
Push — master ( b5945e...160666 )
by Jean-Christophe
02:42
created
Ajax/bootstrap/html/HtmlGridSystem.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 class HtmlGridSystem extends HtmlBsDoubleElement {
17 17
 	private $rows;
18 18
 	
19
-	public function __construct($identifier,$numRows=1,$numCols=NULL){
20
-		parent::__construct($identifier,"div");
19
+	public function __construct($identifier, $numRows=1, $numCols=NULL) {
20
+		parent::__construct($identifier, "div");
21 21
 		$this->setProperty("class", "container-fluid");
22 22
 		$this->rows=array();
23
-		$this->setNumRows($numRows,$numCols);
23
+		$this->setNumRows($numRows, $numCols);
24 24
 	}
25 25
 	
26 26
 	/**
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	 * @param int $numCols 
29 29
 	 * @return \Ajax\bootstrap\html\content\HtmlGridRow
30 30
 	 */
31
-	public function addRow($numCols=NULL){
32
-		$row=new HtmlGridRow($this->identifier."-row-".(sizeof($this->rows)+1),$numCols);
31
+	public function addRow($numCols=NULL) {
32
+		$row=new HtmlGridRow($this->identifier."-row-".(sizeof($this->rows)+1), $numCols);
33 33
 		$this->rows[]=$row;
34 34
 		return $row;
35 35
 	}
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 	 * @param boolean $force add the row at $index if true
41 41
 	 * @return \Ajax\bootstrap\html\content\HtmlGridRow
42 42
 	 */
43
-	public function getRow($index,$force=true){
44
-		if($index<sizeof($this->rows)){
43
+	public function getRow($index, $force=true) {
44
+		if ($index<sizeof($this->rows)) {
45 45
 			$result=$this->rows[$index-1];
46
-		}else if ($force){
46
+		} else if ($force) {
47 47
 			$this->setNumRows($index);
48 48
 			$result=$this->rows[$index-1];
49 49
 		}
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 	 * @param int $numCols
57 57
 	 * @return \Ajax\bootstrap\html\HtmlGridSystem
58 58
 	 */
59
-	public function setNumRows($numRows,$numCols=NULL){
60
-		for($i=sizeof($this->rows);$i<$numRows;$i++){
59
+	public function setNumRows($numRows, $numCols=NULL) {
60
+		for ($i=sizeof($this->rows); $i<$numRows; $i++) {
61 61
 			$this->addRow($numCols);
62 62
 		}
63 63
 		return $this;
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
 	 * @param boolean $force add the cell at $row,$col if true
70 70
 	 * @return HtmlGridCol
71 71
 	 */
72
-	public function getCell($row,$col,$force=true){
73
-		$row=$this->getRow($row,$force);
74
-		if(isset($row)){
75
-			$col=$row->getCol($col,$force);
72
+	public function getCell($row, $col, $force=true) {
73
+		$row=$this->getRow($row, $force);
74
+		if (isset($row)) {
75
+			$col=$row->getCol($col, $force);
76 76
 		}
77 77
 		return $col;
78 78
 	}
@@ -82,22 +82,22 @@  discard block
 block discarded – undo
82 82
 	 * @param int $col
83 83
 	 * @return HtmlGridCol
84 84
 	 */
85
-	public function getCellAt($row,$col,$force=true){
86
-		$row=$this->getRow($row,$force);
87
-		if(isset($row)){
88
-			$col=$row->getColAt($col,$force);
85
+	public function getCellAt($row, $col, $force=true) {
86
+		$row=$this->getRow($row, $force);
87
+		if (isset($row)) {
88
+			$col=$row->getColAt($col, $force);
89 89
 		}
90 90
 		return $col;
91 91
 	}
92 92
 	
93 93
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
94
-		foreach ($this->rows as $row){
94
+		foreach ($this->rows as $row) {
95 95
 			$this->addContent($row);
96 96
 		}
97
-		return parent::compile($js,$view);
97
+		return parent::compile($js, $view);
98 98
 	}
99
-	public function setContentForAll($content){
100
-		foreach ($this->rows as $row){
99
+	public function setContentForAll($content) {
100
+		foreach ($this->rows as $row) {
101 101
 			$row->setContentForAll($content);
102 102
 		}
103 103
 	}
Please login to merge, or discard this patch.
Ajax/ui/components/Tabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
 
15 15
 	public function __construct(JsUtils $js) {
16 16
 		parent::__construct($js);
17
-		$this->uiName = "tabs";
17
+		$this->uiName="tabs";
18 18
 	}
19 19
 }
Please login to merge, or discard this patch.
Ajax/ui/components/Autocomplete.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 	public function __construct(JsUtils $js) {
18 18
 		parent::__construct($js);
19
-		$this->uiName = "autocomplete";
19
+		$this->uiName="autocomplete";
20 20
 		$this->setParam("minLength", 3);
21 21
 	}
22 22
 
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function setAjaxSource($url) {
31 31
 		if (JString::startsWith($url, "/")) {
32
-			$url = $this->js->getUrl($url);
32
+			$url=$this->js->getUrl($url);
33 33
 		}
34
-		$ajax = "%function (request, response) {
34
+		$ajax="%function (request, response) {
35 35
 			$.ajax({
36 36
 				url: '{$url}',
37 37
 				dataType: 'jsonp',
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 	 * @return $this
53 53
 	 */
54 54
 	public function setSource($source) {
55
-		$source = str_ireplace(array(
55
+		$source=str_ireplace(array(
56 56
 			"\"",
57 57
 			"'"
58 58
 		), "%quote%", $source);
59
-		return $this->setParam("source", "%" . $source . "%");
59
+		return $this->setParam("source", "%".$source."%");
60 60
 	}
61 61
 
62 62
 	/**
Please login to merge, or discard this patch.
Ajax/ui/components/Button.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 	public function __construct(JsUtils $js) {
17 17
 		parent::__construct($js);
18
-		$this->uiName = "button";
18
+		$this->uiName="button";
19 19
 	}
20 20
 
21 21
 	/**
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	public function setIcons($value) {
44 44
 		if (is_string($value)) {
45 45
 			if (JString::startsWith($value, "{"));
46
-			$value = "%" . $value . "%";
46
+			$value="%".$value."%";
47 47
 		}
48 48
 		return $this->setParam("icons", $value);
49 49
 	}
Please login to merge, or discard this patch.
Ajax/ui/components/Dialog.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -14,29 +14,29 @@  discard block
 block discarded – undo
14 14
 
15 15
 	protected $attachTo;
16 16
 
17
-	protected $buttons = array();
17
+	protected $buttons=array();
18 18
 
19 19
 	public function __construct(JsUtils $js) {
20 20
 		parent::__construct($js);
21
-		$this->params = array(
21
+		$this->params=array(
22 22
 			"dialogClass" => "no-close"
23 23
 		);
24 24
 		$this->addCancelBtn("Annuler");
25 25
 	}
26 26
 
27 27
 	public function getScript() {
28
-		$allParams = $this->params;
29
-		$jsonButtons = array();
28
+		$allParams=$this->params;
29
+		$jsonButtons=array();
30 30
 		foreach ($this->buttons as $button) {
31
-			$jsonButtons[] = $button->getParams();
31
+			$jsonButtons[]=$button->getParams();
32 32
 		}
33
-		$allParams["buttons"] = $jsonButtons;
34
-		$this->jquery_code_for_compile[] = "$( '" . $this->attachTo . "' ).dialog(" . $this->getParamsAsJSON($allParams) . ");";
35
-		$result = implode("", $this->jquery_code_for_compile);
36
-		$result = str_ireplace("\"%", "", $result);
37
-		$result = str_ireplace("%\"", "", $result);
38
-		$result = str_ireplace("\\n", "", $result);
39
-		$result = str_ireplace("\\t", "", $result);
33
+		$allParams["buttons"]=$jsonButtons;
34
+		$this->jquery_code_for_compile[]="$( '".$this->attachTo."' ).dialog(".$this->getParamsAsJSON($allParams).");";
35
+		$result=implode("", $this->jquery_code_for_compile);
36
+		$result=str_ireplace("\"%", "", $result);
37
+		$result=str_ireplace("%\"", "", $result);
38
+		$result=str_ireplace("\\n", "", $result);
39
+		$result=str_ireplace("\\t", "", $result);
40 40
 		return $result;
41 41
 	}
42 42
 
@@ -46,26 +46,26 @@  discard block
 block discarded – undo
46 46
 	 *        	identifiant CSS
47 47
 	 */
48 48
 	public function attach($identifier) {
49
-		$this->attachTo = $identifier;
49
+		$this->attachTo=$identifier;
50 50
 	}
51 51
 
52
-	public function addCancelBtn($caption = "Annuler", $position = NULL) {
52
+	public function addCancelBtn($caption="Annuler", $position=NULL) {
53 53
 		$this->insertBtn(DialogButton::cancelButton($caption), $position);
54 54
 	}
55 55
 
56
-	public function addSubmitBtn(JsUtils $js, $url, $form, $responseElement, $caption = "Valider", $position = NULL) {
56
+	public function addSubmitBtn(JsUtils $js, $url, $form, $responseElement, $caption="Valider", $position=NULL) {
57 57
 		$this->insertBtn(DialogButton::submitButton($js, $url, $form, $responseElement, $caption), $position);
58 58
 	}
59 59
 
60
-	public function addButton($caption, $jsCode, $position = NULL) {
60
+	public function addButton($caption, $jsCode, $position=NULL) {
61 61
 		$this->insertBtn(new DialogButton($caption, $jsCode), $position);
62 62
 	}
63 63
 
64
-	private function insertBtn($insert, $position = NULL) {
65
-		if ($position != NULL) {
66
-			$this->buttons = array_splice($this->buttons, $position, 0, $insert);
64
+	private function insertBtn($insert, $position=NULL) {
65
+		if ($position!=NULL) {
66
+			$this->buttons=array_splice($this->buttons, $position, 0, $insert);
67 67
 		} else {
68
-			$this->buttons[] = $insert;
68
+			$this->buttons[]=$insert;
69 69
 		}
70 70
 	}
71 71
 }
Please login to merge, or discard this patch.
Ajax/ui/components/Spinner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
 
15 15
 	public function __construct(JsUtils $js) {
16 16
 		parent::__construct($js);
17
-		$this->uiName = "spinner";
17
+		$this->uiName="spinner";
18 18
 	}
19 19
 }
Please login to merge, or discard this patch.
Ajax/ui/components/Tooltip.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
 	public function __construct(JsUtils $js) {
17 17
 		parent::__construct($js);
18
-		$this->uiName = "tooltip";
18
+		$this->uiName="tooltip";
19 19
 	}
20 20
 
21 21
 	/**
Please login to merge, or discard this patch.
Ajax/ui/components/Menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
 
15 15
 	public function __construct(JsUtils $js) {
16 16
 		parent::__construct($js);
17
-		$this->uiName = "menu";
17
+		$this->uiName="menu";
18 18
 	}
19 19
 }
Please login to merge, or discard this patch.
Ajax/ui/components/Accordion.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
 
17 17
 	public function __construct(JsUtils $js) {
18 18
 		parent::__construct($js);
19
-		$this->params = array(
19
+		$this->params=array(
20 20
 			"active" => 0
21 21
 		);
22
-		$this->uiName = "accordion";
22
+		$this->uiName="accordion";
23 23
 	}
24 24
 
25 25
 	/**
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public function setAnimate($value) {
56 56
 		if ($value instanceof Animation)
57
-			$value = $value->getParams();
57
+			$value=$value->getParams();
58 58
 		else if (is_string($value)) {
59
-			$animation = new Animation();
59
+			$animation=new Animation();
60 60
 			$animation->setEasing($value);
61 61
 		}
62 62
 		$this->setParam("animate", $value);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	public function setIcons($value) {
147 147
 		if (is_string($value)) {
148 148
 			if (JString::startsWith($value, "{"));
149
-			$value = "%" . $value . "%";
149
+			$value="%".$value."%";
150 150
 		}
151 151
 		$this->setParam("icons", $value);
152 152
 		return $this;
Please login to merge, or discard this patch.