|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace AlecRabbit\Spinner\Core\Widget\A; |
|
6
|
|
|
|
|
7
|
|
|
use AlecRabbit\Spinner\Contract\IFrame; |
|
8
|
|
|
use AlecRabbit\Spinner\Contract\IInterval; |
|
9
|
|
|
use AlecRabbit\Spinner\Contract\IObserver; |
|
10
|
|
|
use AlecRabbit\Spinner\Core\A\ASubject; |
|
11
|
|
|
use AlecRabbit\Spinner\Core\CharFrame; |
|
|
|
|
|
|
12
|
|
|
use AlecRabbit\Spinner\Core\Contract\ICharFrame; |
|
13
|
|
|
use AlecRabbit\Spinner\Core\Widget\Contract\IWidget; |
|
14
|
|
|
use AlecRabbit\Spinner\Core\Widget\Contract\IWidgetRevolver; |
|
15
|
|
|
|
|
16
|
|
|
abstract class AWidget extends ASubject implements IWidget |
|
17
|
|
|
{ |
|
18
|
|
|
public function __construct( |
|
19
|
|
|
protected readonly IWidgetRevolver $widgetRevolver, |
|
20
|
|
|
protected readonly IFrame $leadingSpacer, |
|
21
|
|
|
protected readonly IFrame $trailingSpacer, |
|
22
|
|
|
?IObserver $observer = null, |
|
23
|
|
|
) { |
|
24
|
|
|
parent::__construct($observer); |
|
25
|
|
|
} |
|
26
|
|
|
|
|
27
|
|
|
public function getInterval(): IInterval |
|
28
|
|
|
{ |
|
29
|
|
|
return $this->widgetRevolver->getInterval(); |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
public function getFrame(?float $dt = null): ICharFrame |
|
33
|
|
|
{ |
|
34
|
|
|
$widgetRevolverFrame = $this->widgetRevolver->getFrame($dt); |
|
35
|
|
|
|
|
36
|
|
|
return $this->createFrame( |
|
37
|
|
|
$this->leadingSpacer->getSequence() . $widgetRevolverFrame->getSequence( |
|
38
|
|
|
) . $this->trailingSpacer->getSequence(), |
|
39
|
|
|
$this->leadingSpacer->getWidth() + $widgetRevolverFrame->getWidth() + $this->trailingSpacer->getWidth() |
|
40
|
|
|
); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
protected function createFrame(string $sequence, int $width): ICharFrame |
|
44
|
|
|
{ |
|
45
|
|
|
return new CharFrame($sequence, $width); |
|
46
|
|
|
} |
|
47
|
|
|
} |
|
48
|
|
|
|
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