diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 11:30:18 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 18:34:56 +0300 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /lib/private/Tagging | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Tagging')
-rw-r--r-- | lib/private/Tagging/TagMapper.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Tagging/TagMapper.php b/lib/private/Tagging/TagMapper.php index fb58c33dd07..500a0a353d6 100644 --- a/lib/private/Tagging/TagMapper.php +++ b/lib/private/Tagging/TagMapper.php @@ -52,12 +52,12 @@ class TagMapper extends Mapper { */ public function loadTags($owners, $type) { if(!is_array($owners)) { - $owners = array($owners); + $owners = [$owners]; } $sql = 'SELECT `id`, `uid`, `type`, `category` FROM `' . $this->getTableName() . '` ' . 'WHERE `uid` IN (' . str_repeat('?,', count($owners)-1) . '?) AND `type` = ? ORDER BY `category`'; - return $this->findEntities($sql, array_merge($owners, array($type))); + return $this->findEntities($sql, array_merge($owners, [$type])); } /** @@ -70,7 +70,7 @@ class TagMapper extends Mapper { $sql = 'SELECT `id`, `uid`, `type`, `category` FROM `' . $this->getTableName() . '` ' . 'WHERE `uid` = ? AND `type` = ? AND `category` = ?'; try { - $this->findEntity($sql, array($tag->getOwner(), $tag->getType(), $tag->getName())); + $this->findEntity($sql, [$tag->getOwner(), $tag->getType(), $tag->getName()]); } catch (DoesNotExistException $e) { return false; } |