Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class Signer implements SignerInterface |
||
21 | { |
||
22 | private $algorithmer; |
||
23 | |||
24 | public function __construct( |
||
25 | SignatureInterface $algorithmer |
||
26 | ) { |
||
27 | $this->algorithmer = $algorithmer; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @inheritDoc |
||
32 | */ |
||
33 | public function sign(string $toSign, DtoInterface $dto): string |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param string $sorted |
||
42 | * @param string $secret |
||
43 | * @return string |
||
44 | * This method accomplishes business policy |
||
45 | */ |
||
46 | private function perform(string $sorted, string $secret) |
||
47 | { |
||
48 | $data = $this->policy($secret, $sorted); |
||
49 | return $data; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @param $secret |
||
54 | * @param $data |
||
55 | * @return string |
||
56 | * This is the business policy being met |
||
57 | */ |
||
58 | private function policy($secret, $data) |
||
61 | } |
||
62 | } |
||
63 |