Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Commit 917331d

Browse files
committed
cleanup
1 parent 0cf96a3 commit 917331d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/Models/RealModel.php

+8-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010

1111
namespace AustinHeap\Database\Encryption\Tests\Models;
1212

13+
use DB, PDO, PDOException;
14+
use \Illuminate\Database\Eloquent\Model;
15+
1316
/**
1417
* Class RealModel
1518
*/
16-
abstract class RealModel extends \Illuminate\Database\Eloquent\Model
19+
abstract class RealModel extends Model
1720
{
1821
public function getRawValues(array $columns = null): ?array
1922
{
@@ -36,15 +39,15 @@ public function getRawValues(array $columns = null): ?array
3639
);
3740

3841
try {
39-
$dsn = sprintf('mysql:dbname=%s;host=%s;charset=utf8', \DB::getDatabaseName(), env('TESTING_DB_HOST', '127.0.0.1'));
40-
$connection = new \PDO($dsn, env('TESTING_DB_USER', 'root'), env('TESTING_DB_PASS', ''));
42+
$dsn = sprintf('mysql:dbname=%s;host=%s;charset=utf8', DB::getDatabaseName(), env('TESTING_DB_HOST', '127.0.0.1'));
43+
$connection = new PDO($dsn, env('TESTING_DB_USER', 'root'), env('TESTING_DB_PASS', ''));
4144
$statement = $connection->prepare($query);
4245

4346
$statement->execute();
4447

45-
$result = $statement->setFetchMode(\PDO::FETCH_ASSOC);
48+
$result = $statement->setFetchMode(PDO::FETCH_ASSOC);
4649
$rows = is_bool($result) && $result === true ? $statement->fetchAll() : null;
47-
} catch (\PDOException $exception) {
50+
} catch (PDOException $exception) {
4851
return null;
4952
} finally {
5053
$connnection = null;

0 commit comments

Comments
 (0)