Completed
Push — master ( 8b49e3...3c0bc3 )
by Jean-Christophe
03:22
created
Ajax/semantic/widgets/dataelement/DataElement.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,33 +19,33 @@
 block discarded – undo
19 19
 class DataElement extends Widget {
20 20
 
21 21
 	public function __construct($identifier, $modelInstance=NULL) {
22
-		parent::__construct($identifier, null,$modelInstance);
23
-		$this->_init(new InstanceViewer($identifier), "table", new HtmlTable($identifier, 0,2), false);
22
+		parent::__construct($identifier, null, $modelInstance);
23
+		$this->_init(new InstanceViewer($identifier), "table", new HtmlTable($identifier, 0, 2), false);
24 24
 		$this->content["table"]->setDefinition();
25 25
 	}
26 26
 
27
-	public function compile(JsUtils $js=NULL,&$view=NULL){
27
+	public function compile(JsUtils $js=NULL, &$view=NULL) {
28 28
 		$this->_instanceViewer->setInstance($this->_modelInstance);
29 29
 
30 30
 		$table=$this->content["table"];
31 31
 		$this->_generateContent($table);
32 32
 
33
-		if(isset($this->_toolbar)){
33
+		if (isset($this->_toolbar)) {
34 34
 			$this->_setToolbarPosition($table);
35 35
 		}
36
-		$this->content=JArray::sortAssociative($this->content, [PositionInTable::BEFORETABLE,"table",PositionInTable::AFTERTABLE]);
37
-		return parent::compile($js,$view);
36
+		$this->content=JArray::sortAssociative($this->content, [PositionInTable::BEFORETABLE, "table", PositionInTable::AFTERTABLE]);
37
+		return parent::compile($js, $view);
38 38
 	}
39 39
 
40 40
 	/**
41 41
 	 * @param HtmlTable $table
42 42
 	 */
43
-	protected function _generateContent($table){
43
+	protected function _generateContent($table) {
44 44
 		$captions=$this->_instanceViewer->getCaptions();
45
-		$values= $this->_instanceViewer->getValues();
45
+		$values=$this->_instanceViewer->getValues();
46 46
 		$count=$this->_instanceViewer->count();
47
-		for($i=0;$i<$count;$i++){
48
-			$table->addRow([$captions[$i],$values[$i]]);
47
+		for ($i=0; $i<$count; $i++) {
48
+			$table->addRow([$captions[$i], $values[$i]]);
49 49
 		}
50 50
 	}
51 51
 
Please login to merge, or discard this patch.