Skip to content
Snippets Groups Projects

Issue #3321282: Add 'declare(strict_types = 1)' where needed

@@ -34,11 +34,19 @@ class PathLocator extends BasePathLocator {
* {@inheritdoc}
*/
public function getProjectRoot(): string {
return $this->proxyGetProjectRoot();
}
/**
* Proxy function for getProjectRoot().
*/
protected function proxyGetProjectRoot(): string|false {
$project_root = $this->getVendorDirectory() . DIRECTORY_SEPARATOR . '..';
// @see https://github.com/bovigo/vfsStream/issues/207
return !str_starts_with($project_root, 'vfs://')
$result_get_project_root = !str_starts_with($project_root, 'vfs://')
? realpath($project_root)
: $project_root;
return $this->state->get(static::class . ' root', $result_get_project_root);
}
/**
Loading