The type Barclays\Model\BaseBlock was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. excluded_paths:["lib/*"],
you can move it to the dependency path list as follows:
and let?s assume the following content of Bar.php:
// Bar.phpnamespaceOtherDir;useSomeDir\Foo;// This now conflicts the class OtherDir\Foo
If both files OtherDir/Foo.php and SomeDir/Foo.php are loaded in the
same runtime, you will see a PHP error such as the following:
PHP Fatal error: Cannot use SomeDir\Foo as Foo because the name is already in use in OtherDir/Foo.php
However, as OtherDir/Foo.php does not necessarily have to be loaded and the
error is only triggered if it is loaded before OtherDir/Bar.php, this problem
might go unnoticed for a while. In order to prevent this error from surfacing,
you must import the namespace with a different alias:
// Bar.phpnamespaceOtherDir;useSomeDir\FooasSomeDirFoo;// There is no conflict anymore.
Loading history...
8
9
class SubTheme
10
{
11
/**
12
* @var string
13
*/
14
private $name;
15
/**
16
* @var string
17
*/
18
private $parent;
19
/**
20
* @var array|string[][]
21
*/
22
private $assignations;
23
24
/**
25
* @param string $name
26
* @param string $parent
27
* @param string[][] $assignations
28
*/
29
public function __construct(string $name, string $parent, array $assignations)
30
{
31
$this->name = $name;
32
$this->parent = $parent;
33
$this->assignations = $assignations;
34
}
35
36
public static function fromFile(string $file): self
37
{
38
if (!is_readable($file)) {
39
throw new UnableToLoadFileException('Cannot read file '.$file);
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
47
if (!isset($yaml[$field])) {
48
throw new UnableToLoadFileException('Missing field "'.$field.'" in YAML file '.$file);
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths