Issues (439)

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/BedDetails.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
namespace Spatie\SchemaOrg;
4
5
use \Spatie\SchemaOrg\Contracts\BedDetailsContract;
6
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
7
use \Spatie\SchemaOrg\Contracts\ThingContract;
8
9
/**
10
 * An entity holding detailed information about the available bed types, e.g.
11
 * the quantity of twin beds for a hotel room. For the single case of just one
12
 * bed of a certain type, you can use bed directly with a text. See also
13
 * [[BedType]] (under development).
14
 *
15
 * @see http://schema.org/BedDetails
16
 *
17
 */
18 View Code Duplication
class BedDetails extends BaseType implements BedDetailsContract, IntangibleContract, ThingContract
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
{
20
    /**
21
     * An additional type for the item, typically used for adding more specific
22
     * types from external vocabularies in microdata syntax. This is a
23
     * relationship between something and a class that the thing is in. In RDFa
24
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
25
     * attribute - for multiple types. Schema.org tools may have only weaker
26
     * understanding of extra types, in particular those defined externally.
27
     *
28
     * @param string|string[] $additionalType
29
     *
30
     * @return static
31
     *
32
     * @see http://schema.org/additionalType
33
     */
34
    public function additionalType($additionalType)
35
    {
36
        return $this->setProperty('additionalType', $additionalType);
37
    }
38
39
    /**
40
     * An alias for the item.
41
     *
42
     * @param string|string[] $alternateName
43
     *
44
     * @return static
45
     *
46
     * @see http://schema.org/alternateName
47
     */
48
    public function alternateName($alternateName)
49
    {
50
        return $this->setProperty('alternateName', $alternateName);
51
    }
52
53
    /**
54
     * A description of the item.
55
     *
56
     * @param string|string[] $description
57
     *
58
     * @return static
59
     *
60
     * @see http://schema.org/description
61
     */
62
    public function description($description)
63
    {
64
        return $this->setProperty('description', $description);
65
    }
66
67
    /**
68
     * A sub property of description. A short description of the item used to
69
     * disambiguate from other, similar items. Information from other properties
70
     * (in particular, name) may be necessary for the description to be useful
71
     * for disambiguation.
72
     *
73
     * @param string|string[] $disambiguatingDescription
74
     *
75
     * @return static
76
     *
77
     * @see http://schema.org/disambiguatingDescription
78
     */
79
    public function disambiguatingDescription($disambiguatingDescription)
80
    {
81
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
82
    }
83
84
    /**
85
     * The identifier property represents any kind of identifier for any kind of
86
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
87
     * dedicated properties for representing many of these, either as textual
88
     * strings or as URL (URI) links. See [background
89
     * notes](/docs/datamodel.html#identifierBg) for more details.
90
     *
91
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
92
     *
93
     * @return static
94
     *
95
     * @see http://schema.org/identifier
96
     */
97
    public function identifier($identifier)
98
    {
99
        return $this->setProperty('identifier', $identifier);
100
    }
101
102
    /**
103
     * An image of the item. This can be a [[URL]] or a fully described
104
     * [[ImageObject]].
105
     *
106
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
107
     *
108
     * @return static
109
     *
110
     * @see http://schema.org/image
111
     */
112
    public function image($image)
113
    {
114
        return $this->setProperty('image', $image);
115
    }
116
117
    /**
118
     * Indicates a page (or other CreativeWork) for which this thing is the main
119
     * entity being described. See [background
120
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
121
     *
122
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
123
     *
124
     * @return static
125
     *
126
     * @see http://schema.org/mainEntityOfPage
127
     */
128
    public function mainEntityOfPage($mainEntityOfPage)
129
    {
130
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
131
    }
132
133
    /**
134
     * The name of the item.
135
     *
136
     * @param string|string[] $name
137
     *
138
     * @return static
139
     *
140
     * @see http://schema.org/name
141
     */
142
    public function name($name)
143
    {
144
        return $this->setProperty('name', $name);
145
    }
146
147
    /**
148
     * The quantity of the given bed type available in the HotelRoom, Suite,
149
     * House, or Apartment.
150
     *
151
     * @param float|float[]|int|int[] $numberOfBeds
152
     *
153
     * @return static
154
     *
155
     * @see http://schema.org/numberOfBeds
156
     */
157
    public function numberOfBeds($numberOfBeds)
158
    {
159
        return $this->setProperty('numberOfBeds', $numberOfBeds);
160
    }
161
162
    /**
163
     * Indicates a potential Action, which describes an idealized action in
164
     * which this thing would play an 'object' role.
165
     *
166
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
167
     *
168
     * @return static
169
     *
170
     * @see http://schema.org/potentialAction
171
     */
172
    public function potentialAction($potentialAction)
173
    {
174
        return $this->setProperty('potentialAction', $potentialAction);
175
    }
176
177
    /**
178
     * URL of a reference Web page that unambiguously indicates the item's
179
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
180
     * official website.
181
     *
182
     * @param string|string[] $sameAs
183
     *
184
     * @return static
185
     *
186
     * @see http://schema.org/sameAs
187
     */
188
    public function sameAs($sameAs)
189
    {
190
        return $this->setProperty('sameAs', $sameAs);
191
    }
192
193
    /**
194
     * A CreativeWork or Event about this Thing.
195
     *
196
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
197
     *
198
     * @return static
199
     *
200
     * @see http://schema.org/subjectOf
201
     */
202
    public function subjectOf($subjectOf)
203
    {
204
        return $this->setProperty('subjectOf', $subjectOf);
205
    }
206
207
    /**
208
     * The type of bed to which the BedDetail refers, i.e. the type of bed
209
     * available in the quantity indicated by quantity.
210
     *
211
     * @param string|string[] $typeOfBed
212
     *
213
     * @return static
214
     *
215
     * @see http://schema.org/typeOfBed
216
     */
217
    public function typeOfBed($typeOfBed)
218
    {
219
        return $this->setProperty('typeOfBed', $typeOfBed);
220
    }
221
222
    /**
223
     * URL of the item.
224
     *
225
     * @param string|string[] $url
226
     *
227
     * @return static
228
     *
229
     * @see http://schema.org/url
230
     */
231
    public function url($url)
232
    {
233
        return $this->setProperty('url', $url);
234
    }
235
236
}
237