I am wanting to write the code for a system that will have an Interface, and mean each "checker" has it's own class (Open/Closed principle).
The peck.json file can have
{
"checkers": [
"file-names",
"method-names",
"class-names",
"comments",
"etc"
]
}
and then the checkers can be iterated through, a list of words compiled, and then checked
Class BaseChacker {
public function __construct(
public $wordsToCheck = [],
public $checkersBasePath = './src/Checkers/',
) {
foreach($checkers as $checker) {
if ($this->ableToImportCheckerThroughResolution($checker)) {
$this->addCheckersWordsToWordList();
}
}
}
private function ableToImportCheckerThroughResolution(string $checker): array {
$checkerFileName = $checker->checkerFilename;
$path = "{$this->checkersBasePath}{$checker}";
if (!file_exists($path)) {
throw new CheckerDoesNotExistException($checker);
}
}
}
I want to see the existing PRs I have through first, so that I can get some feedback, and get an up to date codebase, and then I know whether the changes I have so far can be implemented into the new changes.
Saying that I'll probably start work on it anyway
I am wanting to write the code for a system that will have an Interface, and mean each "checker" has it's own class (Open/Closed principle).
The
peck.jsonfile can have{ "checkers": [ "file-names", "method-names", "class-names", "comments", "etc" ] }and then the checkers can be iterated through, a list of words compiled, and then checked
I want to see the existing PRs I have through first, so that I can get some feedback, and get an up to date codebase, and then I know whether the changes I have so far can be implemented into the new changes.
Saying that I'll probably start work on it anyway