Role::endDate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Spatie\SchemaOrg;
4
5
use \Spatie\SchemaOrg\Contracts\RoleContract;
6
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
7
use \Spatie\SchemaOrg\Contracts\ThingContract;
8
9
/**
10
 * Represents additional information about a relationship or property. For
11
 * example a Role can be used to say that a 'member' role linking some
12
 * SportsTeam to a player occurred during a particular time period. Or that a
13
 * Person's 'actor' role in a Movie was for some particular characterName. Such
14
 * properties can be attached to a Role entity, which is then associated with
15
 * the main entities using ordinary properties like 'member' or 'actor'.
16
 * 
17
 * See also [blog post](http://blog.schema.org/2014/06/introducing-role.html).
18
 *
19
 * @see http://schema.org/Role
20
 *
21
 */
22 View Code Duplication
class Role extends BaseType implements RoleContract, IntangibleContract, ThingContract
0 ignored issues
show
Duplication introduced by
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...
23
{
24
    /**
25
     * An additional type for the item, typically used for adding more specific
26
     * types from external vocabularies in microdata syntax. This is a
27
     * relationship between something and a class that the thing is in. In RDFa
28
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
29
     * attribute - for multiple types. Schema.org tools may have only weaker
30
     * understanding of extra types, in particular those defined externally.
31
     *
32
     * @param string|string[] $additionalType
33
     *
34
     * @return static
35
     *
36
     * @see http://schema.org/additionalType
37
     */
38
    public function additionalType($additionalType)
39
    {
40
        return $this->setProperty('additionalType', $additionalType);
41
    }
42
43
    /**
44
     * An alias for the item.
45
     *
46
     * @param string|string[] $alternateName
47
     *
48
     * @return static
49
     *
50
     * @see http://schema.org/alternateName
51
     */
52
    public function alternateName($alternateName)
53
    {
54
        return $this->setProperty('alternateName', $alternateName);
55
    }
56
57
    /**
58
     * A description of the item.
59
     *
60
     * @param string|string[] $description
61
     *
62
     * @return static
63
     *
64
     * @see http://schema.org/description
65
     */
66
    public function description($description)
67
    {
68
        return $this->setProperty('description', $description);
69
    }
70
71
    /**
72
     * A sub property of description. A short description of the item used to
73
     * disambiguate from other, similar items. Information from other properties
74
     * (in particular, name) may be necessary for the description to be useful
75
     * for disambiguation.
76
     *
77
     * @param string|string[] $disambiguatingDescription
78
     *
79
     * @return static
80
     *
81
     * @see http://schema.org/disambiguatingDescription
82
     */
83
    public function disambiguatingDescription($disambiguatingDescription)
84
    {
85
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
86
    }
87
88
    /**
89
     * The end date and time of the item (in [ISO 8601 date
90
     * format](http://en.wikipedia.org/wiki/ISO_8601)).
91
     *
92
     * @param \DateTimeInterface|\DateTimeInterface[] $endDate
93
     *
94
     * @return static
95
     *
96
     * @see http://schema.org/endDate
97
     */
98
    public function endDate($endDate)
99
    {
100
        return $this->setProperty('endDate', $endDate);
101
    }
102
103
    /**
104
     * The identifier property represents any kind of identifier for any kind of
105
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
106
     * dedicated properties for representing many of these, either as textual
107
     * strings or as URL (URI) links. See [background
108
     * notes](/docs/datamodel.html#identifierBg) for more details.
109
     *
110
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
111
     *
112
     * @return static
113
     *
114
     * @see http://schema.org/identifier
115
     */
116
    public function identifier($identifier)
117
    {
118
        return $this->setProperty('identifier', $identifier);
119
    }
120
121
    /**
122
     * An image of the item. This can be a [[URL]] or a fully described
123
     * [[ImageObject]].
124
     *
125
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
126
     *
127
     * @return static
128
     *
129
     * @see http://schema.org/image
130
     */
131
    public function image($image)
132
    {
133
        return $this->setProperty('image', $image);
134
    }
135
136
    /**
137
     * Indicates a page (or other CreativeWork) for which this thing is the main
138
     * entity being described. See [background
139
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
140
     *
141
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
142
     *
143
     * @return static
144
     *
145
     * @see http://schema.org/mainEntityOfPage
146
     */
147
    public function mainEntityOfPage($mainEntityOfPage)
148
    {
149
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
150
    }
151
152
    /**
153
     * The name of the item.
154
     *
155
     * @param string|string[] $name
156
     *
157
     * @return static
158
     *
159
     * @see http://schema.org/name
160
     */
161
    public function name($name)
162
    {
163
        return $this->setProperty('name', $name);
164
    }
165
166
    /**
167
     * A position played, performed or filled by a person or organization, as
168
     * part of an organization. For example, an athlete in a SportsTeam might
169
     * play in the position named 'Quarterback'.
170
     *
171
     * @param string|string[] $namedPosition
172
     *
173
     * @return static
174
     *
175
     * @see http://schema.org/namedPosition
176
     */
177
    public function namedPosition($namedPosition)
178
    {
179
        return $this->setProperty('namedPosition', $namedPosition);
180
    }
181
182
    /**
183
     * Indicates a potential Action, which describes an idealized action in
184
     * which this thing would play an 'object' role.
185
     *
186
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
187
     *
188
     * @return static
189
     *
190
     * @see http://schema.org/potentialAction
191
     */
192
    public function potentialAction($potentialAction)
193
    {
194
        return $this->setProperty('potentialAction', $potentialAction);
195
    }
196
197
    /**
198
     * A role played, performed or filled by a person or organization. For
199
     * example, the team of creators for a comic book might fill the roles named
200
     * 'inker', 'penciller', and 'letterer'; or an athlete in a SportsTeam might
201
     * play in the position named 'Quarterback'.
202
     *
203
     * @param string|string[] $roleName
204
     *
205
     * @return static
206
     *
207
     * @see http://schema.org/roleName
208
     */
209
    public function roleName($roleName)
210
    {
211
        return $this->setProperty('roleName', $roleName);
212
    }
213
214
    /**
215
     * URL of a reference Web page that unambiguously indicates the item's
216
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
217
     * official website.
218
     *
219
     * @param string|string[] $sameAs
220
     *
221
     * @return static
222
     *
223
     * @see http://schema.org/sameAs
224
     */
225
    public function sameAs($sameAs)
226
    {
227
        return $this->setProperty('sameAs', $sameAs);
228
    }
229
230
    /**
231
     * The start date and time of the item (in [ISO 8601 date
232
     * format](http://en.wikipedia.org/wiki/ISO_8601)).
233
     *
234
     * @param \DateTimeInterface|\DateTimeInterface[] $startDate
235
     *
236
     * @return static
237
     *
238
     * @see http://schema.org/startDate
239
     */
240
    public function startDate($startDate)
241
    {
242
        return $this->setProperty('startDate', $startDate);
243
    }
244
245
    /**
246
     * A CreativeWork or Event about this Thing.
247
     *
248
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
249
     *
250
     * @return static
251
     *
252
     * @see http://schema.org/subjectOf
253
     */
254
    public function subjectOf($subjectOf)
255
    {
256
        return $this->setProperty('subjectOf', $subjectOf);
257
    }
258
259
    /**
260
     * URL of the item.
261
     *
262
     * @param string|string[] $url
263
     *
264
     * @return static
265
     *
266
     * @see http://schema.org/url
267
     */
268
    public function url($url)
269
    {
270
        return $this->setProperty('url', $url);
271
    }
272
273
}
274