UploadableFile   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 40
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getRootPath() 0 4 1
A getWebPath() 0 4 1
1
<?php
2
3
namespace Fenrizbes\UploadableBundle\File;
4
5
use Symfony\Component\HttpFoundation\File\File;
6
7
class UploadableFile extends File
8
{
9
    /**
10
     * Path to the project's root directory
11
     *
12
     * @var string
13
     */
14
    protected $root_path;
15
16
    /**
17
     * Web path to the file
18
     *
19
     * @var string
20
     */
21
    protected $web_path;
22
23
    public function __construct($root_path, $web_path)
24
    {
25
        $this->root_path = $root_path;
26
        $this->web_path  = $web_path;
27
28
        parent::__construct($root_path . $web_path);
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getRootPath()
35
    {
36
        return $this->root_path;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getWebPath()
43
    {
44
        return $this->web_path;
45
    }
46
}