| Total Complexity | 4 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class ActivationLinkManager |
||
| 9 | { |
||
| 10 | /** @var EntityManagerInterface **/ |
||
| 11 | protected $em; |
||
| 12 | /** @var Mailer **/ |
||
| 13 | protected $mailer; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param EntityManagerInterface $em |
||
| 17 | * @param Mailer $mailer |
||
| 18 | */ |
||
| 19 | 19 | public function __construct(EntityManagerInterface $em, Mailer $mailer) |
|
| 20 | { |
||
| 21 | 19 | $this->em = $em; |
|
| 22 | 19 | $this->mailer = $mailer; |
|
| 23 | 19 | } |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @param \User $user |
||
|
|
|||
| 27 | */ |
||
| 28 | 4 | public function createActivationLink(User $user) |
|
| 38 | 4 | } |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @param User $user |
||
| 42 | * @return bool |
||
| 43 | */ |
||
| 44 | 3 | public function sendValidationMail(User $user): bool |
|
| 45 | { |
||
| 46 | 3 | $nbRecipients = $this->mailer->sendTo($user->getEmail(), 'users.registration.mails.confirmation', [ |
|
| 47 | 3 | '%username%' => $user->getUsername(), |
|
| 48 | 3 | '%activation_link%' => $user->getActivationLink()->getHash() |
|
| 49 | 3 | ], 'Personal'); |
|
| 50 | 3 | return $nbRecipients > 0; |
|
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $hash |
||
| 55 | * @return ActivationLink |
||
| 56 | */ |
||
| 57 | 1 | public function findOneByHash(string $hash) |
|
| 60 | } |
||
| 61 | } |
||
| 62 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths