Skip to content

Commit

Permalink
Merge pull request #540 from poppabear8883/feat-ascii-1
Browse files Browse the repository at this point in the history
feat: Add option to disable all banners by setting ascii to null
  • Loading branch information
veewee authored Sep 28, 2018
2 parents be5da30 + 023d63c commit 56a29a6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion doc/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,15 @@ parameters:
- resource/grumphp-happy3.txt
```

To disable banner set ascii images path to `~`:
To disable all banners set ascii to `~`:

```yaml
# grumphp.yml
parameters:
ascii: ~
```

To disable a specific banner set ascii image path to `~`:

```yaml
# grumphp.yml
Expand Down
4 changes: 4 additions & 0 deletions src/Configuration/GrumPHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ public function getTestSuites()
*/
public function getAsciiContentPath($resource)
{
if (null === $this->container->getParameter('ascii')) {
return null;
}

$paths = $this->container->getParameter('ascii');
if (!array_key_exists($resource, $paths)) {
return null;
Expand Down

0 comments on commit 56a29a6

Please sign in to comment.