| 1 |
#include "fmtPHPCSFixer.hpp" |
| 2 |
|
| 3 |
#include "Platform.hpp" |
| 4 |
|
| 5 |
fmtPHPCSFixer::fmtPHPCSFixer() |
| 6 |
{ |
| 7 |
SetName("PHP-CS-Fixer"); |
| 8 |
SetFileTypes({ FileExtManager::TypePhp }); |
| 9 |
SetDescription(_("The PHP Coding Standards Fixer")); |
| 10 |
SetShortDescription(_("PHP formatter")); |
| 11 |
SetInplaceFormatter(true); |
| 12 |
SetEnabled(false); |
| 13 |
SetConfigFilepath("$(WorkspacePath)/.php-cs-fixer.dist.php"); |
| 14 |
|
| 15 |
wxString php_exe = "php"; |
| 16 |
ThePlatform->Which("php", &php_exe); |
| 17 |
SetCommand({ php_exe, "$(WorkspacePath)/tools/php-cs-fixer/vendor/bin/php-cs-fixer", "fix", "--quiet", |
| 18 |
R"#("$(CurrentFileRelPath)")#" }); |
| 19 |
} |
| 20 |
|
| 21 |
fmtPHPCSFixer::~fmtPHPCSFixer() {} |