PlumTreeSystems /
PayumPayseraGateway
| 1 | <?php |
||
| 2 | namespace PTS\Paysera; |
||
| 3 | |||
| 4 | use Http\Message\MessageFactory; |
||
| 5 | use function League\Uri\create; |
||
| 6 | use Payum\Core\Bridge\Spl\ArrayObject; |
||
| 7 | use Payum\Core\Exception\Http\HttpException; |
||
| 8 | use Payum\Core\HttpClientInterface; |
||
| 9 | use Payum\Core\Reply\HttpPostRedirect; |
||
| 10 | use Payum\Core\Reply\HttpResponse; |
||
| 11 | use Payum\Core\Request\GetHttpRequest; |
||
| 12 | use Symfony\Component\HttpFoundation\Request; |
||
|
0 ignored issues
–
show
|
|||
| 13 | use WebToPay; |
||
| 14 | |||
| 15 | class MockedApi |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | protected $options = []; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Api constructor. |
||
| 24 | * @param array $options |
||
| 25 | */ |
||
| 26 | public function __construct(array $options) |
||
| 27 | { |
||
| 28 | $options = ArrayObject::ensureArrayObject($options); |
||
| 29 | $options->defaults($this->options); |
||
| 30 | |||
| 31 | $this->options = $options; |
||
|
0 ignored issues
–
show
It seems like
$options of type Payum\Core\Bridge\Spl\ArrayObject is incompatible with the declared type array of property $options.
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property. Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property.. Loading history...
|
|||
| 32 | } |
||
| 33 | |||
| 34 | public function doPayment(array $fields) |
||
| 35 | { |
||
| 36 | $fields['projectid'] = $this->options['projectid']; |
||
| 37 | $fields['sign_password'] = $this->options['sign_password']; |
||
| 38 | $this->options['test'] ? $fields['test'] = 1 : $fields['test'] = 0; |
||
| 39 | $authorizeTokenUrl = $this->getApiEndpoint(); |
||
| 40 | $data = WebToPay::buildRequest($fields); |
||
| 41 | throw new HttpPostRedirect($authorizeTokenUrl, $data); |
||
| 42 | } |
||
| 43 | |||
| 44 | public function doNotify(array $fields) |
||
| 45 | { |
||
| 46 | return true; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | protected function getApiEndpoint() |
||
| 53 | { |
||
| 54 | return WebToPay::PAY_URL; |
||
| 55 | } |
||
| 56 | |||
| 57 | public function getApiOptions() |
||
| 58 | { |
||
| 59 | return $this->options; |
||
| 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