Completed
Push — master ( a33308...36ba79 )
by Maximilian
01:58
created

tests/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
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
$autoload_paths = array_filter(array(
13
    __DIR__.'/../vendor/autoload.php',
14
    __DIR__.'/../../../../vendor/autoload.php',
15
), 'file_exists');
16
17
if (!$autoload_paths) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $autoload_paths of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.

This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.

Consider making the comparison explicit by using empty(..) or ! empty(...) instead.

Loading history...
18
    throw new RuntimeException('Run "composer install" to run test suite.');
19
}
20
21
require_once current($autoload_paths);
22