summaryrefslogtreecommitdiff
path: root/src/Support/SingletonTraitWithArguments.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Support/SingletonTraitWithArguments.php')
-rw-r--r--src/Support/SingletonTraitWithArguments.php25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/Support/SingletonTraitWithArguments.php b/src/Support/SingletonTraitWithArguments.php
deleted file mode 100644
index 2ac0653..0000000
--- a/src/Support/SingletonTraitWithArguments.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-namespace PHPIAC\Support;
-
-use PetrKnap\Php\Singleton\SingletonTrait;
-
-trait SingletonTraitWithArguments
-{
- use SingletonTrait;
-
- /**
- * @param mixed ...$arguments
- *
- * @return self
- */
- public static function getInstance(mixed ...$arguments)
- {
- $self = get_called_class();
- if (! isset(self::$instances[$self])) {
- self::$instances[$self] = new $self(...$arguments);
- }
-
- return self::$instances[$self];
- }
-}