Skip to content

Commit

Permalink
Add mutator LogicalNot (#680)
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos committed Dec 4, 2021
1 parent 8d4aaea commit da63a01
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions .dev-tools/infection.json
Expand Up @@ -78,6 +78,7 @@
},
"LogicalLowerAnd": true,
"LogicalLowerOr": true,
"LogicalNot": true,
"LogicalOr": true,
"MBString": true,
"MethodCallRemoval": true,
Expand Down
1 change: 0 additions & 1 deletion .dev-tools/src/InfectionConfigBuilder.php
Expand Up @@ -26,7 +26,6 @@ final class InfectionConfigBuilder
'IntegerNegation',
'LessThan',
'LessThanOrEqualTo',
'LogicalNot',
'Minus',
'NotIdentical',
'NotIdenticalNotEqual',
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -3,7 +3,7 @@
[![Latest stable version](https://img.shields.io/packagist/v/kubawerlos/php-cs-fixer-custom-fixers.svg?label=current%20version)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)
[![PHP version](https://img.shields.io/packagist/php-v/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://php.net)
[![License](https://img.shields.io/github/license/kubawerlos/php-cs-fixer-custom-fixers.svg)](LICENSE)
![Tests](https://img.shields.io/badge/tests-3108-brightgreen.svg)
![Tests](https://img.shields.io/badge/tests-3110-brightgreen.svg)
[![Downloads](https://img.shields.io/packagist/dt/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)

[![CI Status](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/workflows/CI/badge.svg?branch=main&event=push)](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/actions)
Expand Down
11 changes: 11 additions & 0 deletions tests/Analyzer/DataProviderAnalyzerTest.php
Expand Up @@ -127,6 +127,17 @@ public function testFoo() {}
}',
];

yield 'data provider being constant' => [
[],
'<?php class FooTest extends TestCase {
private const provider = [];
/**
* @dataProvider provider
*/
public function testFoo() {}
}',
];

yield 'ignore anonymous function' => [
[
new DataProviderAnalysis('provider2', 93, [65]),
Expand Down
7 changes: 7 additions & 0 deletions tests/Fixer/StringableInterfaceFixerTest.php
Expand Up @@ -51,6 +51,13 @@ function () { return 0; };
}
}'];

yield ['<?php class Foo
{
public function bar() {
$ohject->__toString();
}
}'];

yield [
'<?php class Foo implements \Stringable
{
Expand Down

0 comments on commit da63a01

Please sign in to comment.