Issues (1)

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/OpeningTimes.php (1 issue)

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
namespace Germania\OpeningTimes;
3
4
class OpeningTimes implements OpeningTimesInterface
5
{
6
	protected $days = array();
7
8
9
	/**
10
	 * Stores text hint regarding opening times
11
	 * @var string|null
12
	 */
13
	public $description = null;
14
15
16
	/**
17
	 * @inheritDoc
18
	 */
19 2
	public function getDescription() : ?string
20
	{
21 2
		return $this->description;
22
	}
23
24
25
	/**
26
	 * @inheritDoc
27
	 */
28 2
	public function setDescription( string $text = null) : self
29
	{
30 2
		$this->description = $text;
31 2
		return $this;
32
	}
33
34
35
	/**
36
	 * @inheritDoc
37
	 */
38 2
	public function getIterator()
39
	{
40 2
		return new \ArrayIterator( $this->days, \ArrayIterator::ARRAY_AS_PROPS );
41
	}
42
43
44
	/**
45
	 * @inheritDoc
46
	 */
47 2
	public function jsonSerialize()
48
	{
49 2
		return $this->days;
50
	}
51
52
53
	/**
54
	 * @param  string $day   Day name, e.g. "monday", "tuesday"
55
	 * @return string|null   Opening times as text
56
	 */
57 30
	public function getDay( string $day ) : ?string
58
	{
59 30
		return ($this->days[ $day ] ?? null) ?: null;	
60
	}
61
62
63
	/**
64
	 * @param  string $day   Day name, e.g. "monday", "tuesday"
65
	 * @param string $times|null  Opening times as text
0 ignored issues
show
There is no parameter named $times|null. 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...
66
	 */
67 32
	public function setDay( string $day, string $times = null ) : self
68
	{
69 32
		$this->days[ $day ] = $times;
70 32
		return $this;	
71
	}
72
73
74
75
76
77
	/**
78
	 * @inheritDoc
79
	 * @return string|null
80
	 */
81 4
	public function getMonday() : ?string
82
	{
83 4
		return $this->getDay("monday");
84
	}
85
86
87
	/**
88
	 * @param string|null $times Opening times as text
89
	 */
90 8
	public function setMonday( string $times = null )
91
	{
92 8
		return $this->setDay("monday", $times);
93
	}
94
95
96
97
98
99
	/**
100
	 * @inheritDoc
101
	 * @return string|null
102
	 */		
103 4
	public function getTuesday() : ?string
104
	{
105 4
		return $this->getDay("tuesday");
106
	}
107
108
109
	/**
110
	 * @param string|null $times Opening times as text
111
	 */
112 4
	public function setTuesday( string $times = null )
113
	{
114 4
		return $this->setDay("tuesday", $times);
115
	}
116
117
118
119
120
121
	/**
122
	 * @inheritDoc
123
	 * @return string|null
124
	 */		
125 4
	public function getWednesday() : ?string
126
	{
127 4
		return $this->getDay("wednesday");
128
	}
129
130
131
	/**
132
	 * @param string|null $times Opening times as text
133
	 */
134 4
	public function setWednesday( string $times = null )
135
	{
136 4
		return $this->setDay("wednesday", $times);
137
	}
138
139
140
141
142
143
	/**
144
	 * @inheritDoc
145
	 * @return string|null
146
	 */		
147 4
	public function getThursday() : ?string
148
	{
149 4
		return $this->getDay("thursday");
150
	}
151
152
153
	/**
154
	 * @param string|null $times Opening times as text
155
	 */
156 4
	public function setThursday( string $times = null )
157
	{
158 4
		return $this->setDay("thursday", $times);
159
	}
160
161
162
163
164
165
166
167
168
	/**
169
	 * @inheritDoc
170
	 * @return string|null
171
	 */		
172 4
	public function getFriday() : ?string
173
	{
174 4
		return $this->getDay("friday");
175
	}
176
177
178
179
	/**
180
	 * @param string|null $times Opening times as text
181
	 */
182 4
	public function setFriday( string $times = null )
183
	{
184 4
		return $this->setDay("friday", $times);
185
	}
186
187
188
189
190
191
192
	/**
193
	 * @inheritDoc
194
	 * @return string|null
195
	 */		
196 4
	public function getSaturday() : ?string
197
	{
198 4
		return $this->getDay("saturday");
199
	}
200
201
202
203
204
	/**
205
	 * @param string|null $times Opening times as text
206
	 */
207 4
	public function setSaturday( string $times = null )
208
	{
209 4
		return $this->setDay("saturday", $times);
210
	}
211
212
213
214
215
	/**
216
	 * @inheritDoc
217
	 * @return string|null
218
	 */		
219 4
	public function getSunday() : ?string
220
	{
221 4
		return $this->getDay("sunday");
222
	}
223
224
225
226
227
228
	/**
229
	 * @param string|null $times Opening times as text
230
	 */
231 4
	public function setSunday( string $times = null )
232
	{
233 4
		return $this->setDay("sunday", $times);
234
	}
235
236
237
}