Passed
Push — master ( b89ee9...82ea21 )
by Sebastian
03:18
created

Resolver   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
c 1
b 0
f 0
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A isPharRelease() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of captainhook.
5
 *
6
 * (c) Sebastian Feldmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace CaptainHook\App\Console\Runtime;
13
14
/**
15
 * Class Resolver
16
 *
17
 * @package CaptainHook\App
18
 */
19
class Resolver
20
{
21
    /**
22
     * PHAR flag, replaced by box during PHAR building
23
     *
24
     * @var bool
25
     */
26
    private $runtime = '@runtime@';
27
28
    /**
29
     * Check if the current runtime is executed via PHAR
30
     *
31
     * @return bool
32
     */
33
    public function isPharRelease(): bool
34
    {
35
        return $this->runtime === 'PHAR';
36
    }
37
}
38