1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace kalanis\kw_mapper\Storage\Shared\DotNet; |
4
|
|
|
|
5
|
|
|
|
6
|
|
|
use \COM; |
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* Class ComRegistry |
11
|
|
|
* @package kalanis\kw_mapper\Storage\Database\Shared\DotNet |
12
|
|
|
* Dummy class for describe methods for accessing registry |
13
|
|
|
* @method string RegRead(string $key) |
14
|
|
|
* @method null RegWrite(string $key, mixed $content, string $type) |
15
|
|
|
* @method null RegDelete(string $key) |
16
|
|
|
* @link https://docs.microsoft.com/en-us/windows/win32/winprog64/accessing-an-alternate-registry-view |
17
|
|
|
* @link https://docs.microsoft.com/en-us/powershell/scripting/samples/working-with-registry-entries?view=powershell-7.1 |
18
|
|
|
* @link https://ss64.com/vb/shell.html |
19
|
|
|
* @codeCoverageIgnore do not know for now how to check that |
20
|
|
|
*/ |
21
|
|
|
class ComRegistry extends COM |
22
|
|
|
{ |
23
|
|
|
/** |
24
|
|
|
* @param string|null $moduleName |
25
|
|
|
* @param string|null $serverName |
26
|
|
|
* @param int|null $codePage |
27
|
|
|
* @param string|null $typeLib |
28
|
|
|
*/ |
29
|
|
|
public function __construct(?string $moduleName = null, ?string $serverName = null, ?int $codePage = null, ?string $typeLib = null) |
30
|
|
|
{ |
31
|
|
|
// @todo: nowhere to find if can be init with an empty values or not - look and change if need |
32
|
|
|
if (!is_null($typeLib)) { |
33
|
|
|
parent::__construct('WScript.Shell', $serverName, $codePage, $typeLib); |
34
|
|
|
} elseif (!is_null($codePage)) { |
35
|
|
|
parent::__construct('WScript.Shell', $serverName, $codePage); |
36
|
|
|
} elseif (!is_null($serverName)) { |
37
|
|
|
parent::__construct('WScript.Shell', $serverName); |
38
|
|
|
} else { |
39
|
|
|
parent::__construct('WScript.Shell'); |
40
|
|
|
} |
41
|
|
|
} |
42
|
|
|
} |
43
|
|
|
|
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