Skip to content

Commit 31e919e

Browse files
authored
Merge pull request #28 from Sweetchuck/task-parse-xml
Add PhpcsParseXml task
2 parents 1012524 + 31f22d0 commit 31e919e

File tree

9 files changed

+925
-133
lines changed

9 files changed

+925
-133
lines changed

RoboFile.php

Lines changed: 300 additions & 126 deletions
Large diffs are not rendered by default.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"require-dev": {
2020
"codeception/codeception": "^2.2",
21+
"mikey179/vfsStream": "^1.6",
2122
"sweetchuck/codeception-module-robo-task-runner": "^0.0",
2223
"sweetchuck/git-hooks": "^0.0",
2324
"sweetchuck/robo-git": "^0.0",

composer.lock

Lines changed: 52 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpcs.xml renamed to phpcs.xml.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,11 @@
99
<file>RoboFile.php</file>
1010

1111
<rule ref="PSR2" />
12+
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
13+
<exclude-pattern>tests/unit/</exclude-pattern>
14+
</rule>
15+
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
16+
<exclude-pattern>RoboFile.php</exclude-pattern>
17+
</rule>
1218

1319
</ruleset>

src/PhpcsTaskLoader.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
namespace Sweetchuck\Robo\Phpcs;
44

5+
use Robo\Collection\CollectionBuilder;
56
use Sweetchuck\Robo\Phpcs\Task\PhpcsLintFiles;
67
use Sweetchuck\Robo\Phpcs\Task\PhpcsLintInput;
78
use League\Container\ContainerAwareInterface;
89
use Robo\Contract\OutputAwareInterface;
10+
use Sweetchuck\Robo\Phpcs\Task\PhpcsParseXml;
911

1012
trait PhpcsTaskLoader
1113
{
@@ -46,4 +48,16 @@ protected function taskPhpcsLintInput(array $options = [])
4648

4749
return $task;
4850
}
51+
52+
/**
53+
* @return \Robo\Collection\CollectionBuilder|\Sweetchuck\Robo\Phpcs\Task\PhpcsParseXml
54+
*/
55+
protected function taskPhpcsParseXml(array $options = []): CollectionBuilder
56+
{
57+
/** @var \Sweetchuck\Robo\Phpcs\Task\PhpcsParseXml $task */
58+
$task = $this->task(PhpcsParseXml::class);
59+
$task->setOptions($options);
60+
61+
return $task;
62+
}
4963
}

0 commit comments

Comments
 (0)