GameReleaseScan   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 20
dl 0
loc 41
rs 10
c 0
b 0
f 0
wmc 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getImage() 0 2 1
A getId() 0 2 1
A getNotes() 0 2 1
A getType() 0 2 1
A getFile() 0 2 1
A __construct() 0 12 5
1
<?php
2
namespace AL\Common\Model\Game;
3
4
/**
5
 * Maps to the `game_release_scans` table
6
 */
7
class GameReleaseScan {
8
    private $id;
9
    private $game_release_id;
10
    private $type;
11
    private $notes;
12
    private $image;
13
    private $file;
14
15
    public function __construct($id, $game_release_id, $type, $imgext, $notes) {
16
        $this->id = $id;
17
        $this->game_release_id = $game_release_id;
18
        $this->type = $type;
19
        $this->notes = $notes;
20
21
        if ($imgext && $imgext !== "") {
22
            $this->image = $GLOBALS['game_release_scan_path']."{$id}.{$imgext}";
23
        }
24
25
        if ($imgext && $imgext !== "") {
26
            $this->file = $GLOBALS['game_release_scan_save_path']."{$id}.{$imgext}";
27
        }
28
    }
29
30
    public function getId() {
31
        return $this->id;
32
    }
33
34
    public function getImage() {
35
        return $this->image;
36
    }
37
38
    public function getFile() {
39
        return $this->file;
40
    }
41
42
    public function getType() {
43
        return $this->type;
44
    }
45
46
    public function getNotes() {
47
        return $this->notes;
48
    }
49
}
50