Skip to content

Commit f8bf46b

Browse files
committed
formatting
1 parent bed4033 commit f8bf46b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,18 +153,14 @@ protected function getConnection($connection = null)
153153
}
154154

155155
/**
156-
* Get the table name.
156+
* Get the table name from the given model or string.
157157
*
158158
* @param \Illuminate\Database\Eloquent\Model|string $table
159159
* @return string
160160
*/
161161
protected function getTable($table)
162162
{
163-
if (is_subclass_of($table, Model::class)) {
164-
return (new $table)->getTable();
165-
}
166-
167-
return $table;
163+
return is_subclass_of($table, Model::class) ? (new $table)->getTable() : $table;
168164
}
169165

170166
/**

0 commit comments

Comments
 (0)