-
-
Notifications
You must be signed in to change notification settings - Fork 0
ClassifierInterface
Defines the contract for classifying .gitignore entries.
This classifier SHALL inspect a raw .gitignore entry and determine whether the entry expresses directory semantics or file semantics. Implementations MUST preserve deterministic classification for identical inputs. Blank entries and comment entries MUST be treated as file-oriented values to avoid incorrectly inferring directory intent where no effective pattern exists.
- Full name:
\FastForward\DevTools\GitIgnore\ClassifierInterface
Classifies a .gitignore entry as directory or file pattern.
public classify(string $entry): "directory"|"file"Parameters:
| Parameter | Type | Description |
|---|---|---|
$entry |
string | the .gitignore entry to classify |
Return Value:
the classification result
Determines whether the entry represents a directory pattern.
public isDirectory(string $entry): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$entry |
string | the .gitignore entry to check |
Return Value:
true if the entry is a directory pattern
Determines whether the entry represents a file pattern.
public isFile(string $entry): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$entry |
string | the .gitignore entry to check |
Return Value:
true if the entry is a file pattern