| Conditions | 2 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 1 | public function addToContainer(Container $c) |
|
| 23 | { |
||
| 24 | 1 | $c[MailService::class] = $c->factory(function (Container $c) { |
|
| 25 | 1 | $view = $c->get(ViewEngine::class); |
|
| 26 | 1 | $siteConfig = $c->get(SiteConfig::class); |
|
| 27 | 1 | $dsn = getenv('MAILER_DSN') ?: 'sendmail://default'; |
|
| 28 | 1 | $mailService = new MailService(); |
|
| 29 | $transport = Transport::fromDsn($dsn); |
||
| 30 | 1 | $mailer = new Mailer($transport); |
|
| 31 | 1 | $mailService->setView($view); |
|
| 32 | $mailService->setSiteConfig($siteConfig); |
||
| 33 | 1 | $mailer = new Mailer($transport); |
|
| 34 | 1 | $mailService->setMailer($mailer); |
|
| 35 | 1 | ||
| 36 | return $mailService; |
||
| 37 | }); |
||
| 40 |
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