It expects that file .todo-registrar.php
or .todo-registrar.dist.php
added in the root directory of project.
It may be put in any other place, but you have to define path to it when call the script with option --config=/path/to/cofig
.
Config file is php-file which returns instance of class \Aeliot\TodoRegistrar\Config
.
See example.
Method | Is Required |
---|---|
setFinder | yes |
setInlineConfigFactory | no |
setInlineConfigReader | no |
setRegistrar | yes |
setTags | no |
Accepts instance of configured finder (\Aeliot\TodoRegistrar\Service\File\Finder
) responsible for finding of php-files.
Very similar to configuration of Finder for "PHP CS Fixer".
Accepts instance of \Aeliot\TodoRegistrar\InlineConfigFactoryInterface
You can implement and expects instance of your custom inline config in your registrar. This method permits to provide factory for it.
Accepts instance of \Aeliot\TodoRegistrar\InlineConfigReaderInterface
.
So, you can use your own reader of inline config which support your preferred format or relay on build-in.
Responsible for configuration of registrar factory.
It accepts two arguments:
- First one is registrar type (
\Aeliot\TodoRegistrar\Enum\RegistrarType
) or instance of registrar factory (\Aeliot\TodoRegistrar\Service\Registrar\RegistrarFactoryInterface
). - Second one is array of config for registrar. See example for JIRA.
So, you can use build-in registrar or pass your own.
Permit to define array of tags to be detected.
Script supports TODO
and FIXME
by default.
You don't need to configure it when you want to use only this tags. Nevertheless, you have to set them
when you want to use them together with your custom tags.
Don't wary about case of tags. They will be found in case-insensitive mode.