This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
23
{
24
25
/**
26
* @var string
27
*/
28
public $hashSecret;
29
30
/**
31
* @var string
32
*/
33
public $hashAlgo;
34
35
/**
36
* @inheritdoc
37
* @throws InvalidConfigException
38
*/
39
public function generate(): string
40
{
41
if ($this->hashSecret === null) {
42
throw new InvalidConfigException('Property `hashSecret` must be set!');
43
} elseif ($this->hashAlgo === null) {
44
throw new InvalidConfigException('Property `hashAlgo` must be set!');
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.