Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** |
| 6 | * Fast Forward Development Tools for PHP projects. |
| 7 | * |
| 8 | * This file is part of fast-forward/dev-tools project. |
| 9 | * |
| 10 | * @author Felipe Sayão Lobato Abreu <github@mentordosnerds.com> |
| 11 | * @license https://opensource.org/licenses/MIT MIT License |
| 12 | * |
| 13 | * @see https://github.com/php-fast-forward/ |
| 14 | * @see https://github.com/php-fast-forward/dev-tools |
| 15 | * @see https://github.com/php-fast-forward/dev-tools/issues |
| 16 | * @see https://php-fast-forward.github.io/dev-tools/ |
| 17 | * @see https://datatracker.ietf.org/doc/html/rfc2119 |
| 18 | */ |
| 19 | |
| 20 | namespace FastForward\DevTools\GitIgnore; |
| 21 | |
| 22 | /** |
| 23 | * Defines the contract for reading .gitignore files from a storage location. |
| 24 | * |
| 25 | * Implementations MUST load a .gitignore resource from the provided filesystem |
| 26 | * path and SHALL return a GitIgnoreInterface representation of its contents. |
| 27 | * Implementations SHOULD delegate parsing and normalization responsibilities to |
| 28 | * a dedicated domain object or parser when appropriate. |
| 29 | */ |
| 30 | interface ReaderInterface |
| 31 | { |
| 32 | /** |
| 33 | * Reads a .gitignore file from the specified filesystem path. |
| 34 | * |
| 35 | * The provided path MUST identify a readable .gitignore file. Implementations |
| 36 | * SHALL return a GitIgnoreInterface instance representing the contents read |
| 37 | * from that path. |
| 38 | * |
| 39 | * @param string $gitignorePath The filesystem path to the .gitignore file. |
| 40 | * |
| 41 | * @return GitIgnoreInterface The loaded .gitignore representation. |
| 42 | */ |
| 43 | public function read(string $gitignorePath): GitIgnoreInterface; |
| 44 | } |