summaryrefslogtreecommitdiffstats
path: root/lib/Db/MapperFactory.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-01-28 22:32:49 +0100
committerGitHub <noreply@github.com>2019-01-28 22:32:49 +0100
commit9cd871983a368752d122a73da244606bdeba312f (patch)
treed1882e1e677d7cee12926e5688ccfbfd31a505f5 /lib/Db/MapperFactory.php
parent31b2f194af74bdba60bdd2640e5fc47340157795 (diff)
parentbecce6b7520912257c3d72697a3aefec9923a467 (diff)
Merge pull request #382 from SMillerDev/codestyle_psr2
Define an official codestyle and adhere to it.
Diffstat (limited to 'lib/Db/MapperFactory.php')
-rw-r--r--lib/Db/MapperFactory.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/Db/MapperFactory.php b/lib/Db/MapperFactory.php
index 679d2a934..635003c64 100644
--- a/lib/Db/MapperFactory.php
+++ b/lib/Db/MapperFactory.php
@@ -19,7 +19,6 @@ use OCP\IDBConnection;
use OCA\News\Db\Mysql\ItemMapper as MysqlItemMapper;
use OCA\News\DependencyInjection\IFactory;
-
class MapperFactory implements IFactory
{
@@ -30,21 +29,20 @@ class MapperFactory implements IFactory
*/
private $time;
- public function __construct(IDBConnection $db, $databaseType, Time $time)
+ public function __construct(IDBConnection $db, $databaseType, Time $time)
{
$this->dbType = $databaseType;
$this->db = $db;
$this->time = $time;
}
- public function build()
+ public function build()
{
- switch($this->dbType) {
- case 'mysql':
- return new MysqlItemMapper($this->db, $this->time);
- default:
- return new ItemMapper($this->db, $this->time);
+ switch ($this->dbType) {
+ case 'mysql':
+ return new MysqlItemMapper($this->db, $this->time);
+ default:
+ return new ItemMapper($this->db, $this->time);
}
}
-
}