Skip to content

Commit d1c7865

Browse files
author
Julian Atkins
committed
Praise the Gods of standards compliance
1 parent e972c16 commit d1c7865

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/Handlers/ArrayHandler.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,18 @@ protected function getAllStored(?string $class, ?string $context)
126126
}
127127
}
128128

129-
if($properties === null)
129+
if ($properties === null) {
130130
return null;
131+
}
131132

132-
if($class === null) {
133-
foreach($properties as &$c) {
134-
foreach($c as &$p) {
133+
if ($class === null) {
134+
foreach ($properties as &$c) {
135+
foreach ($c as &$p) {
135136
$p = $this->parseValue(...$p);
136137
}
137138
}
138139
} else {
139-
foreach($properties as &$p) {
140+
foreach ($properties as &$p) {
140141
$p = $this->parseValue(...$p);
141142
}
142143
}

src/Settings.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@ public function get(string $key, ?string $context = null)
7676
*/
7777
public function getAll(?string $key = null, ?string $context = null): array
7878
{
79-
if($key !== null) {
80-
[$class,,] = $this->prepareClassAndProperty($key . ".");
79+
if ($key !== null) {
80+
[$class] = $this->prepareClassAndProperty($key . '.');
8181
} else {
8282
$class = null;
8383
}
8484

85-
$properties = array();
85+
$properties = [];
8686

8787
// Add handlers
8888
foreach ($this->handlers as $handler) {
89-
$properties[get_class($handler)] = $handler->getAll($class, $context);
89+
$properties[$handler::class] = $handler->getAll($class, $context);
9090
}
9191

9292
return $properties;

0 commit comments

Comments
 (0)