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

Resolver::isPharRelease()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
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