Skip to content
Snippets Groups Projects

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

1 file
+ 9
1
Compare changes
  • Side-by-side
  • Inline
@@ -34,11 +34,19 @@ class PathLocator extends BasePathLocator {
@@ -34,11 +34,19 @@ class PathLocator extends BasePathLocator {
* {@inheritdoc}
* {@inheritdoc}
*/
*/
public function getProjectRoot(): string {
public function getProjectRoot(): string {
 
return $this->proxyGetProjectRoot();
 
}
 
 
/**
 
* Proxy function for getProjectRoot().
 
*/
 
protected function proxyGetProjectRoot(): string|false {
$project_root = $this->getVendorDirectory() . DIRECTORY_SEPARATOR . '..';
$project_root = $this->getVendorDirectory() . DIRECTORY_SEPARATOR . '..';
// @see https://github.com/bovigo/vfsStream/issues/207
// @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)
? realpath($project_root)
: $project_root;
: $project_root;
 
return $this->state->get(static::class . ' root', $result_get_project_root);
}
}
/**
/**
Loading