BitrixCommand::isEnabled()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
1
<?php
2
/**
3
 * For the full copyright and license information, please view the LICENSE.md
4
 * file that was distributed with this source code.
5
 */
6
7
namespace Notamedia\ConsoleJedi\Application\Command;
8
9
/**
10
 * Base class for Bitrix console command.
11
 *
12
 * @author Nik Samokhvalov <[email protected]>
13
 */
14
class BitrixCommand extends Command
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function isEnabled()
20
    {
21
        if ($this->getApplication()->isBitrixLoaded()) {
22
            return true;
23
        }
24
25
        return false;
26
    }
27
}