Skip to content

Commit

Permalink
Fix little mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Sep 12, 2024
1 parent b64e57f commit 116438e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Registry/ElementRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
use function dirname;
use function implode;

class ElementRegistry
final class ElementRegistry
{
/** @var \SimpleSAML\XML\Registry\AbstractElementRegistry|null $instance */
protected static ?AbstractElementRegistry $instance = null;
/** @var \SimpleSAML\XML\Registry\ElementRegistry|null $instance */
private static ?ElementRegistry $instance = null;

/** @var array<string, string> */
protected array $registry = [];
private array $registry = [];


final private function __construct()
Expand All @@ -38,7 +38,7 @@ final private function __construct()
}


public static function getInstance(): AbstractElementRegistry
public static function getInstance(): ElementRegistry
{
if (self::$instance === null) {
self::$instance = new static();
Expand All @@ -56,10 +56,9 @@ public static function getInstance(): AbstractElementRegistry
public function registerElementHandler(string $class): void
{
Assert::subclassOf($class, AbstractElement::class);
$namespace = class::NS;
$className = AbstractElement::getClassName($class);

$this->registry[$namespace][$key] = $class;
$this->registry[$class::NS][$className] = $class;
}


Expand Down

0 comments on commit 116438e

Please sign in to comment.