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 | use IteratorAggregate; |
| 23 | |
| 24 | /** |
| 25 | * Defines the contract for a .gitignore file with its path and entries. |
| 26 | * |
| 27 | * This interface MUST be implemented by any class that represents a .gitignore file. |
| 28 | * It SHALL allow iteration over entries and provide access to the file path. |
| 29 | * |
| 30 | * @extends IteratorAggregate<int, string> |
| 31 | */ |
| 32 | interface GitIgnoreInterface extends IteratorAggregate |
| 33 | { |
| 34 | /** |
| 35 | * Returns the file system path to the .gitignore file. |
| 36 | * |
| 37 | * @return string the absolute path to the .gitignore file |
| 38 | */ |
| 39 | public function path(): string; |
| 40 | |
| 41 | /** |
| 42 | * Returns the list of entries from the .gitignore file. |
| 43 | * |
| 44 | * @return list<string> the non-empty .gitignore entries |
| 45 | */ |
| 46 | public function entries(): array; |
| 47 | } |