diff options
Diffstat (limited to 'lib/private/Share20/ShareAttributes.php')
-rw-r--r-- | lib/private/Share20/ShareAttributes.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/private/Share20/ShareAttributes.php b/lib/private/Share20/ShareAttributes.php index abbbd36759b..f90fbd9c6cd 100644 --- a/lib/private/Share20/ShareAttributes.php +++ b/lib/private/Share20/ShareAttributes.php @@ -20,20 +20,20 @@ class ShareAttributes implements IAttributes { /** * @inheritdoc */ - public function setAttribute($scope, $key, $enabled) { + public function setAttribute(string $scope, string $key, mixed $value): IAttributes { if (!\array_key_exists($scope, $this->attributes)) { $this->attributes[$scope] = []; } - $this->attributes[$scope][$key] = $enabled; + $this->attributes[$scope][$key] = $value; return $this; } /** * @inheritdoc */ - public function getAttribute($scope, $key) { - if (\array_key_exists($scope, $this->attributes) && - \array_key_exists($key, $this->attributes[$scope])) { + public function getAttribute(string $scope, string $key): mixed { + if (\array_key_exists($scope, $this->attributes) + && \array_key_exists($key, $this->attributes[$scope])) { return $this->attributes[$scope][$key]; } return null; @@ -42,14 +42,14 @@ class ShareAttributes implements IAttributes { /** * @inheritdoc */ - public function toArray() { + public function toArray(): array { $result = []; foreach ($this->attributes as $scope => $keys) { - foreach ($keys as $key => $enabled) { + foreach ($keys as $key => $value) { $result[] = [ - "scope" => $scope, - "key" => $key, - "enabled" => $enabled + 'scope' => $scope, + 'key' => $key, + 'value' => $value, ]; } } |