summaryrefslogtreecommitdiff
path: root/src/Database/Db.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Database/Db.php')
-rw-r--r--src/Database/Db.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Database/Db.php b/src/Database/Db.php
index 777b16a2..7042998f 100644
--- a/src/Database/Db.php
+++ b/src/Database/Db.php
@@ -79,9 +79,10 @@ class Db
return self::$stm->fetchAll(PDO::FETCH_ASSOC);
}
-
+
/**
* Run a select query and return only the first result or null if no result is found.
+ *
* @param string $query
* @param array $bindings
* @return array|null
@@ -89,11 +90,11 @@ class Db
public static function selectOne($query, array $bindings = [])
{
$result = self::select($query, $bindings);
-
- if(empty($result)) {
+
+ if (empty($result)) {
return null;
}
-
+
return array_shift($result);
}