Passed
Push — master ( 69a286...79b252 )
by Jean-Christophe
02:31
created
Ajax/semantic/widgets/business/BusinessForm.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -16,17 +16,17 @@  discard block
 block discarded – undo
16 16
 	 *
17 17
 	 * @see \Ajax\semantic\widgets\dataform\DataForm::__construct()
18 18
 	 */
19
-	public function __construct($identifier,$modelInstance=null,$fieldsOrder=[],$fieldsDefinition=[],$fields=[],$captions=[],$separators=[]) {
20
-		if(!isset($modelInstance)){
19
+	public function __construct($identifier, $modelInstance=null, $fieldsOrder=[], $fieldsDefinition=[], $fields=[], $captions=[], $separators=[]) {
20
+		if (!isset($modelInstance)) {
21 21
 			$modelInstance=$this->getDefaultModelInstance();
22 22
 		}
23
-		parent::__construct($identifier,$modelInstance);
24
-		$this->_initForm($fieldsOrder, $fieldsDefinition,$fields,$captions,$separators);
23
+		parent::__construct($identifier, $modelInstance);
24
+		$this->_initForm($fieldsOrder, $fieldsDefinition, $fields, $captions, $separators);
25 25
 	}
26 26
 
27 27
 	abstract protected function getDefaultModelInstance();
28 28
 
29
-	protected function _initForm($fieldsOrder,$fieldsDefinition,$fields=[],$captions=[],$separators=[]){
29
+	protected function _initForm($fieldsOrder, $fieldsDefinition, $fields=[], $captions=[], $separators=[]) {
30 30
 		$this->_fieldsOrder=$fieldsOrder;
31 31
 		$this->setFields($fields);
32 32
 		$this->setSeparators($separators);
@@ -34,26 +34,26 @@  discard block
 block discarded – undo
34 34
 		$this->setCaptions($captions);
35 35
 	}
36 36
 
37
-	protected function _getIndex($fieldName){
37
+	protected function _getIndex($fieldName) {
38 38
 		$index=$fieldName;
39
-		if(\is_string($fieldName)){
39
+		if (\is_string($fieldName)) {
40 40
 			$index=\array_search($fieldName, $this->_fieldsOrder);
41 41
 		}
42 42
 		return $index;
43 43
 	}
44
-	protected function _fieldAs($elementCallback,&$index,$attributes=NULL,$prefix=null){
44
+	protected function _fieldAs($elementCallback, &$index, $attributes=NULL, $prefix=null) {
45 45
 		$index=$this->_getIndex($index);
46
-		return parent::_fieldAs($elementCallback, $index,$attributes,$prefix);
46
+		return parent::_fieldAs($elementCallback, $index, $attributes, $prefix);
47 47
 	}
48 48
 
49 49
 
50
-	public function removeField($fieldName){
50
+	public function removeField($fieldName) {
51 51
 		parent::removeField($fieldName);
52
-		\array_splice($this->_fieldsOrder,$this->_getIndex($fieldName),1);
52
+		\array_splice($this->_fieldsOrder, $this->_getIndex($fieldName), 1);
53 53
 		return $this;
54 54
 	}
55 55
 
56
-	public function compile(JsUtils $js=NULL,&$view=NULL){
57
-		return parent::compile($js,$view);
56
+	public function compile(JsUtils $js=NULL, &$view=NULL) {
57
+		return parent::compile($js, $view);
58 58
 	}
59 59
 }
Please login to merge, or discard this patch.