Passed
Push — master ( 0d8a9b...48a836 )
by f
12:20
created

BasicPureDriver::isInstalled()   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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace wapmorgan\UnifiedArchive\Drivers\Basic;
4
5
abstract class BasicPureDriver extends BasicDriver
6
{
7
    const TYPE = self::TYPE_PURE_PHP;
8
    const PACKAGE_NAME = null;
9
    const MAIN_CLASS = null;
10
11
    public static function isInstalled()
12
    {
13
        return class_exists(static::MAIN_CLASS);
0 ignored issues
show
Bug introduced by
static::MAIN_CLASS of type null is incompatible with the type string expected by parameter $class of class_exists(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

13
        return class_exists(/** @scrutinizer ignore-type */ static::MAIN_CLASS);
Loading history...
14
    }
15
16
    public static function getInstallationInstruction()
17
    {
18
        return 'install library [ ' . static::PACKAGE_NAME . ']: `composer require ' . static::PACKAGE_NAME . '`';
19
    }
20
}
21