GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Sapi::isWindows()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Pimf
4
 *
5
 * @copyright Copyright (c)  Gjero Krsteski (http://krsteski.de)
6
 * @license   http://opensource.org/licenses/MIT MIT License
7
 */
8
9
namespace Pimf;
10
11
/**
12
 * Handles the type of interface between web server and PHP
13
 *
14
 * @package Pimf
15
 * @author  Gjero Krsteski <[email protected]>
16
 */
17
abstract class Sapi
18
{
19
20
    /**
21
     * Are we in a web environment?
22
     *
23
     * @return boolean
24
     */
25
    public static function isWeb()
26
    {
27
        return self::isApache() || self::isIIS() || self::isCgi() || self::isBuiltInWebServer() || self::isHHVM();
28
    }
29
30
    /**
31
     * Are we in a cli environment?
32
     *
33
     * @return boolean
34
     */
35
    public static function isCli()
36
    {
37
        return PHP_SAPI === 'cli';
38
    }
39
40
    /**
41
     * Are we in a cgi environment?
42
     *
43
     * @return boolean
44
     */
45
    public static function isCgi()
46
    {
47
        return PHP_SAPI === 'cgi-fcgi' || PHP_SAPI === 'cgi';
48
    }
49
50
    /**
51
     * Are we served through Apache[2]?
52
     *
53
     * @return boolean
54
     */
55
    public static function isApache()
56
    {
57
        return PHP_SAPI === 'apache2handler' || PHP_SAPI === 'apachehandler';
58
    }
59
60
    /**
61
     * Are we served through IIS?
62
     *
63
     * @return boolean
64
     */
65
    public static function isIIS()
66
    {
67
        return PHP_SAPI == 'isapi';
68
    }
69
70
    /**
71
     * Are we served through PHP's built-in web server.
72
     *
73
     * @return bool
74
     */
75
    public static function isBuiltInWebServer()
76
    {
77
        return PHP_SAPI == 'cli-server';
78
    }
79
80
    /**
81
     * Are we served through HHVM virtual machine
82
     *
83
     * @return bool
84
     */
85
    public static function isHHVM()
86
    {
87
        return PHP_SAPI == 'srv';
88
    }
89
90
    /**
91
     * @return bool
92
     */
93
    public static function isWindows()
94
    {
95
        return (boolean)(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
96
    }
97
}
98