summaryrefslogtreecommitdiff
path: root/src/Database/Db.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-09-11 17:52:55 +0200
committerGitHub <noreply@github.com>2017-09-11 17:52:55 +0200
commit359160613027a480620e22deef19ff883eaaeb21 (patch)
tree310600aaa23404f0cd7d3e198bacdbc93645da32 /src/Database/Db.php
parent581b81f1b25dc6b6f0a3b34810c293738fd40217 (diff)
parent0a20883aa862779b48fd2a297456c2db04cffb95 (diff)
Merge pull request #344 from MyIgel/master
Prepared routing, added symfony http Closes #336 and closes #337
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);
}