| Conditions | 3 |
| Paths | 3 |
| Total Lines | 29 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function __construct(PurchaseRecord $purchase) |
||
| 21 | { |
||
| 22 | parent::__construct('delegate-form'); |
||
| 23 | $this->add(['type' => Hidden::class, 'name' => 'stripe_token']); |
||
| 24 | $this->add([ |
||
| 25 | 'type' => Text::class, |
||
| 26 | 'name' => 'purchase_email', |
||
| 27 | 'options' => [ |
||
| 28 | 'label' => 'Email', |
||
| 29 | 'help-block' => 'Your receipt will be emailed to this address' |
||
| 30 | ] |
||
| 31 | ]); |
||
| 32 | |||
| 33 | foreach ($purchase->getTickets() as $i => $ticket) { |
||
| 34 | /** @var TicketRecord $ticket */ |
||
| 35 | if (!$ticket->getTicketType()->isSupplementary()) { |
||
| 36 | $this->add(['type' => DelegateInformation::class, 'name' => 'delegates_' . $i]); |
||
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 40 | $this->add(new Csrf('security')); |
||
| 41 | |||
| 42 | $this->getInputFilter() |
||
| 43 | ->get('purchase_email') |
||
| 44 | ->setAllowEmpty(false) |
||
| 45 | ->setRequired(true) |
||
| 46 | ->getValidatorChain() |
||
| 47 | ->attach(new NotEmpty()) |
||
| 48 | ->attach(new EmailAddress()); |
||
| 49 | |||
| 51 | } |
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