From f7d8483cc2efd24d1e20e37ee3ece6e7f911eb74 Mon Sep 17 00:00:00 2001 From: Malcolm Young Date: Fri, 28 Jul 2023 09:11:10 +0100 Subject: [PATCH 1/3] #1098 add extensions --- src/Task/PhpMd.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Task/PhpMd.php b/src/Task/PhpMd.php index 88c44d3f..4770a02e 100644 --- a/src/Task/PhpMd.php +++ b/src/Task/PhpMd.php @@ -74,6 +74,8 @@ public function run(ContextInterface $context): TaskResultInterface $arguments->addOptionalArgument('--exclude', !empty($config['exclude'])); $arguments->addOptionalCommaSeparatedArgument('%s', $config['exclude']); + $arguments->addOptionalCommaSeparatedArgument('--suffixes \'%s\'', $extensions); + $process = $this->processBuilder->buildProcess($arguments); $process->run(); From 270bca6500e82ea0a8598336a6c69d82af7021b5 Mon Sep 17 00:00:00 2001 From: Malcolm Young Date: Thu, 3 Aug 2023 12:39:02 +0100 Subject: [PATCH 2/3] #1098 add extensions --- src/Task/PhpMd.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Task/PhpMd.php b/src/Task/PhpMd.php index 4770a02e..1aeccdaa 100644 --- a/src/Task/PhpMd.php +++ b/src/Task/PhpMd.php @@ -74,7 +74,8 @@ public function run(ContextInterface $context): TaskResultInterface $arguments->addOptionalArgument('--exclude', !empty($config['exclude'])); $arguments->addOptionalCommaSeparatedArgument('%s', $config['exclude']); - $arguments->addOptionalCommaSeparatedArgument('--suffixes \'%s\'', $extensions); + $arguments->addOptionalArgument('--suffixes', !empty($extensions)); + $arguments->addOptionalCommaSeparatedArgument('%s', $extensions); $process = $this->processBuilder->buildProcess($arguments); $process->run(); From 5313baa7a07a72e4670cffde532f1901c130cd3e Mon Sep 17 00:00:00 2001 From: Malcolm Young Date: Thu, 3 Aug 2023 17:13:57 +0100 Subject: [PATCH 3/3] update test --- test/Unit/Task/PhpMdTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/Unit/Task/PhpMdTest.php b/test/Unit/Task/PhpMdTest.php index 4c34e0b7..a7ddae78 100644 --- a/test/Unit/Task/PhpMdTest.php +++ b/test/Unit/Task/PhpMdTest.php @@ -114,6 +114,8 @@ public function provideExternalTaskRuns(): iterable 'hello.php,hello2.php', 'text', 'cleancode,codesize,naming', + '--suffixes', + 'php', ] ]; @@ -129,6 +131,8 @@ public function provideExternalTaskRuns(): iterable 'cleancode,codesize,naming', '--exclude', 'hello.php,hello2.php', + '--suffixes', + 'php', ] ]; @@ -142,6 +146,8 @@ public function provideExternalTaskRuns(): iterable 'hello.php,hello2.php', 'text', 'cleancode', + '--suffixes', + 'php', ] ]; @@ -155,6 +161,8 @@ public function provideExternalTaskRuns(): iterable 'hello.php,hello2.php', 'ansi', 'cleancode,codesize,naming', + '--suffixes', + 'php', ] ]; }