Skip to content

Commit

Permalink
style(src) fix cs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lucatume committed Nov 2, 2024
1 parent 2dce0a2 commit ea697c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Utils/Composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ public static function vendorDir(?string $path = null): string
public static function autoloadPath(): string
{
/**
* If `$_composer_autoload_path` is undefined, fall back to `vendor/autoload.php` in the parent project's directory.
* If `$_composer_autoload_path` is undefined, fall back to `vendor/autoload.php`
* in the parent project's directory.
*
* @link https://getcomposer.org/doc/articles/vendor-binaries.md#finding-the-composer-autoloader-from-a-binary
*/
global $_composer_autoload_path;
if (isset($_composer_autoload_path)) {
$autoloadPath = $_composer_autoload_path;
} else {
// We use the Codecept class to find the location of Composer's vendor-dir, even if a project has renamed it.
// We use the Codecept class to find the location of Composer's vendor-dir.
$vendorDir = dirname((string)(new \ReflectionClass(Codecept::class))->getFilename(), 5);
$autoloadPath = $vendorDir . DIRECTORY_SEPARATOR . 'autoload.php';
}
Expand Down

0 comments on commit ea697c6

Please sign in to comment.