private function loadPhpFile($path)
    {
        try {
            $data = include $path;
        } catch (Exception $e) {
            $message = sprintf('PHP file "%s" could not be parsed: %s', $path, $e->getMessage());
            throw new UnexpectedValueException($message, 0, $e);
        } catch (Throwable $e) {
            $message = sprintf('PHP file "%s" could not be parsed: %s', $path, $e->getMessage());
            throw new UnexpectedValueException($message, 0, $e);
        }

        if (is_array($data) || ($data instanceof Traversable)) {
            return $data;
        }

        return [];
    }
private function loadPhpFile($path)
    {
        try {
            $data = include $path;
        } catch (Exception $e) {
            $message = sprintf('PHP file "%s" could not be parsed: %s', $path, $e->getMessage());
            throw new UnexpectedValueException($message, 0, $e);
        } catch (Throwable $e) {
            $message = sprintf('PHP file "%s" could not be parsed: %s', $path, $e->getMessage());
            throw new UnexpectedValueException($message, 0, $e);
        }

        if (is_array($data) || ($data instanceof Traversable)) {
            return $data;
        }

        return [];
    }
private function loadPhpFile ( $ path ) { try { $ data = include $ path ; } catch ( Exception $ e ) { $ message = sprintf ( 'PHP file "%s" could not be parsed: %s' , $ path , $ e -> getMessage ( ) ) ; throw new UnexpectedValueException ( $ message , 0 , $ e ) ; } catch ( Throwable $ e ) { $ message = sprintf ( 'PHP file "%s" could not be parsed: %s' , $ path , $ e -> getMessage ( ) ) ; throw new UnexpectedValueException ( $ message , 0 , $ e ) ; } if ( is_array ( $ data ) || ( $ data instanceof Traversable ) ) { return $ data ; } return [ ] ; }
Load a PHP file, maybe as an array.

Note:
- The context of $this is bound to the current object.
- Data may be any value; the {@see self::addFile()} method will ignore
anything that isn't an (associative) array.

@param  string $path A path to a PHP file.
@throws UnexpectedValueException If the file can not correctly be parsed.
@return array|Traversable An array or iterable object on success.
If the file is parsed as any other type, an empty array is returned.
Load a PHP file maybe as an array .