Issues (2756)

includes/load-yourls.php (4 issues)

1
<?php
2
/* Bootstrap YOURLS
0 ignored issues
show
Block comment text must start on a new line
Loading history...
3
 *
4
 * This file initialize everything needed for YOURLS
5
 * If you need to bootstrap YOURLS (ie access its functions and features) simply include this file.
6
 */
7
8
require __DIR__ . '/vendor/autoload.php';
9
10
// Set up YOURLS config
11
12
$config = new \YOURLS\Config\Config;
13
/* The following require has to be at global level so the variables inside config.php, including user defined if any,
0 ignored issues
show
This line exceeds maximum limit of 100 characters; contains 117 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
Block comment text must start on a new line
Loading history...
14
 * are registered in the global scope. If this require is moved in \YOURLS\Config\Config, $yourls_user_passwords for
0 ignored issues
show
This line exceeds maximum limit of 100 characters; contains 116 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
15
 * instance isn't registered.
16
 */
17
if (!defined('YOURLS_CONFIGFILE')) {
18
    define('YOURLS_CONFIGFILE', $config->find_config());
19
}
20
require_once YOURLS_CONFIGFILE;
21
$config->define_core_constants();
22
23
// Initialize YOURLS with default behaviors
24
25
$init_defaults = new \YOURLS\Config\InitDefaults;
26
new \YOURLS\Config\Init($init_defaults);
27