Issues (93)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/Model/BankAccount/BankAccount.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This software may be modified and distributed under the terms
7
 * of the MIT license. See the LICENSE file for details.
8
 */
9
10
namespace Shapin\Stripe\Model\BankAccount;
11
12
use Money\Currency;
13
use Shapin\Stripe\Model\ContainsMetadata;
14
use Shapin\Stripe\Model\CreatableFromArray;
15
use Shapin\Stripe\Model\MetadataCollection;
16
use Shapin\Stripe\Model\MetadataTrait;
17
18
final class BankAccount implements CreatableFromArray, ContainsMetadata
19
{
20
    use MetadataTrait;
21
22
    /**
23
     * @var string
24
     */
25
    private $id;
26
27
    /**
28
     * @var string
29
     */
30
    private $account;
31
32
    /**
33
     * @var string
34
     */
35
    private $accountHolderName;
36
37
    /**
38
     * @var string
39
     */
40
    private $accountHolderType;
41
42
    /**
43
     * @var string
44
     */
45
    private $bankName;
46
47
    /**
48
     * @var string
49
     */
50
    private $country;
51
52
    /**
53
     * @var Currency
54
     */
55
    private $currency;
56
57
    /**
58
     * @var ?string
59
     */
60
    private $customer;
61
62
    /**
63
     * @var string
64
     */
65
    private $fingerprint;
66
67
    /**
68
     * @var string
69
     */
70
    private $lastFour;
71
72
    /**
73
     * @var string
74
     */
75
    private $routingNumber;
76
77
    /**
78
     * @var string
79
     */
80
    private $status;
81
82 7
    public static function createFromArray(array $data): self
83
    {
84 7
        $model = new self();
85 7
        $model->id = $data['id'];
86 7
        $model->account = $data['account'] ?? null;
87 7
        $model->accountHolderName = $data['account_holder_name'];
88 7
        $model->accountHolderType = $data['account_holder_type'];
89 7
        $model->bankName = $data['bank_name'];
90 7
        $model->country = $data['country'];
91 7
        $model->currency = new Currency(strtoupper($data['currency']));
92 7
        $model->customer = $data['customer'] ?? null;
93 7
        $model->fingerprint = $data['fingerprint'];
94 7
        $model->lastFour = $data['last4'];
95 7
        $model->metadata = MetadataCollection::createFromArray($data['metadata']);
0 ignored issues
show
Documentation Bug introduced by
It seems like \Shapin\Stripe\Model\Met...rray($data['metadata']) of type object<self> is incompatible with the declared type object<Shapin\Stripe\Model\MetadataCollection> of property $metadata.

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...
96 7
        $model->routingNumber = $data['routing_number'];
97 7
        $model->status = $data['status'];
98
99 7
        return $model;
100
    }
101
102
    public function getId(): string
103
    {
104
        return $this->id;
105
    }
106
107
    public function getAccount(): ?string
108
    {
109
        return $this->account;
110
    }
111
112
    public function getAccountHolderName(): string
113
    {
114
        return $this->accountHolderName;
115
    }
116
117
    public function getAccountHolderType(): string
118
    {
119
        return $this->accountHolderType;
120
    }
121
122
    public function getBankName(): string
123
    {
124
        return $this->bankName;
125
    }
126
127
    public function getCountry(): string
128
    {
129
        return $this->country;
130
    }
131
132
    public function getCurrency(): Currency
133
    {
134
        return $this->currency;
135
    }
136
137
    public function getCustomer(): ?string
138
    {
139
        return $this->customer;
140
    }
141
142
    public function getFingerprint(): string
143
    {
144
        return $this->fingerprint;
145
    }
146
147
    public function getLastFour(): string
148
    {
149
        return $this->lastFour;
150
    }
151
152
    public function getRoutingNumber(): string
153
    {
154
        return $this->routingNumber;
155
    }
156
157
    public function getStatus(): string
158
    {
159
        return $this->status;
160
    }
161
}
162