Skip to content

Commit b09a601

Browse files
author
Chris Hulton
committed
Supports string and array settings for file_extensions config
1 parent 1f1a782 commit b09a601

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎Runner.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,13 @@ public function run($files)
9292
$phpmd = new PHPMD();
9393

9494
if (isset($this->config['config']['file_extensions'])) {
95-
$phpmd->setFileExtensions(explode(',', $this->config['config']['file_extensions']));
95+
$fileExtensions = $this->config['config']['file_extensions'];
96+
97+
if (is_string($fileExtensions)) {
98+
$fileExtensions = explode(',', $fileExtensions);
99+
}
100+
101+
$phpmd->setFileExtensions($fileExtensions);
96102
}
97103

98104
$rulesets = Runner::RULESETS;

0 commit comments

Comments
 (0)