Completed
Push — master ( 2994aa...19d116 )
by Patrick
08:28
created

DeletedMetadata   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 85
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 85
ccs 9
cts 15
cp 0.6
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getName() 0 4 1
A getPathLower() 0 4 1
A getPathDisplay() 0 4 1
A getSharingInfo() 0 4 1
1
<?php
2
namespace Dropbox\Models;
3
4
class DeletedMetadata extends BaseModel
5
{
6
7
    /**
8
     * The last component of the path (including extension)
9
     *
10
     * @var string
11
     */
12
    protected $name;
13
14
    /**
15
     * The lowercased full path in the user's Dropbox
16
     *
17
     * @var string
18
     */
19
    protected $path_lower;
20
21
    /**
22
     * Set if this file is contained in a shared folder
23
     *
24
     * @var \Dropbox\Models\FileSharingInfo
25
     */
26
    protected $sharing_info;
27
28
    /**
29
     * The cased path to be used for display purposes only.
30
     *
31
     *  @var string
32
     */
33
    protected $path_display;
34
35
    /**
36
     * Create a new DeletedtMetadata instance
37
     *
38
     * @param array $data
39
     */
40 1
    public function __construct(array $data)
41
    {
42 1
        parent::__construct($data);
43 1
        $this->name = $this->getDataProperty('name');
44 1
        $this->path_lower = $this->getDataProperty('path_lower');
45 1
        $this->sharing_info = $this->getDataProperty('sharing_info');
46 1
        $this->path_display = $this->getDataProperty('path_display');
47 1
    }
48
49
    /**
50
     * Get the 'name' property of the metadata.
51
     *
52
     * @return string
53
     */
54
    public function getName()
55
    {
56
        return $this->name;
57
    }
58
59
    /**
60
     * Get the 'path_lower' property of the metadata.
61
     *
62
     * @return string
63
     */
64 1
    public function getPathLower()
65
    {
66 1
        return $this->path_lower;
67
    }
68
69
    /**
70
     * Get the 'path_display' property of the metadata.
71
     *
72
     * @return string
73
     */
74
    public function getPathDisplay()
75
    {
76
        return $this->path_display;
77
    }
78
79
    /**
80
     * Get the 'sharing_info' property of the file model.
81
     *
82
     * @return \Dropbox\Models\FileSharingInfo
83
     */
84
    public function getSharingInfo()
85
    {
86
        return $this->sharing_info;
87
    }
88
}
89