Skip to content

Commit

Permalink
Merged branch '4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz committed Dec 5, 2022
2 parents c93e731 + 0fa1165 commit d04914e
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/lib/Templating/TemplatePathRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@

class TemplatePathRegistry implements TemplatePathRegistryInterface, Serializable
{
/** @var array<string, string> */
private $pathMap = [];

/**
* @var
*/
/** @var string */
private $kernelRootDir;

public function __construct($kernelRootDir)
Expand Down Expand Up @@ -44,7 +43,17 @@ public function serialize()

public function unserialize($serialized)
{
list($this->pathMap, $this->kernelRootDir) = unserialize($serialized);
[$this->pathMap, $this->kernelRootDir] = unserialize($serialized);
}

public function __serialize(): array
{
return [$this->pathMap, $this->kernelRootDir];
}

public function __unserialize(array $data): void
{
[$this->pathMap, $this->kernelRootDir] = $data;
}
}

Expand Down

0 comments on commit d04914e

Please sign in to comment.