Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add option to disable all banners by setting ascii to null #540

Merged
merged 2 commits into from
Sep 28, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 (is_null($this->container->getParameter('ascii'))) {
poppabear8883 marked this conversation as resolved.
Show resolved Hide resolved
return null;
}

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