Skip to content

False report on missing function #25

@TomasVotruba

Description

@TomasVotruba

Let me know, if this report is ok. I've got more of these.


Error report:

Function includeIfExists not found.

Full code:

declare (strict_types = 1);

function includeIfExists(string $file)
{
    if (file_exists($file)) {
        return include $file;
    }
}

if (
    (!$classLoader = includeIfExists(__DIR__.'/../vendor/autoload.php')) &&
    (!$classLoader = includeIfExists(__DIR__.'/../../../autoload.php'))
) {
    echo 'You must set up the project dependencies, run the following commands:'.PHP_EOL.
        'curl -sS https://getcomposer.org/installer | php'.PHP_EOL.
        'php composer.phar install'.PHP_EOL;
    exit(1);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions