Completed
Push — master ( 6196eb...d257bb )
by Vítězslav
04:08
created

bootstrap.php ➔ _()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 23 and the first side effect is on line 9.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
/**
3
 * FlexiPeeHP - nastavení testů.
4
 *
5
 * @author     Vítězslav Dvořák <[email protected]>
6
 * @copyright  2015 Spoje.Net
7
 */
8
if (file_exists('../vendor/autoload.php')) {
9
    include_once '../vendor/autoload.php';
10
} else {
11
    if (file_exists('vendor/autoload.php')) { //For Test Generator
12
        include_once 'vendor/autoload.php';
13
    }
14
}
15
16
if (!function_exists('_')) {
17
18
    /**
19
     * Maketa Gettextu pro HHVM
20
     * @param string $a
21
     * @return string
22
     */
23
    function _($a)
24
    {
25
        return $a;
26
    }
27
}
28
29
/**
30
 * Write logs as:
31
 */
32
define('LOG_NAME', 'FlexiPeeHP');
33
34
$testServer = 'official';
35
switch ($testServer) {
36
    case 'official':
37
////
38
//// Config for official test server
39
////
40
41
        /*
42
         * URL Flexibee API
43
         */
44
        define('FLEXIBEE_URL', 'https://demo.flexibee.eu');
45
        /*
46
         * Uživatel FlexiBee API
47
         */
48
        define('FLEXIBEE_LOGIN', 'winstrom');
49
        /*
50
         * Heslo FlexiBee API
51
         */
52
        define('FLEXIBEE_PASSWORD', 'winstrom');
53
        /*
54
         * Společnost v FlexiBee
55
         */
56
        define('FLEXIBEE_COMPANY', 'demo');
57
58
59
        break;
60
    case 'spoje.net':
61
//
62
// Config for Spoje.Net
63
//
64
65
        /*
66
         * URL Flexibee API
67
         */
68
        define('FLEXIBEE_URL', 'https://flexibee-dev.spoje.net:5434');
69
        /*
70
         * Uživatel FlexiBee API
71
         */
72
        define('FLEXIBEE_LOGIN', 'test');
73
        /*
74
         * Heslo FlexiBee API
75
         */
76
        define('FLEXIBEE_PASSWORD', 'testing');
77
        /*
78
         * Společnost v FlexiBee
79
         */
80
        define('FLEXIBEE_COMPANY', 'test');
81
82
83
        break;
84
85
    default:
86
//
87
// Config for localhost
88
//
89
90
        /*
91
         * URL Flexibee API
92
         */
93
        define('FLEXIBEE_URL', 'https://localhost:5434');
94
        /*
95
         * Uživatel FlexiBee API
96
         */
97
        define('FLEXIBEE_LOGIN', 'admin');
98
        /*
99
         * Heslo FlexiBee API
100
         */
101
        define('FLEXIBEE_PASSWORD', 'admin123');
102
        /*
103
         * Společnost v FlexiBee
104
         */
105
        define('FLEXIBEE_COMPANY', 'spoje_net_s_r_o_1');
106
107
        break;
108
}
109
110
111