1 | <?php |
||
13 | class Storeman |
||
14 | { |
||
15 | public const CONFIG_FILE_NAME = 'storeman.json'; |
||
16 | public const METADATA_DIRECTORY_NAME = '.storeman'; |
||
17 | |||
18 | /** |
||
19 | * @var Container |
||
20 | */ |
||
21 | protected $container; |
||
22 | |||
23 | public function __construct(Container $container = null) |
||
28 | |||
29 | /** |
||
30 | * Returns the DI container of this storeman instance. |
||
31 | * Some service names resolve to different implementations depending on the current vault which can be set as a context. |
||
32 | * E.g. "storageAdapter" resolves to the storage adapter implementation configured for the current vault. |
||
33 | * |
||
34 | * @param Vault $vault |
||
35 | * @return Container |
||
36 | */ |
||
37 | public function getContainer(Vault $vault = null): Container |
||
41 | |||
42 | /** |
||
43 | * Returns the configuration. |
||
44 | * |
||
45 | * @return Configuration |
||
46 | */ |
||
47 | public function getConfiguration(): Configuration |
||
51 | |||
52 | /** |
||
53 | * Returns a container of the configured vaults. |
||
54 | * |
||
55 | * @return VaultContainer |
||
56 | */ |
||
57 | public function getVaultContainer(): VaultContainer |
||
61 | |||
62 | /** |
||
63 | * Returns configured index builder. |
||
64 | * |
||
65 | * @return IndexBuilderInterface |
||
66 | */ |
||
67 | public function getIndexBuilder(): IndexBuilderInterface |
||
71 | |||
72 | /** |
||
73 | * @return FileReader |
||
74 | */ |
||
75 | public function getFileReader(): FileReader |
||
79 | |||
80 | /** |
||
81 | * Builds and returns an index representing the current local state. |
||
82 | * |
||
83 | * @param string $path |
||
84 | * @return Index |
||
85 | */ |
||
86 | public function getLocalIndex(string $path = null): Index |
||
93 | |||
94 | public function synchronize(array $vaultTitles = null, SynchronizationProgressListenerInterface $progressListener = null): OperationResultList |
||
113 | |||
114 | public function restore(int $toRevision = null, string $fromVault = null, SynchronizationProgressListenerInterface $progressListener = null): OperationResultList |
||
127 | |||
128 | public function dump(string $targetPath, int $revision = null, string $fromVault = null, SynchronizationProgressListenerInterface $progressListener = null): OperationResultList |
||
141 | |||
142 | /** |
||
143 | * Returns the highest revision number across all vaults. |
||
144 | * |
||
145 | * @return int |
||
146 | */ |
||
147 | public function getLastRevision(): ?int |
||
163 | |||
164 | public function getMetadataDirectoryPath(): string |
||
168 | |||
169 | /** |
||
170 | * @param Vault[] $vaults |
||
171 | * @param string $lockName |
||
172 | */ |
||
173 | protected function acquireLocks(\Traversable $vaults, string $lockName) |
||
183 | |||
184 | /** |
||
185 | * @param Vault[] $vaults |
||
186 | * @param string $lockName |
||
187 | */ |
||
188 | protected function releaseLocks(\Traversable $vaults, string $lockName) |
||
198 | |||
199 | protected function getVaultForDownload(?int $revision, ?string $vaultTitle): ?Vault |
||
226 | |||
227 | protected function initMetadataDirectory(): string |
||
241 | |||
242 | /** |
||
243 | * @return string[] |
||
244 | */ |
||
245 | protected function getLocalIndexExclusionPatterns(): array |
||
252 | } |
||
253 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: