->
name('*.json'
);
return $finder;
} /**
* @param array<string> $nameParts
*/
private function createSnippetFile(array
$nameParts, SplFileInfo
$fileInfo, string
$author): ?GenericSnippetFile
{ return match (\
count($nameParts)) { 2 =>
$this->
getSnippetFile($nameParts,
$fileInfo,
$author),
3 =>
$this->
getBaseSnippetFile($nameParts,
$fileInfo,
$author),
default => null,
};
} /**
* @param array<string> $nameParts
*/
private function getSnippetFile(array
$nameParts, SplFileInfo
$fileInfo, string
$author): GenericSnippetFile
{ return new GenericSnippetFile(