Issues (25)

MockedPayseraGatewayFactory.php (3 issues)

Labels
Severity
1
<?php
2
3
namespace PTS\Paysera;
4
5
use PTS\Paysera\Action\AuthorizeAction;
0 ignored issues
show
The type PTS\Paysera\Action\AuthorizeAction was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use PTS\Paysera\Action\CancelAction;
0 ignored issues
show
The type PTS\Paysera\Action\CancelAction was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use PTS\Paysera\Action\ConvertPaymentAction;
8
use PTS\Paysera\Action\CaptureAction;
9
use PTS\Paysera\Action\NotifyAction;
10
use PTS\Paysera\Action\RefundAction;
0 ignored issues
show
The type PTS\Paysera\Action\RefundAction was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
use PTS\Paysera\Action\StatusAction;
12
use Payum\Core\Bridge\Spl\ArrayObject;
13
use Payum\Core\GatewayFactory;
14
15
class MockedPayseraGatewayFactory extends GatewayFactory
16
{
17
    /**
18
     * {@inheritDoc}
19
     */
20
    protected function populateConfig(ArrayObject $config)
21
    {
22
        $config->defaults([
23
            'payum.factory_name' => 'paysera',
24
            'payum.factory_title' => 'paysera',
25
            'payum.action.capture' => new CaptureAction($mocked = true),
26
            'payum.action.notify' => new NotifyAction($mocked = true),
27
            'payum.action.status' => new StatusAction(),
28
            'payum.action.convert_payment' => new ConvertPaymentAction(),
29
        ]);
30
31
        if (false == $config['payum.api']) {
32
            $config['payum.default_options'] = array(
33
                'projectid' => '',
34
                'sign_password' => '',
35
                'test' => true,
36
            );
37
            $config->defaults($config['payum.default_options']);
38
            $config['payum.required_options'] = [
39
                'projectid', 'sign_password'
40
            ];
41
42
            $config['payum.api'] = function (ArrayObject $config) {
43
                $config->validateNotEmpty($config['payum.required_options']);
44
45
                return new MockedApi((array)$config);
46
            };
47
        }
48
    }
49
}
50