Completed
Push — master ( fd0635...f2796c )
by Tom
06:08
created

SpeakableSpecification   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 35
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A cssSelector() 0 4 1
A xpath() 0 4 1
1
<?php
2
3
namespace Spatie\SchemaOrg;
4
5
/**
6
 * A SpeakableSpecification indicates (typically via [[xpath]] or
7
 * [[cssSelector]]) sections of a document that are highlighted as particularly
8
 * [[speakable]]. Instances of this type are expected to be used primarily as
9
 * values of the [[speakable]] property.
10
 *
11
 * @see http://schema.org/SpeakableSpecification
12
 *
13
 * @mixin \Spatie\SchemaOrg\Intangible
14
 */
15
class SpeakableSpecification extends BaseType
16
{
17
    /**
18
     * A CSS selector, e.g. of a [[SpeakableSpecification]] or
19
     * [[WebPageElement]]. In the latter case, multiple matches within a page
20
     * can constitute a single conceptual "Web page element".
21
     *
22
     * @param CssSelectorType|CssSelectorType[] $cssSelector
23
     *
24
     * @return static
25
     *
26
     * @see http://schema.org/cssSelector
27
     */
28
    public function cssSelector($cssSelector)
29
    {
30
        return $this->setProperty('cssSelector', $cssSelector);
31
    }
32
33
    /**
34
     * An XPath, e.g. of a [[SpeakableSpecification]] or [[WebPageElement]]. In
35
     * the latter case, multiple matches within a page can constitute a single
36
     * conceptual "Web page element".
37
     *
38
     * @param XPathType|XPathType[] $xpath
39
     *
40
     * @return static
41
     *
42
     * @see http://schema.org/xpath
43
     */
44
    public function xpath($xpath)
45
    {
46
        return $this->setProperty('xpath', $xpath);
47
    }
48
49
}
50