Passed
Push — devel-3.0 ( 218a48...a00b1f )
by Rubén
03:54
created

Checks::checkModules()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 28
Code Lines 20

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 20
nc 3
nop 0
dl 0
loc 28
rs 9.6
c 0
b 0
f 0
1
<?php
2
/**
3
 * sysPass
4
 *
5
 * @author    nuxsmin
6
 * @link      https://syspass.org
7
 * @copyright 2012-2018, Rubén Domínguez nuxsmin@$syspass.org
8
 *
9
 * This file is part of sysPass.
10
 *
11
 * sysPass is free software: you can redistribute it and/or modify
12
 * it under the terms of the GNU General Public License as published by
13
 * the Free Software Foundation, either version 3 of the License, or
14
 * (at your option) any later version.
15
 *
16
 * sysPass is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 *  along with sysPass.  If not, see <http://www.gnu.org/licenses/>.
23
 */
24
25
namespace SP\Util;
26
27
/**
28
 * Class Checks utilidades de comprobación
29
 *
30
 * @package SP\Util
31
 */
32
final class Checks
33
{
34
    /**
35
     * Comprobar si sysPass se ejecuta en W$indows.
36
     *
37
     * @return bool
38
     */
39
    public static function checkIsWindows()
40
    {
41
        return strpos(PHP_OS, 'WIN') === 0;
42
    }
43
44
    /**
45
     * Comprobar la versión de PHP.
46
     *
47
     * @return bool
48
     */
49
    public static function checkPhpVersion()
50
    {
51
        return version_compare(PHP_VERSION, '7.0', '>=') && version_compare(PHP_VERSION, '7.3', '<');
52
    }
53
}
54