summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-11-30 10:12:15 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2015-11-30 10:12:15 +0100
commitaa1a0a15eaaa39f2a5fee7d14760312428f39430 (patch)
tree543bae2c24b916a3dcf9098c52235b452bdf14d6
parent6816b36cdbfabdab5c319b093f75bacc4cc2dde3 (diff)
downloadnextcloud-server-aa1a0a15eaaa39f2a5fee7d14760312428f39430.tar.gz
nextcloud-server-aa1a0a15eaaa39f2a5fee7d14760312428f39430.zip
Fix use statements
-rw-r--r--lib/private/systemtag/systemtag.php4
-rw-r--r--lib/private/systemtag/systemtagmanager.php19
-rw-r--r--lib/private/systemtag/systemtagobjectmapper.php23
3 files changed, 25 insertions, 21 deletions
diff --git a/lib/private/systemtag/systemtag.php b/lib/private/systemtag/systemtag.php
index b79cc33cfb2..8f4f7090b21 100644
--- a/lib/private/systemtag/systemtag.php
+++ b/lib/private/systemtag/systemtag.php
@@ -21,9 +21,9 @@
namespace OC\SystemTag;
-use \OCP\IDBConnection;
+use OCP\SystemTag\ISystemTag;
-class SystemTag implements \OCP\SystemTag\ISystemTag {
+class SystemTag implements ISystemTag {
/**
* @var string
diff --git a/lib/private/systemtag/systemtagmanager.php b/lib/private/systemtag/systemtagmanager.php
index e307825ecfa..95b9a61ca38 100644
--- a/lib/private/systemtag/systemtagmanager.php
+++ b/lib/private/systemtag/systemtagmanager.php
@@ -21,13 +21,14 @@
namespace OC\SystemTag;
-use \OCP\IDBConnection;
-use \OCP\SystemTag\TagNotFoundException;
-use \OCP\SystemTag\TagAlreadyExistsException;
+use Doctrine\DBAL\Connection;
+use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
+use OCP\IDBConnection;
+use OCP\SystemTag\ISystemTagManager;
+use OCP\SystemTag\TagAlreadyExistsException;
+use OCP\SystemTag\TagNotFoundException;
-use \Doctrine\DBAL\Exception\UniqueConstraintViolationException;
-
-class SystemTagManager implements \OCP\SystemTag\ISystemTagManager {
+class SystemTagManager implements ISystemTagManager {
const TAG_TABLE = 'systemtag';
@@ -83,7 +84,7 @@ class SystemTagManager implements \OCP\SystemTag\ISystemTagManager {
->addOrderBy('name', 'ASC')
->addOrderBy('visibility', 'ASC')
->addOrderBy('editable', 'ASC')
- ->setParameter('tagids', $tagIds, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY);
+ ->setParameter('tagids', $tagIds, Connection::PARAM_INT_ARRAY);
$result = $query->execute();
while ($row = $result->fetch()) {
@@ -243,13 +244,13 @@ class SystemTagManager implements \OCP\SystemTag\ISystemTagManager {
$query = $this->connection->getQueryBuilder();
$query->delete(SystemTagObjectMapper::RELATION_TABLE)
->where($query->expr()->in('systemtagid', $query->createParameter('tagids')))
- ->setParameter('tagids', $tagIds, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY)
+ ->setParameter('tagids', $tagIds, Connection::PARAM_INT_ARRAY)
->execute();
$query = $this->connection->getQueryBuilder();
$query->delete(self::TAG_TABLE)
->where($query->expr()->in('id', $query->createParameter('tagids')))
- ->setParameter('tagids', $tagIds, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY);
+ ->setParameter('tagids', $tagIds, Connection::PARAM_INT_ARRAY);
if ($query->execute() === 0) {
throw new TagNotFoundException(
diff --git a/lib/private/systemtag/systemtagobjectmapper.php b/lib/private/systemtag/systemtagobjectmapper.php
index a4782b06449..d82898a29cc 100644
--- a/lib/private/systemtag/systemtagobjectmapper.php
+++ b/lib/private/systemtag/systemtagobjectmapper.php
@@ -21,12 +21,15 @@
namespace OC\SystemTag;
-use \OCP\SystemTag\ISystemTagManager;
-use \OCP\IDBConnection;
-use \OCP\SystemTag\TagNotFoundException;
-use \Doctrine\DBAL\Exception\UniqueConstraintViolationException;
+use Doctrine\DBAL\Connection;
+use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
+use OCP\IDBConnection;
+use OCP\SystemTag\ISystemTag;
+use OCP\SystemTag\ISystemTagManager;
+use OCP\SystemTag\ISystemTagObjectMapper;
+use OCP\SystemTag\TagNotFoundException;
-class SystemTagObjectMapper implements \OCP\SystemTag\ISystemTagObjectMapper {
+class SystemTagObjectMapper implements ISystemTagObjectMapper {
const RELATION_TABLE = 'systemtag_object_mapping';
@@ -64,7 +67,7 @@ class SystemTagObjectMapper implements \OCP\SystemTag\ISystemTagObjectMapper {
->from(self::RELATION_TABLE)
->where($query->expr()->in('objectid', $query->createParameter('objectids')))
->andWhere($query->expr()->eq('objecttype', $query->createParameter('objecttype')))
- ->setParameter('objectids', $objIds, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY)
+ ->setParameter('objectids', $objIds, Connection::PARAM_INT_ARRAY)
->setParameter('objecttype', $objectType)
->addOrderBy('objectid', 'ASC')
->addOrderBy('systemtagid', 'ASC');
@@ -100,7 +103,7 @@ class SystemTagObjectMapper implements \OCP\SystemTag\ISystemTagObjectMapper {
->from(self::RELATION_TABLE)
->where($query->expr()->in('systemtagid', $query->createParameter('tagids')))
->andWhere($query->expr()->eq('objecttype', $query->createParameter('objecttype')))
- ->setParameter('tagids', $tagIds, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY)
+ ->setParameter('tagids', $tagIds, Connection::PARAM_INT_ARRAY)
->setParameter('objecttype', $objectType);
$objectIds = [];
@@ -158,7 +161,7 @@ class SystemTagObjectMapper implements \OCP\SystemTag\ISystemTagObjectMapper {
->andWhere($query->expr()->in('systemtagid', $query->createParameter('tagids')))
->setParameter('objectid', $objId)
->setParameter('objecttype', $objectType)
- ->setParameter('tagids', $tagIds, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY)
+ ->setParameter('tagids', $tagIds, Connection::PARAM_INT_ARRAY)
->execute();
}
@@ -174,7 +177,7 @@ class SystemTagObjectMapper implements \OCP\SystemTag\ISystemTagObjectMapper {
->where($query->expr()->in('objectid', $query->createParameter('objectids')))
->andWhere($query->expr()->eq('objecttype', $query->createParameter('objecttype')))
->andWhere($query->expr()->eq('systemtagid', $query->createParameter('tagid')))
- ->setParameter('objectids', $objIds, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY)
+ ->setParameter('objectids', $objIds, Connection::PARAM_INT_ARRAY)
->setParameter('tagid', $tagId)
->setParameter('objecttype', $objectType)
->setMaxResults(1);
@@ -201,7 +204,7 @@ class SystemTagObjectMapper implements \OCP\SystemTag\ISystemTagObjectMapper {
if (count($tags) !== count($tagIds)) {
// at least one tag missing, bail out
$foundTagIds = array_map(
- function($tag) {
+ function(ISystemTag $tag) {
return $tag->getId();
},
$tags