aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Tagging
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Tagging')
-rw-r--r--lib/private/Tagging/Tag.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/private/Tagging/Tag.php b/lib/private/Tagging/Tag.php
index ae770beb62f..55a3a410281 100644
--- a/lib/private/Tagging/Tag.php
+++ b/lib/private/Tagging/Tag.php
@@ -45,14 +45,16 @@ class Tag extends Entity {
* @todo migrate existing database columns to the correct names
* to be able to drop this direct mapping
*/
- public function columnToProperty($columnName) {
+ public function columnToProperty(string $columnName): string {
if ($columnName === 'category') {
return 'name';
- } elseif ($columnName === 'uid') {
+ }
+
+ if ($columnName === 'uid') {
return 'owner';
- } else {
- return parent::columnToProperty($columnName);
}
+
+ return parent::columnToProperty($columnName);
}
/**
@@ -61,13 +63,15 @@ class Tag extends Entity {
* @param string $property the name of the property
* @return string the column name
*/
- public function propertyToColumn($property) {
+ public function propertyToColumn(string $property): string {
if ($property === 'name') {
return 'category';
- } elseif ($property === 'owner') {
+ }
+
+ if ($property === 'owner') {
return 'uid';
- } else {
- return parent::propertyToColumn($property);
}
+
+ return parent::propertyToColumn($property);
}
}