Skip to content

Commit

Permalink
Fixing composer json
Browse files Browse the repository at this point in the history
  • Loading branch information
mamazu committed Apr 10, 2020
1 parent 02cfcac commit 0709ebb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"php": "^7.2",
"ext-dom": "*",
"ext-libxml": "*",
"ext-json": "*"
"ext-json": "*",

"thecodingmachine/safe": "^0.1.16",
"nikic/php-parser": "^4.2",
Expand All @@ -37,5 +37,11 @@
"spec\\": "spec/"
}
},
"scripts": {
"analyse": [
"vendor/bin/phpspec run",
"vendor/bin/phpstan analyse"
]
},
"bin": [ "bin/doc-parser" ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public function it_delegates_the_validation(
ValidatorInterface $validator1,
ValidatorInterface $validator2,
Block $block
) {
): void {
$block->getType()->willReturn('php');

$this->beConstructedWith(['php' => $validator1, 'python' => $validator2]);

$validator1->validate($block)->willReturn([new Error('hello.md', 0, 'Error',)]);
$validator1->validate($block)->willReturn([new Error('hello.md', 0, 'Error')]);
$validator2->validate(Argument::any())->shouldNotBeCalled();

$this->validate($block)->shouldHaveCount(1);
Expand Down
2 changes: 1 addition & 1 deletion src/Error/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getType(): ?string
return $this->type;
}

public function jsonSerialize()
public function jsonSerialize(): array
{
return [
'fileName' => $this->getFileName(),
Expand Down
1 change: 0 additions & 1 deletion tests/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ $b = new Block('/tmp','test',1,'txt');
And a little piece of valid yaml:
```yaml
hello:
ll
i_am_groot: true
colors: ['red', 'green', 'blue']
```

0 comments on commit 0709ebb

Please sign in to comment.