ModifyPaymentRedirectResponseEvent   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 45
rs 10
c 1
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setResponse() 0 3 1
A getVariables() 0 3 1
A getRegistration() 0 3 1
A getResponse() 0 3 1
A __construct() 0 8 1
A getRequest() 0 3 1
A getSettings() 0 3 1
A getPaymentController() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Extension "sf_event_mgt" for TYPO3 CMS.
7
 *
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace DERHANSEN\SfEventMgt\Event;
13
14
use DERHANSEN\SfEventMgt\Controller\PaymentController;
15
use DERHANSEN\SfEventMgt\Domain\Model\Registration;
16
use Psr\Http\Message\ResponseInterface;
17
use Psr\Http\Message\ServerRequestInterface;
18
19
/**
20
 * This event is triggered before the payment redirect view is rendered. The given response object is the result
21
 * of the redirectAction. Event listeners can replace the response by a custom response (e.g. a `RedirectResponse`)
22
 */
23
final class ModifyPaymentRedirectResponseEvent
24
{
25
    public function __construct(
26
        private ResponseInterface $response,
27
        private readonly array $settings,
28
        private readonly array $variables,
29
        private readonly Registration $registration,
30
        private readonly PaymentController $paymentController,
31
        private readonly ServerRequestInterface $request
32
    ) {
33
    }
34
35
    public function getResponse(): ResponseInterface
36
    {
37
        return $this->response;
38
    }
39
40
    public function setResponse(ResponseInterface $response): void
41
    {
42
        $this->response = $response;
43
    }
44
45
    public function getSettings(): array
46
    {
47
        return $this->settings;
48
    }
49
50
    public function getVariables(): array
51
    {
52
        return $this->variables;
53
    }
54
55
    public function getRegistration(): Registration
56
    {
57
        return $this->registration;
58
    }
59
60
    public function getPaymentController(): PaymentController
61
    {
62
        return $this->paymentController;
63
    }
64
65
    public function getRequest(): ServerRequestInterface
66
    {
67
        return $this->request;
68
    }
69
}
70