Completed
Push — master ( 3e0d05...5aac82 )
by Joschi
03:56
created

Relations   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 90
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 2
c 5
b 0
f 0
lcom 0
cbo 1
dl 0
loc 90
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A toArray() 0 4 1
1
<?php
2
3
/**
4
 * apparat-object
5
 *
6
 * @category    Apparat
7
 * @package     Apparat\Object
8
 * @subpackage  Apparat\Object\Application
9
 * @author      Joschi Kuphal <[email protected]> / @jkphl
10
 * @copyright   Copyright © 2016 Joschi Kuphal <[email protected]> / @jkphl
11
 * @license     http://opensource.org/licenses/MIT	The MIT License (MIT)
0 ignored issues
show
Coding Style introduced by
Spaces must be used for alignment; tabs are not allowed
Loading history...
12
 */
13
14
/***********************************************************************************
15
 *  The MIT License (MIT)
16
 *
17
 *  Copyright © 2016 Joschi Kuphal <[email protected]> / @jkphl
18
 *
19
 *  Permission is hereby granted, free of charge, to any person obtaining a copy of
20
 *  this software and associated documentation files (the "Software"), to deal in
21
 *  the Software without restriction, including without limitation the rights to
22
 *  use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
23
 *  the Software, and to permit persons to whom the Software is furnished to do so,
24
 *  subject to the following conditions:
25
 *
26
 *  The above copyright notice and this permission notice shall be included in all
27
 *  copies or substantial portions of the Software.
28
 *
29
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
31
 *  FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
32
 *  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
33
 *  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
34
 *  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35
 ***********************************************************************************/
36
37
namespace Apparat\Object\Domain\Model\Properties;
38
39
use Apparat\Object\Domain\Model\Object\ObjectInterface;
40
41
/**
42
 * Object resource relations
43
 *
44
 * @package Apparat\Object
45
 * @subpackage Apparat\Object\Application
46
 */
47
class Relations extends AbstractProperties
48
{
49
    /**
50
     * Collection name
51
     *
52
     * @var string
53
     */
54
    const COLLECTION = 'relations';
55
    /**
56
     * Active resource referral
57
     *
58
     * @var string
59
     */
60
    const REFERS_TO = 'refers-to';
61
    /**
62
     * Passive resource referral
63
     *
64
     * @var string
65
     */
66
    const REFERRED_BY = 'referred-by';
67
    /**
68
     * Active resource embedding
69
     *
70
     * @var string
71
     */
72
    const EMBEDS = 'embeds';
73
    /**
74
     * Passive resource embedding
75
     *
76
     * @var string
77
     */
78
    const EMBEDDED_BY = 'embedded-by';
79
    /**
80
     * Active resource reply
81
     *
82
     * @var string
83
     */
84
    const REPLIES_TO = 'replies-to';
85
    /**
86
     * Passive resource reply
87
     *
88
     * @var string
89
     */
90
    const REPLIED_BY = 'replied-by';
91
    /**
92
     * Active resource liking
93
     *
94
     * @var string
95
     */
96
    const LIKES = 'likes';
97
    /**
98
     * Passive resource liking
99
     *
100
     * @var string
101
     */
102
    const LIKED_BY = 'liked-by';
103
    /**
104
     * Active resource re-posting
105
     *
106
     * @var string
107
     */
108
    const REPOSTS = 'reposts';
109
    /**
110
     * Passive resource re-posting
111
     *
112
     * @var string
113
     */
114
    const REPOSTED_BY = 'reposted-by';
115
116
    /**
117
     * Relations constructor
118
     *
119
     * @param array $data Property data
120
     * @param ObjectInterface $object Owner object
121
     */
122 1
    public function __construct(array $data, ObjectInterface $object)
123
    {
124 1
        parent::__construct($data, $object);
125 1
    }
126
127
    /**
128
     * Return the property values as array
129
     *
130
     * @return array Property values
131
     */
132 1
    public function toArray()
133
    {
134 1
        return [];
135
    }
136
}
137