HowToTool::additionalType()   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\HowToToolContract;
6
use \Spatie\SchemaOrg\Contracts\HowToItemContract;
7
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
8
use \Spatie\SchemaOrg\Contracts\ListItemContract;
9
use \Spatie\SchemaOrg\Contracts\ThingContract;
10
11
/**
12
 * A tool used (but not consumed) when performing instructions for how to
13
 * achieve a result.
14
 *
15
 * @see http://schema.org/HowToTool
16
 *
17
 */
18 View Code Duplication
class HowToTool extends BaseType implements HowToToolContract, HowToItemContract, IntangibleContract, ListItemContract, 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...
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
     * An entity represented by an entry in a list or data feed (e.g. an
119
     * 'artist' in a list of 'artists')’.
120
     *
121
     * @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $item
122
     *
123
     * @return static
124
     *
125
     * @see http://schema.org/item
126
     */
127
    public function item($item)
128
    {
129
        return $this->setProperty('item', $item);
130
    }
131
132
    /**
133
     * Indicates a page (or other CreativeWork) for which this thing is the main
134
     * entity being described. See [background
135
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
136
     *
137
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
138
     *
139
     * @return static
140
     *
141
     * @see http://schema.org/mainEntityOfPage
142
     */
143
    public function mainEntityOfPage($mainEntityOfPage)
144
    {
145
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
146
    }
147
148
    /**
149
     * The name of the item.
150
     *
151
     * @param string|string[] $name
152
     *
153
     * @return static
154
     *
155
     * @see http://schema.org/name
156
     */
157
    public function name($name)
158
    {
159
        return $this->setProperty('name', $name);
160
    }
161
162
    /**
163
     * A link to the ListItem that follows the current one.
164
     *
165
     * @param \Spatie\SchemaOrg\Contracts\ListItemContract|\Spatie\SchemaOrg\Contracts\ListItemContract[] $nextItem
166
     *
167
     * @return static
168
     *
169
     * @see http://schema.org/nextItem
170
     */
171
    public function nextItem($nextItem)
172
    {
173
        return $this->setProperty('nextItem', $nextItem);
174
    }
175
176
    /**
177
     * The position of an item in a series or sequence of items.
178
     *
179
     * @param int|int[]|string|string[] $position
180
     *
181
     * @return static
182
     *
183
     * @see http://schema.org/position
184
     */
185
    public function position($position)
186
    {
187
        return $this->setProperty('position', $position);
188
    }
189
190
    /**
191
     * Indicates a potential Action, which describes an idealized action in
192
     * which this thing would play an 'object' role.
193
     *
194
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
195
     *
196
     * @return static
197
     *
198
     * @see http://schema.org/potentialAction
199
     */
200
    public function potentialAction($potentialAction)
201
    {
202
        return $this->setProperty('potentialAction', $potentialAction);
203
    }
204
205
    /**
206
     * A link to the ListItem that preceeds the current one.
207
     *
208
     * @param \Spatie\SchemaOrg\Contracts\ListItemContract|\Spatie\SchemaOrg\Contracts\ListItemContract[] $previousItem
209
     *
210
     * @return static
211
     *
212
     * @see http://schema.org/previousItem
213
     */
214
    public function previousItem($previousItem)
215
    {
216
        return $this->setProperty('previousItem', $previousItem);
217
    }
218
219
    /**
220
     * The required quantity of the item(s).
221
     *
222
     * @param \Spatie\SchemaOrg\Contracts\QuantitativeValueContract|\Spatie\SchemaOrg\Contracts\QuantitativeValueContract[]|float|float[]|int|int[]|string|string[] $requiredQuantity
223
     *
224
     * @return static
225
     *
226
     * @see http://schema.org/requiredQuantity
227
     */
228
    public function requiredQuantity($requiredQuantity)
229
    {
230
        return $this->setProperty('requiredQuantity', $requiredQuantity);
231
    }
232
233
    /**
234
     * URL of a reference Web page that unambiguously indicates the item's
235
     * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
236
     * official website.
237
     *
238
     * @param string|string[] $sameAs
239
     *
240
     * @return static
241
     *
242
     * @see http://schema.org/sameAs
243
     */
244
    public function sameAs($sameAs)
245
    {
246
        return $this->setProperty('sameAs', $sameAs);
247
    }
248
249
    /**
250
     * A CreativeWork or Event about this Thing.
251
     *
252
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
253
     *
254
     * @return static
255
     *
256
     * @see http://schema.org/subjectOf
257
     */
258
    public function subjectOf($subjectOf)
259
    {
260
        return $this->setProperty('subjectOf', $subjectOf);
261
    }
262
263
    /**
264
     * URL of the item.
265
     *
266
     * @param string|string[] $url
267
     *
268
     * @return static
269
     *
270
     * @see http://schema.org/url
271
     */
272
    public function url($url)
273
    {
274
        return $this->setProperty('url', $url);
275
    }
276
277
}
278