Completed
Push — master ( cf38d9...2ecc50 )
by Rob
01:50
created

System::iconv_loaded()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace devtoolboxuk\soteria\voku\Resources;
4
5
class System
6
{
7
8 6
    public function mbstring_loaded()
0 ignored issues
show
Coding Style Naming introduced by
The method mbstring_loaded is not named in camelCase.

This check marks method names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
Method name "System::mbstring_loaded" is not in camel caps format
Loading history...
9
    {
10 6
        return extension_loaded('mbstring');
11
    }
12
13 6
    public function mbstring_overloaded()
0 ignored issues
show
Coding Style Naming introduced by
The method mbstring_overloaded is not named in camelCase.

This check marks method names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
Method name "System::mbstring_overloaded" is not in camel caps format
Loading history...
14
    {
15 6
        return defined('MB_OVERLOAD_STRING') && ((int)@ini_get('mbstring.func_overload') & \MB_OVERLOAD_STRING);
16
    }
17
18
    public function isPHPCompatible()
19
    {
20
        if (in_array(phpversion(), ['5.4.16', '5.4.45'])) {
21
            return false;
22
        }
23
24
        if (version_compare(PHP_VERSION, '5.6.0') >= 0) {
25
            return true;
26
        }
27
        return false;
28
    }
29
30
31 6
    public function iconv_loaded()
0 ignored issues
show
Coding Style Naming introduced by
The method iconv_loaded is not named in camelCase.

This check marks method names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
Method name "System::iconv_loaded" is not in camel caps format
Loading history...
32
    {
33 6
        return extension_loaded('iconv');
34
    }
35
36 6
    public function intl_loaded()
0 ignored issues
show
Coding Style Naming introduced by
The method intl_loaded is not named in camelCase.

This check marks method names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
Method name "System::intl_loaded" is not in camel caps format
Loading history...
37
    {
38 6
        return extension_loaded('intl');
39
    }
40
41 6
    public function intlChar_loaded()
0 ignored issues
show
Coding Style Naming introduced by
The method intlChar_loaded is not named in camelCase.

This check marks method names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
Method name "System::intlChar_loaded" is not in camel caps format
Loading history...
42
    {
43 6
        return class_exists('IntlChar');
44
    }
45
46 6
    public function ctype_loaded()
0 ignored issues
show
Coding Style Naming introduced by
The method ctype_loaded is not named in camelCase.

This check marks method names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
Method name "System::ctype_loaded" is not in camel caps format
Loading history...
47
    {
48 6
        return extension_loaded('ctype');
49
    }
50
51 6
    public function finfo_loaded()
0 ignored issues
show
Coding Style Naming introduced by
The method finfo_loaded is not named in camelCase.

This check marks method names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
Method name "System::finfo_loaded" is not in camel caps format
Loading history...
52
    {
53 6
        return class_exists('finfo');
54
    }
55
56 6
    public function json_loaded()
0 ignored issues
show
Coding Style Naming introduced by
The method json_loaded is not named in camelCase.

This check marks method names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
Method name "System::json_loaded" is not in camel caps format
Loading history...
57
    {
58 6
        return function_exists('json_decode');
59
    }
60
61 6
    public function pcre_utf8_support()
0 ignored issues
show
Coding Style Naming introduced by
The method pcre_utf8_support is not named in camelCase.

This check marks method names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
Method name "System::pcre_utf8_support" is not in camel caps format
Loading history...
62
    {
63 6
        return (bool)@preg_match('//u', '');
64
    }
65
66
67 6
    public function symfony_polyfill_used()
0 ignored issues
show
Coding Style Naming introduced by
The method symfony_polyfill_used is not named in camelCase.

This check marks method names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style introduced by
Method name "System::symfony_polyfill_used" is not in camel caps format
Loading history...
68
    {
69
        // init
70 6
        $return = false;
71
72 6
        $returnTmp = extension_loaded('mbstring');
73 6
        if ($returnTmp === false && function_exists('mb_strlen')) {
74
            $return = true;
75
        }
76
77 6
        $returnTmp = extension_loaded('iconv');
78 6
        if ($returnTmp === false && function_exists('iconv')) {
79
            $return = true;
80
        }
81
82 6
        return $return;
83
    }
84
85
}