MonetaryAmount::maxValue()   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\MonetaryAmountContract;
6
use \Spatie\SchemaOrg\Contracts\IntangibleContract;
7
use \Spatie\SchemaOrg\Contracts\StructuredValueContract;
8
use \Spatie\SchemaOrg\Contracts\ThingContract;
9
10
/**
11
 * A monetary value or range. This type can be used to describe an amount of
12
 * money such as $50 USD, or a range as in describing a bank account being
13
 * suitable for a balance between £1,000 and £1,000,000 GBP, or the value of a
14
 * salary, etc. It is recommended to use [[PriceSpecification]] Types to
15
 * describe the price of an Offer, Invoice, etc.
16
 *
17
 * @see http://schema.org/MonetaryAmount
18
 *
19
 */
20 View Code Duplication
class MonetaryAmount extends BaseType implements MonetaryAmountContract, IntangibleContract, StructuredValueContract, 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...
21
{
22
    /**
23
     * An additional type for the item, typically used for adding more specific
24
     * types from external vocabularies in microdata syntax. This is a
25
     * relationship between something and a class that the thing is in. In RDFa
26
     * syntax, it is better to use the native RDFa syntax - the 'typeof'
27
     * attribute - for multiple types. Schema.org tools may have only weaker
28
     * understanding of extra types, in particular those defined externally.
29
     *
30
     * @param string|string[] $additionalType
31
     *
32
     * @return static
33
     *
34
     * @see http://schema.org/additionalType
35
     */
36
    public function additionalType($additionalType)
37
    {
38
        return $this->setProperty('additionalType', $additionalType);
39
    }
40
41
    /**
42
     * An alias for the item.
43
     *
44
     * @param string|string[] $alternateName
45
     *
46
     * @return static
47
     *
48
     * @see http://schema.org/alternateName
49
     */
50
    public function alternateName($alternateName)
51
    {
52
        return $this->setProperty('alternateName', $alternateName);
53
    }
54
55
    /**
56
     * The currency in which the monetary amount is expressed.
57
     * 
58
     * Use standard formats: [ISO 4217 currency
59
     * format](http://en.wikipedia.org/wiki/ISO_4217) e.g. "USD"; [Ticker
60
     * symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for
61
     * cryptocurrencies e.g. "BTC"; well known names for [Local Exchange
62
     * Tradings
63
     * Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system)
64
     * (LETS) and other currency types e.g. "Ithaca HOUR".
65
     *
66
     * @param string|string[] $currency
67
     *
68
     * @return static
69
     *
70
     * @see http://schema.org/currency
71
     */
72
    public function currency($currency)
73
    {
74
        return $this->setProperty('currency', $currency);
75
    }
76
77
    /**
78
     * A description of the item.
79
     *
80
     * @param string|string[] $description
81
     *
82
     * @return static
83
     *
84
     * @see http://schema.org/description
85
     */
86
    public function description($description)
87
    {
88
        return $this->setProperty('description', $description);
89
    }
90
91
    /**
92
     * A sub property of description. A short description of the item used to
93
     * disambiguate from other, similar items. Information from other properties
94
     * (in particular, name) may be necessary for the description to be useful
95
     * for disambiguation.
96
     *
97
     * @param string|string[] $disambiguatingDescription
98
     *
99
     * @return static
100
     *
101
     * @see http://schema.org/disambiguatingDescription
102
     */
103
    public function disambiguatingDescription($disambiguatingDescription)
104
    {
105
        return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
106
    }
107
108
    /**
109
     * The identifier property represents any kind of identifier for any kind of
110
     * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
111
     * dedicated properties for representing many of these, either as textual
112
     * strings or as URL (URI) links. See [background
113
     * notes](/docs/datamodel.html#identifierBg) for more details.
114
     *
115
     * @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
116
     *
117
     * @return static
118
     *
119
     * @see http://schema.org/identifier
120
     */
121
    public function identifier($identifier)
122
    {
123
        return $this->setProperty('identifier', $identifier);
124
    }
125
126
    /**
127
     * An image of the item. This can be a [[URL]] or a fully described
128
     * [[ImageObject]].
129
     *
130
     * @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
131
     *
132
     * @return static
133
     *
134
     * @see http://schema.org/image
135
     */
136
    public function image($image)
137
    {
138
        return $this->setProperty('image', $image);
139
    }
140
141
    /**
142
     * Indicates a page (or other CreativeWork) for which this thing is the main
143
     * entity being described. See [background
144
     * notes](/docs/datamodel.html#mainEntityBackground) for details.
145
     *
146
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
147
     *
148
     * @return static
149
     *
150
     * @see http://schema.org/mainEntityOfPage
151
     */
152
    public function mainEntityOfPage($mainEntityOfPage)
153
    {
154
        return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
155
    }
156
157
    /**
158
     * The upper value of some characteristic or property.
159
     *
160
     * @param float|float[]|int|int[] $maxValue
161
     *
162
     * @return static
163
     *
164
     * @see http://schema.org/maxValue
165
     */
166
    public function maxValue($maxValue)
167
    {
168
        return $this->setProperty('maxValue', $maxValue);
169
    }
170
171
    /**
172
     * The lower value of some characteristic or property.
173
     *
174
     * @param float|float[]|int|int[] $minValue
175
     *
176
     * @return static
177
     *
178
     * @see http://schema.org/minValue
179
     */
180
    public function minValue($minValue)
181
    {
182
        return $this->setProperty('minValue', $minValue);
183
    }
184
185
    /**
186
     * The name of the item.
187
     *
188
     * @param string|string[] $name
189
     *
190
     * @return static
191
     *
192
     * @see http://schema.org/name
193
     */
194
    public function name($name)
195
    {
196
        return $this->setProperty('name', $name);
197
    }
198
199
    /**
200
     * Indicates a potential Action, which describes an idealized action in
201
     * which this thing would play an 'object' role.
202
     *
203
     * @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
204
     *
205
     * @return static
206
     *
207
     * @see http://schema.org/potentialAction
208
     */
209
    public function potentialAction($potentialAction)
210
    {
211
        return $this->setProperty('potentialAction', $potentialAction);
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
     * A CreativeWork or Event about this Thing.
232
     *
233
     * @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
234
     *
235
     * @return static
236
     *
237
     * @see http://schema.org/subjectOf
238
     */
239
    public function subjectOf($subjectOf)
240
    {
241
        return $this->setProperty('subjectOf', $subjectOf);
242
    }
243
244
    /**
245
     * URL of the item.
246
     *
247
     * @param string|string[] $url
248
     *
249
     * @return static
250
     *
251
     * @see http://schema.org/url
252
     */
253
    public function url($url)
254
    {
255
        return $this->setProperty('url', $url);
256
    }
257
258
    /**
259
     * The value of the quantitative value or property value node.
260
     * 
261
     * * For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type
262
     * for values is 'Number'.
263
     * * For [[PropertyValue]], it can be 'Text;', 'Number', 'Boolean', or
264
     * 'StructuredValue'.
265
     * * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT
266
     * NINE' (U+0039)) rather than superficially similiar Unicode symbols.
267
     * * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a
268
     * decimal point. Avoid using these symbols as a readability separator.
269
     *
270
     * @param \Spatie\SchemaOrg\Contracts\StructuredValueContract|\Spatie\SchemaOrg\Contracts\StructuredValueContract[]|bool|bool[]|float|float[]|int|int[]|string|string[] $value
271
     *
272
     * @return static
273
     *
274
     * @see http://schema.org/value
275
     */
276
    public function value($value)
277
    {
278
        return $this->setProperty('value', $value);
279
    }
280
281
}
282