Completed
Push — master ( 2d6ebf...a61d5f )
by Basil
17:04
created

SocialMediaPostingTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSharedContent() 0 4 1
A setSharedContent() 0 5 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
    private $_sharedContent;
17
18
    /**
19
     * @return CreativeWork
20
     */
21
    public function getSharedContent()
22
    {
23
        return $this->_sharedContent;
24
    }
25
26
    /**
27
     * A CreativeWork such as an image, video, or audio clip shared as part of this posting.
28
     *
29
     * @param CreativeWork $sharedContent
30
     * @return SocialMediaPosting|SocialMediaPostingTrait
31
     */
32
    public function setSharedContent($sharedContent)
33
    {
34
        $this->_sharedContent = $sharedContent;
35
        return $this;
36
    }
37
}