Passed
Push — master ( 1e2c3f...81d1e8 )
by Michal
11:41 queued 10:00
created

Facebook::getFbAppId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SeoHelper\MetaData;
6
7
/**
8
 * @method BaseMetaData addOgTitle(string $ogTitle)
9
 * @method BaseMetaData setOgTitle(string $ogTitle)
10
 * @method BaseMetaData resetOgTitle(string|null $ogTitle = null)
11
 * @method BaseMetaData addOgDescription(string $ogDescription)
12
 * @method BaseMetaData setOgDescription(string $ogDescription)
13
 * @method BaseMetaData resetOgDescription(string|null $ogDescription = null)
14
 * @method BaseMetaData setOgType(string $ogType)
15
 * @method BaseMetaData setOgUrl(string $ogUrl)
16
 * @method BaseMetaData addOgImage(string $image)
17
 * @method BaseMetaData setOgImage(string $image)
18
 * @method BaseMetaData resetOgImage(string|null $image = null)
19
 * @method BaseMetaData setFbAdmins(string $fbAdmins)
20
 * @method BaseMetaData setFbPages(string $fbPages)
21
 */
22
trait Facebook
23
{
24
    abstract public function set(string $key, string|array $value): static;
25
26
    abstract public function get(?string $key = null): ?array;
27
28
    public function setOgSiteName(string $siteName): static
29
    {
30
        return $this->set('og:site_name', $siteName);
31
    }
32 3
33
    public function getOgSiteName(): ?array
34 3
    {
35
        return $this->get('og:site_name');
36
    }
37 3
38
    public function setFbAppId($appId): static
39 3
    {
40
        return $this->set('fb:app_id', $appId);
41
    }
42
43
    public function getFbAppId(): ?array
44
    {
45
        return $this->get('fb:app_id');
46
    }
47
}
48