Passed
Push — master ( 730218...5f362f )
by Matthias
10:39 queued 08:10
created

Property   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 51
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Fusonic\OpenGraph;
4
5
/**
6
 * Class holding data for a single Open Graph property on a web page.
7
 */
8
class Property
9
{
10
    const AUDIO = "og:audio";
11
    const AUDIO_SECURE_URL = "og:audio:secure_url";
12
    const AUDIO_TYPE = "og:audio:type";
13
    const AUDIO_URL = "og:audio:url";
14
    const DESCRIPTION = "og:description";
15
    const DETERMINER = "og:determiner";
16
    const IMAGE = "og:image";
17
    const IMAGE_HEIGHT = "og:image:height";
18
    const IMAGE_SECURE_URL = "og:image:secure_url";
19
    const IMAGE_TYPE = "og:image:type";
20
    const IMAGE_URL = "og:image:url";
21
    const IMAGE_WIDTH = "og:image:width";
22
    const IMAGE_USER_GENERATED = "og:image:user_generated";
23
    const LOCALE = "og:locale";
24
    const LOCALE_ALTERNATE = "og:locale:alternate";
25
    const RICH_ATTACHMENT = "og:rich_attachment";
26
    const SEE_ALSO = "og:see_also";
27
    const SITE_NAME = "og:site_name";
28
    const TITLE = "og:title";
29
    const TYPE = "og:type";
30
    const UPDATED_TIME = "og:updated_time";
31
    const URL = "og:url";
32
    const VIDEO = "og:video";
33
    const VIDEO_HEIGHT = "og:video:height";
34
    const VIDEO_SECURE_URL = "og:video:secure_url";
35
    const VIDEO_TYPE = "og:video:type";
36
    const VIDEO_URL = "og:video:url";
37
    const VIDEO_WIDTH = "og:video:width";
38
39
    /**
40
     * Key of the property without "og:" prefix.
41
     */
42
    public string $key;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
43
44
    /**
45
     * Value of the property.
46
     */
47
    public $value;
48
49 25
    public function __construct(string $key, $value)
50
    {
51 25
        $this->key = $key;
52 25
        $this->value = $value;
53 25
    }
54
}
55