mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-10 17:04:01 +02:00
Applied fixes from StyleCI
This commit is contained in:
committed by
StyleCI Bot
parent
3663603b80
commit
fe1f144ec3
@@ -3,24 +3,22 @@
|
||||
namespace DesignPatterns\Creational\Multiton;
|
||||
|
||||
/**
|
||||
* class Multiton
|
||||
* class Multiton.
|
||||
*/
|
||||
class Multiton
|
||||
{
|
||||
/**
|
||||
*
|
||||
* the first instance
|
||||
* the first instance.
|
||||
*/
|
||||
const INSTANCE_1 = '1';
|
||||
|
||||
/**
|
||||
*
|
||||
* the second instance
|
||||
* the second instance.
|
||||
*/
|
||||
const INSTANCE_2 = '2';
|
||||
|
||||
/**
|
||||
* holds the named instances
|
||||
* holds the named instances.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
@@ -28,7 +26,6 @@ class Multiton
|
||||
|
||||
/**
|
||||
* should not be called from outside: private!
|
||||
*
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
@@ -36,7 +33,7 @@ class Multiton
|
||||
|
||||
/**
|
||||
* gets the instance with the given name, e.g. Multiton::INSTANCE_1
|
||||
* uses lazy initialization
|
||||
* uses lazy initialization.
|
||||
*
|
||||
* @param string $instanceName
|
||||
*
|
||||
@@ -52,7 +49,7 @@ class Multiton
|
||||
}
|
||||
|
||||
/**
|
||||
* prevent instance from being cloned
|
||||
* prevent instance from being cloned.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -61,7 +58,7 @@ class Multiton
|
||||
}
|
||||
|
||||
/**
|
||||
* prevent instance from being unserialized
|
||||
* prevent instance from being unserialized.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
Reference in New Issue
Block a user