Completed
Push — master ( 5d7e0f...d5e6f7 )
by
unknown
02:39
created

bootstrap.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
@trigger_error("This autoloader just for dummy testing. Just run 'composer dump-autoload --optimize' and you're set.", E_USER_DEPRECATED);
0 ignored issues
show
Security Best Practice introduced by
It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.

If you suppress an error, we recommend checking for the error condition explicitly:

// For example instead of
@mkdir($dir);

// Better use
if (@mkdir($dir) === false) {
    throw new \RuntimeException('The directory '.$dir.' could not be created.');
}
Loading history...
4
5
\spl_autoload_register(function($className) {
6
	$rootDir = __DIR__ . DIRECTORY_SEPARATOR . 'src';
7
8
	$namespace = 'DependencyInjection';
9
10
	$className = str_replace(
11
		'\\',
12
		DIRECTORY_SEPARATOR,
13
		str_replace($namespace, $rootDir, $className)
14
	);
15
16
	$className .= '.php';
17
18
	if ($file = stream_resolve_include_path($className)) {
19
		require_once $file;
20
	}
21
});
22