GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Overlay::getImagePath()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the O2System Framework package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @author         Steeve Andrian Salim
9
 * @copyright      Copyright (c) Steeve Andrian Salim
10
 */
11
12
// ------------------------------------------------------------------------
13
14
namespace O2System\Image\Watermark;
15
16
// ------------------------------------------------------------------------
17
18
use O2System\Image\Abstracts\AbstractWatermark;
19
20
/**
21
 * Class Overlay
22
 *
23
 * @package O2System\Image\Watermark
24
 */
25
class Overlay extends AbstractWatermark
26
{
27
    /**
28
     * Overlay::$imagePath
29
     *
30
     * Overlay image path.
31
     *
32
     * @var string
33
     */
34
    protected $imagePath;
35
36
    /**
37
     * Overlay::$imageScale
38
     *
39
     * Overlay image scale.
40
     *
41
     * @var int
42
     */
43
    protected $imageScale;
44
45
    // ------------------------------------------------------------------------
46
47
    /**
48
     * Overlay::getImagePath
49
     *
50
     * Gets overlay image path.
51
     *
52
     * @return string
53
     */
54
    public function getImagePath()
55
    {
56
        return $this->imagePath;
57
    }
58
59
    // ------------------------------------------------------------------------
60
61
    /**
62
     * Overlay::setImagePath
63
     *
64
     * Sets overlay image path.
65
     *
66
     * @param string $imagePath
67
     *
68
     * @return static
69
     */
70
    public function setImagePath($imagePath)
71
    {
72
        if (is_file($imagePath)) {
73
            $this->imagePath = realpath($imagePath);
74
        }
75
76
        return $this;
77
    }
78
79
    // ------------------------------------------------------------------------
80
81
    /**
82
     * Overlay::getImageScale
83
     *
84
     * Gets overlay image scale.
85
     *
86
     * @return int|bool
87
     */
88
    public function getImageScale()
89
    {
90
        if ( ! is_null($this->imageScale)) {
0 ignored issues
show
introduced by
The condition is_null($this->imageScale) is always false.
Loading history...
91
            return $this->imageScale;
92
        }
93
94
        return false;
95
    }
96
97
    // ------------------------------------------------------------------------
98
99
    /**
100
     * Overlay::setImageScale
101
     *
102
     * Sets overlay image scale.
103
     *
104
     * @param int $scale
105
     *
106
     * @return $this
107
     */
108
    public function setImageScale($scale)
109
    {
110
        $this->imageScale = (int)$scale;
111
112
        return $this;
113
    }
114
}