-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDependency.php
30 lines (26 loc) · 1006 Bytes
/
Dependency.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php declare(strict_types = 1);
namespace LastDragon_ru\LaraASP\Documentator\Processor\Contracts;
use LastDragon_ru\LaraASP\Core\Path\DirectoryPath;
use LastDragon_ru\LaraASP\Core\Path\FilePath;
use LastDragon_ru\LaraASP\Documentator\Processor\Exceptions\DependencyUnresolvable;
use LastDragon_ru\LaraASP\Documentator\Processor\FileSystem\Directory;
use LastDragon_ru\LaraASP\Documentator\Processor\FileSystem\File;
use LastDragon_ru\LaraASP\Documentator\Processor\FileSystem\FileSystem;
use Traversable;
/**
* Task dependency (= another file or directory).
*
* @template TValue of Traversable<mixed, Directory|File>|Directory|File|null
*/
interface Dependency {
/**
* @throws DependencyUnresolvable
*
* @return TValue
*/
public function __invoke(FileSystem $fs): mixed;
/**
* Used only for events. Relative path will be resolved based on {@see FileSystem::$input}.
*/
public function getPath(FileSystem $fs): Directory|DirectoryPath|File|FilePath;
}