Skip to content

Commit 9beceac

Browse files
committed
formatting
1 parent 0ced00e commit 9beceac

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Illuminate/Validation/Rules/DatabaseRule.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ trait DatabaseRule
4545
*/
4646
public function __construct($table, $column = 'NULL')
4747
{
48-
$this->table = $this->resolveTableName($table);
4948
$this->column = $column;
49+
50+
$this->table = $this->resolveTableName($table);
5051
}
5152

5253
/**
@@ -63,11 +64,9 @@ public function resolveTableName($table)
6364

6465
$model = new $table;
6566

66-
if (! $model instanceof Model) {
67-
return $table;
68-
}
69-
70-
return $model->getTable();
67+
return $model instanceof Model
68+
? $model->getTable()
69+
: $table;
7170
}
7271

7372
/**

0 commit comments

Comments
 (0)