Skip to content

Commit fbf6bac

Browse files
committed
Fixed scrutinizer issue
1 parent 72843d4 commit fbf6bac

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Commands/DatabaseAdmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected function findComposer()
5252
*
5353
* @return void
5454
*/
55-
public function handle(Filesystem $filesystem)
55+
public function handle()
5656
{
5757
$email = $this->argument('email');
5858
$column = $this->option('column');

src/Http/Controllers/CrudController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function storeOrUpdate(Request $request)
3333
}
3434

3535
if (!class_exists($table['controller'])) {
36-
\DBM::makeController($table['controller']);
36+
DBM::makeController($table['controller']);
3737
}
3838

3939
try
@@ -65,7 +65,7 @@ public function makeModel($table)
6565
}
6666

6767
if ($table['makeModel'] && !class_exists($table['model'])) {
68-
\DBM::makeModel($table['model'], $table['name']);
68+
DBM::makeModel($table['model'], $table['name']);
6969
}
7070

7171
if (!$table['makeModel'] && !class_exists($table['model'])) {

src/Http/Controllers/RecordController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function store(Request $request)
3838

3939
$object = DBM::Object()->where('name', $tableName)->first();
4040

41-
if (!class_exists($object->model)) {
41+
if (is_string($object->model) && !class_exists($object->model)) {
4242
return $this->generateError(["Model not found. Please create model first"]);
4343
}
4444

@@ -106,7 +106,7 @@ public function update(Request $request)
106106

107107
$object = DBM::Object()->where('name', $tableName)->first();
108108

109-
if (!class_exists($object->model)) {
109+
if (is_string($object->model) && !class_exists($object->model)) {
110110
return $this->generateError(["Model not found. Please create model first"]);
111111
}
112112

@@ -176,7 +176,7 @@ public function delete(Request $request)
176176
$details = $object->details;
177177
$key = $details['findColumn'];
178178

179-
if (!class_exists($model)) {
179+
if (is_string($model) && !class_exists($model)) {
180180
return $this->generateError(["Model not found. Please create model first"]);
181181
}
182182

0 commit comments

Comments
 (0)