Total Complexity | 3 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | class VerifiableExtension extends DataExtension |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | * @config |
||
21 | */ |
||
22 | private static $verifiable_fields = []; |
||
23 | |||
24 | /** |
||
25 | * @var Verifiable |
||
26 | * @todo Should prob be nailed-in, in config as a dependency. |
||
27 | */ |
||
28 | protected $verifiable; |
||
29 | |||
30 | /** |
||
31 | * @return void |
||
32 | */ |
||
33 | public function __construct() |
||
34 | { |
||
35 | $this->verifiable = Verifiable::create()->setModel($this->getOwner()); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * After each write, hash the desired fields and submit to the current backend. |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | public function onAfterWrite() |
||
44 | { |
||
45 | $this->verifiable->write(); |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * Return the data in the backend referenced by $hash. If no data |
||
50 | * is found, returns an empty array. |
||
51 | * |
||
52 | * @param string $hash |
||
53 | * @return mixed boolean | array |
||
54 | */ |
||
55 | public function read(string $hash) : array |
||
58 | } |
||
59 | |||
60 | } |
||
62 |
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