Issues (152)

testing/bootstrap.php (1 issue)

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 27 and the first side effect is on line 14.

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
9
/**
10
 * Predefined server:One of:
11
 *
12
 * official|vitexsoftware|localhost
13
 */
14
$testServer = 'vitexsoftware';
15
16
if (file_exists('../vendor/autoload.php')) {
17
    include_once '../vendor/autoload.php';
18
} else {
19
    if (file_exists('vendor/autoload.php')) { //For Test Generator
20
        include_once 'vendor/autoload.php';
21
    }
22
}
23
/**
24
 * Write logs as:
25
 */
26
if (!defined('EASE_APPNAME')) {
27
    define('EASE_APPNAME', 'FlexiPeeHPtest');
28
}
29
if (!defined('EASE_LOGGER')) {
30
    define('EASE_LOGGER', 'syslog');
31
}
32
33
34
switch ($testServer) {
35
    case 'official':
36
////
37
//// Config for official test server
38
////
39
40
        /*
41
         * URL Flexibee API
42
         */
43
        define('FLEXIBEE_URL', 'https://demo.flexibee.eu');
44
        /*
45
         * Uživatel FlexiBee API
46
         */
47
        define('FLEXIBEE_LOGIN', 'winstrom');
48
        /*
49
         * Heslo FlexiBee API
50
         */
51
        define('FLEXIBEE_PASSWORD', 'winstrom');
52
        /*
53
         * Společnost v FlexiBee
54
         */
55
        define('FLEXIBEE_COMPANY', 'demo');
56
57
58
        break;
59
    case 'vitexsoftware':
60
//
61
// Config for Spoje.Net
62
//
63
64
        /*
65
         * URL Flexibee API
66
         */
67
        define('FLEXIBEE_URL', 'https://vitexsoftware.flexibee.eu:5434');
68
        /*
69
         * Uživatel FlexiBee API
70
         */
71
        define('FLEXIBEE_LOGIN', 'flexipeehp');
72
        /*
73
         * Heslo FlexiBee API
74
         */
75
        define('FLEXIBEE_PASSWORD', '8Ojeton_');
76
        /*
77
         * Společnost v FlexiBee
78
         */
79
        define('FLEXIBEE_COMPANY', 'flexipeehp');
80
81
82
        break;
83
84
    default:
85
//
86
// Config for localhost
87
//
88
89
        /*
90
         * URL Flexibee API
91
         */
92
        define('FLEXIBEE_URL', 'https://localhost:5434');
93
        /*
94
         * Uživatel FlexiBee API
95
         */
96
        define('FLEXIBEE_LOGIN', 'admin');
97
        /*
98
         * Heslo FlexiBee API
99
         */
100
        define('FLEXIBEE_PASSWORD', 'admin123');
101
        /*
102
         * Společnost v FlexiBee
103
         */
104
        define('FLEXIBEE_COMPANY', 'testing_s_r_o_');
105
106
        break;
107
}
108
109
110