Completed
Pull Request — master (#1735)
by
unknown
03:01
created

SocialMediaPostingTrait::setSharedContent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
namespace luya\web\jsonld;
3
4
/**
5
 * JsonLd - Social Media Posting trait
6
 *
7
 * @see http://schema.org/SocialMediaPosting
8
 *
9
 * @author Alex Schmid <[email protected]>
10
 * @since 1.0.1
11
 */
12
trait SocialMediaPostingTrait
13
{
14
    use ArticleTrait;
15
16
    /**
17
     * @var CreativeWork
18
     */
19
    private $_sharedContent;
20
21
    /**
22
     * @return CreativeWork
23
     */
24
    public function getSharedContent()
25
    {
26
        return $this->_sharedContent;
27
    }
28
29
    /**
30
     * A CreativeWork such as an image, video, or audio clip shared as part of this posting.
31
     *
32
     * @param CreativeWork $sharedContent
33
     * @return SocialMediaPosting|SocialMediaPostingTrait
34
     */
35
    public function setSharedContent($sharedContent)
36
    {
37
        $this->_sharedContent = $sharedContent;
38
        return $this;
39
    }
40
}