Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
zonky2 committed May 21, 2024
1 parent f5fc860 commit df33115
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Contao/SessionStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public function set($name, $value)
$this->load();
$this->attributes[$name] = $value;
$this->persist();

return $this;
}

Expand All @@ -143,6 +144,7 @@ public function set($name, $value)
public function all()
{
$this->load();

return $this->attributes;
}

Expand All @@ -154,6 +156,7 @@ public function replace(array $attributes)
$this->load();
$this->attributes = \array_merge($this->attributes, $attributes);
$this->persist();

return $this;
}

Expand All @@ -165,6 +168,7 @@ public function remove($name)
$this->load();
unset($this->attributes[$name]);
$this->persist();

return $this;
}

Expand All @@ -176,6 +180,7 @@ public function clear()
$this->load();
$this->attributes = [];
$this->persist();

return $this;
}

Expand All @@ -184,7 +189,7 @@ public function clear()
*
* @return void
*/
private function load()
private function load(): void
{
if (\count($this->attributes)) {
return;
Expand Down

0 comments on commit df33115

Please sign in to comment.