feat: toHaveAllMethodsDocumented and toHaveAllPropertiesDocumented

This commit is contained in:
Nuno Maduro
2024-07-19 14:03:59 +01:00
parent 99107544ff
commit f2691623cf
18 changed files with 154 additions and 4 deletions

View File

@ -14,15 +14,21 @@ use Symfony\Component\Process\Process;
final class GitDirtyTestCaseFilter implements TestCaseFilter
{
/**
* @var string[]|null
* @var array<int, string>|null
*/
private ?array $changedFiles = null;
/**
* Creates a new instance of the filter.
*/
public function __construct(private readonly string $projectRoot)
{
// ...
}
/**
* {@inheritdoc}
*/
public function accept(string $testCaseFilename): bool
{
if ($this->changedFiles === null) {
@ -41,6 +47,9 @@ final class GitDirtyTestCaseFilter implements TestCaseFilter
return in_array($relativePath, $this->changedFiles, true);
}
/**
* Loads the changed files.
*/
private function loadChangedFiles(): void
{
$process = new Process(['git', 'status', '--short', '--', '*.php']);