Issues (56)

Security Analysis    not enabled

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/Inputs/CustomerAddress.php (7 issues)

Labels
Severity

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
namespace WeDevBr\Bankly\Inputs;
4
5
use WeDevBr\Bankly\Support\Contracts\CustomerAddressInterface;
6
7
/**
8
 * CustomerAddress class
9
 *
10
 * PHP version 7.4|8.0
11
 *
12
 * @author    WeDev Brasil Team <[email protected]>
13
 * @author    Rafael Teixeira <[email protected]>
14
 * @copyright 2020 We Dev Tecnologia Ltda
15
 * @link      https://github.com/wedevBr/bankly-laravel
16
 */
17
class CustomerAddress implements CustomerAddressInterface
18
{
19
    /** @var string */
20
    protected $zipCode;
21
22
    /** @var string */
23
    protected $addressLine;
24
25
    /** @var string */
26
    protected $buildingNumber;
27
28
    /** @var string */
29
    protected $complement;
30
31
    /** @var string */
32
    protected $neighborhood;
33
34
    /** @var string */
35
    protected $city;
36
37
    /** @var string */
38
    protected $state;
39
40
    /** @var string */
41
    protected $country;
42
43
    /**
44
     * @param string $zipCode
45
     * @return CustomerAddress
46
     */
47
    public function setZipCode(string $zipCode): CustomerAddress
48
    {
49
        $this->zipCode = $zipCode;
50
        return $this;
51
    }
52
53
    /**
54
     * @param string $zipCode
0 ignored issues
show
There is no parameter named $zipCode. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
55
     * @return CustomerAddress
56
     */
57
    public function setAddressLine(string $addressLine): CustomerAddress
58
    {
59
        $this->addressLine = $addressLine;
60
        return $this;
61
    }
62
63
    /**
64
     * @param string $zipCode
0 ignored issues
show
There is no parameter named $zipCode. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
65
     * @return CustomerAddress
66
     */
67
    public function setBuildingNumber(string $buildingNumber): CustomerAddress
68
    {
69
        $this->buildingNumber = $buildingNumber;
70
        return $this;
71
    }
72
73
    /**
74
     * @param string $zipCode
0 ignored issues
show
There is no parameter named $zipCode. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
75
     * @return CustomerAddress
76
     */
77
    public function setComplement(string $complement): CustomerAddress
78
    {
79
        $this->complement = $complement;
80
        return $this;
81
    }
82
83
    /**
84
     * @param string $zipCode
0 ignored issues
show
There is no parameter named $zipCode. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
85
     * @return CustomerAddress
86
     */
87
    public function setNeighborhood(string $neighborhood): CustomerAddress
88
    {
89
        $this->neighborhood = $neighborhood;
90
        return $this;
91
    }
92
93
    /**
94
     * @param string $zipCode
0 ignored issues
show
There is no parameter named $zipCode. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
95
     * @return CustomerAddress
96
     */
97
    public function setCity(string $city): CustomerAddress
98
    {
99
        $this->city = $city;
100
        return $this;
101
    }
102
103
    /**
104
     * @param string $zipCode
0 ignored issues
show
There is no parameter named $zipCode. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
105
     * @return CustomerAddress
106
     */
107
    public function setState(string $state): CustomerAddress
108
    {
109
        $this->state = $state;
110
        return $this;
111
    }
112
113
    /**
114
     * @param string $zipCode
0 ignored issues
show
There is no parameter named $zipCode. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
115
     * @return CustomerAddress
116
     */
117
    public function setCountry(string $country): CustomerAddress
118
    {
119
        $this->country = $country;
120
        return $this;
121
    }
122
123
    /**
124
     * @return string
125
     */
126
    public function getZipCode(): string
127
    {
128
        return $this->zipCode;
129
    }
130
131
    /**
132
     * @return string
133
     */
134
    public function getAddressLine(): string
135
    {
136
        return $this->addressLine;
137
    }
138
139
    /**
140
     * @return string
141
     */
142
    public function getBuildingNumber(): string
143
    {
144
        return $this->buildingNumber;
145
    }
146
147
    /**
148
     * @return string
149
     */
150
    public function getComplement(): string
151
    {
152
        return $this->complement;
153
    }
154
155
    /**
156
     * @return string
157
     */
158
    public function getNeighborhood(): string
159
    {
160
        return $this->neighborhood;
161
    }
162
163
    /**
164
     * @return string
165
     */
166
    public function getCity(): string
167
    {
168
        return $this->city;
169
    }
170
171
    /**
172
     * @return string
173
     */
174
    public function getState(): string
175
    {
176
        return $this->state;
177
    }
178
179
    /**
180
     * @return string
181
     */
182
    public function getCountry(): string
183
    {
184
        return $this->country;
185
    }
186
187
    /**
188
     * @return array
189
     */
190
    public function toArray(): array
191
    {
192
        return [
193
            'country' => $this->country,
194
            'state' => $this->state,
195
            'city' => $this->city,
196
            'neighborhood' => $this->neighborhood,
197
            'complement' => $this->complement,
198
            'buildingNumber' => $this->buildingNumber,
199
            'addressLine' => $this->addressLine,
200
            'zipCode' => $this->zipCode,
201
        ];
202
    }
203
}
204