Completed
Push — master ( 241063...d88c3d )
by Adrian
14:53 queued 08:35
created
src/Abstractor/Eloquent/Relation/MiniCrudSingle.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         $this->readConfig('edit');
50 50
 
51
-        if (! empty($columns)) {
51
+        if (!empty($columns)) {
52 52
             //Add field for model deletion
53 53
             $config = [
54 54
                 'name' => '__delete',
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
                 $config = [
76 76
                     'name'         => $columnName,
77
-                    'presentation' => $this->name . ' ' . ucfirst(transcrud($columnName)),
77
+                    'presentation' => $this->name.' '.ucfirst(transcrud($columnName)),
78 78
                     'form_type'    => $formType,
79 79
                     'no_validate'  => true,
80 80
                     'validation'   => null,
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                     ->setConfig($config)
90 90
                     ->get();
91 91
 
92
-                if (! empty($result->id)) {
92
+                if (!empty($result->id)) {
93 93
                     $field->setValue($result->getAttribute($columnName));
94 94
                 }
95 95
 
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function persist(array $relationArray = null, Request $request)
111 111
     {
112
-        if (! empty($relationArray)) {
112
+        if (!empty($relationArray)) {
113 113
             $currentRelation = $this->eloquentRelation->getResults();
114
-            if (! empty($currentRelation)) {
114
+            if (!empty($currentRelation)) {
115 115
                 $relationModel = $currentRelation;
116 116
             } else {
117 117
                 $relationModel = $this->eloquentRelation->getRelated()->newInstance();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                 $relationModel->setAttribute($fieldKey, $fieldValue);
134 134
             }
135 135
 
136
-            if (! $shouldBeSkipped) {
136
+            if (!$shouldBeSkipped) {
137 137
                 $relationModel->save();
138 138
             }
139 139
         }
Please login to merge, or discard this patch.
src/Abstractor/Eloquent/FieldFactory.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
         $field = new Field($this->column, $formElement, $this->config['name'], $this->config['presentation']);
82 82
 
83
-        if (! empty($this->config['validation'])) {
83
+        if (!empty($this->config['validation'])) {
84 84
             if ($this->config['validation'] === 'no_validate') {
85 85
                 $this->config['no_validate'] = true;
86 86
             } else {
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
             }
89 89
         }
90 90
 
91
-        if (! empty($this->config['functions'])) {
91
+        if (!empty($this->config['functions'])) {
92 92
             $field->setFunctions($this->config['functions']);
93 93
         }
94 94
 
95
-        if (! empty($this->config['no_validate']) && $this->config['no_validate'] === true) {
95
+        if (!empty($this->config['no_validate']) && $this->config['no_validate'] === true) {
96 96
             $field->noValidate(true);
97 97
         }
98 98
 
@@ -117,15 +117,15 @@  discard block
 block discarded – undo
117 117
 
118 118
     protected function getFormElement()
119 119
     {
120
-        if (! empty($this->config['form_type'])) {
121
-            if (! in_array($this->config['form_type'], $this->databaseTypeToFormType)) {
122
-                throw new FactoryException("Unknown form type " . $this->config['form_type']);
120
+        if (!empty($this->config['form_type'])) {
121
+            if (!in_array($this->config['form_type'], $this->databaseTypeToFormType)) {
122
+                throw new FactoryException("Unknown form type ".$this->config['form_type']);
123 123
             }
124 124
 
125 125
             $formElementType = $this->config['form_type'];
126 126
         } else {
127
-            if (! array_key_exists($this->column->getType()->getName(), $this->databaseTypeToFormType)) {
128
-                throw new FactoryException("No form type found for database type " . $this->column->getType()->getName());
127
+            if (!array_key_exists($this->column->getType()->getName(), $this->databaseTypeToFormType)) {
128
+                throw new FactoryException("No form type found for database type ".$this->column->getType()->getName());
129 129
             }
130 130
 
131 131
             $formElementType = $this->databaseTypeToFormType[$this->column->getType()->getName()];
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
         $formElement = $this->factory->get($formElementType, []);
140 140
 
141
-        if (! empty($this->config['attr']) && is_array($this->config['attr'])) {
141
+        if (!empty($this->config['attr']) && is_array($this->config['attr'])) {
142 142
             $formElement->attr($this->config['attr']);
143 143
         }
144 144
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         }
150 150
 
151 151
         if ($formElementType === 'textarea') {
152
-            $formElement->class('form-control ' . config('anavel-crud.text_editor'));
152
+            $formElement->class('form-control '.config('anavel-crud.text_editor'));
153 153
         }
154 154
 
155 155
         if ($formElementType === 'checkbox') {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         }
158 158
 
159 159
         if (isset($this->config['defaults'])) {
160
-            if (! is_array($this->config['defaults'])) {
160
+            if (!is_array($this->config['defaults'])) {
161 161
                 $formElement->val(transcrud($this->config['defaults']));
162 162
             } else {
163 163
                 $defaults = [];
Please login to merge, or discard this patch.
src/Abstractor/Eloquent/Relation/Relation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
      */
84 84
     public function getDisplay()
85 85
     {
86
-        if (! empty($this->config['display'])) {
86
+        if (!empty($this->config['display'])) {
87 87
             return $this->config['display'];
88 88
         }
89 89
         return null;
Please login to merge, or discard this patch.
src/Abstractor/Eloquent/ModelFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     }
40 40
 
41 41
     /**
42
-     * @param $slug
42
+     * @param string $slug
43 43
      * @param null $id
44 44
      * @return Model|null
45 45
      * @throws \Exception
Please login to merge, or discard this patch.