Singleton pattern trait.
This commit is contained in:
@@ -25,25 +25,7 @@ namespace OCA\user_sql\HashAlgorithm;
|
||||
*/
|
||||
class Cleartext implements HashAlgorithm
|
||||
{
|
||||
/**
|
||||
* @var Cleartext
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Cleartext
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
if (self::$instance === null) {
|
||||
self::$instance = new Cleartext();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
use Singleton;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
@@ -68,8 +50,4 @@ class Cleartext implements HashAlgorithm
|
||||
{
|
||||
return $password === $dbHash;
|
||||
}
|
||||
|
||||
private function __clone()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user