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

Add phpstan/phpstan-strict-rules dependency #12

Merged
merged 1 commit into from
Feb 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"phpstan/phpstan": "^0.12",
"roave/security-advisories": "dev-latest",
"infection/infection": "^0.21.0",
"bitexpert/captainhook-infection": "^0.1.0"
"bitexpert/captainhook-infection": "^0.1.0",
"phpstan/phpstan-strict-rules": "^0.12.9"
},
"autoload": {
"psr-4": {
Expand Down
53 changes: 52 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
parameters:
level: 7
level: max
fileExtensions:
- php
paths:
- src

- src/bitExpert
- tests/bitExpert
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ValidateAuthorAction implements Action
private $runner;

/**
* Creates new {@link \bitExpert\CaptainHook\Validate\ValidateAuthorAction}.
* Creates new {@link \bitExpert\CaptainHook\ValidateAuthor\ValidateAuthorAction}.
*/
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@
class ValidateAuthorActionUnitTest extends TestCase
{
/**
* @var Config|MockObject
* @var MockObject&Config
*/
private $config;
/**
* @var IO|MockObject
* @var MockObject&IO
*/
private $io;
/**
* @var Repository|MockObject
* @var MockObject&Repository
*/
private $repository;
/**
* @var Action|MockObject
* @var MockObject&Action
*/
private $action;
/**
* @var ValidateAuthorAction
* @var MockObject&ValidateAuthorAction
*/
private $hook;

Expand All @@ -64,7 +64,7 @@ public function setUp(): void
/**
* @test
*/
public function missingConfigurationStopsExecution()
public function missingConfigurationStopsExecution(): void
{
$this->action->expects(self::once())
->method('getOptions')
Expand All @@ -79,7 +79,7 @@ public function missingConfigurationStopsExecution()
/**
* @test
*/
public function configuredNameRegexWillTriggerValidation()
public function configuredNameRegexWillTriggerValidation(): void
{
$this->action->expects(self::once())
->method('getOptions')
Expand All @@ -96,7 +96,7 @@ public function configuredNameRegexWillTriggerValidation()
/**
* @test
*/
public function nameValidationWillNotThrowExceptionIfMatches()
public function nameValidationWillNotThrowExceptionIfMatches(): void
{
$this->action->expects(self::once())
->method('getOptions')
Expand All @@ -113,9 +113,9 @@ public function nameValidationWillNotThrowExceptionIfMatches()
/**
* @test
*/
public function nameValidationWillThrowExceptionIfNotMatches()
public function nameValidationWillThrowExceptionIfNotMatches(): void
{
self::expectException(RuntimeException::class);
$this->expectException(RuntimeException::class);

$this->action->expects(self::once())
->method('getOptions')
Expand All @@ -132,7 +132,7 @@ public function nameValidationWillThrowExceptionIfNotMatches()
/**
* @test
*/
public function configuredEmailRegexWillTriggerValidation()
public function configuredEmailRegexWillTriggerValidation(): void
{
$this->action->expects(self::once())
->method('getOptions')
Expand All @@ -149,7 +149,7 @@ public function configuredEmailRegexWillTriggerValidation()
/**
* @test
*/
public function emailValidationWillNotThrowExceptionIfMatches()
public function emailValidationWillNotThrowExceptionIfMatches(): void
{
$this->action->expects(self::once())
->method('getOptions')
Expand All @@ -166,9 +166,9 @@ public function emailValidationWillNotThrowExceptionIfMatches()
/**
* @test
*/
public function emailValidationWillThrowExceptionIfNotMatches()
public function emailValidationWillThrowExceptionIfNotMatches(): void
{
self::expectException(RuntimeException::class);
$this->expectException(RuntimeException::class);

$this->action->expects(self::once())
->method('getOptions')
Expand Down