Skip to content

Commit

Permalink
Remove CheckSprintfMatchingTypesRule as can be on purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Aug 22, 2023
1 parent f9f352c commit 78b72f7
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 378 deletions.
2 changes: 0 additions & 2 deletions config/static-rules.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
rules:
- Symplify\PHPStanRules\Rules\NoProtectedClassElementRule

- Symplify\PHPStanRules\Rules\Missing\CheckSprintfMatchingTypesRule
- Symplify\PHPStanRules\Rules\ForbiddenExtendOfNonAbstractClassRule

# domain
Expand Down
73 changes: 1 addition & 72 deletions docs/rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 58 Rules Overview
# 56 Rules Overview

## AnnotateRegexClassConstWithRegexLinkRule

Expand Down Expand Up @@ -179,28 +179,6 @@ interface ProductRepositoryInterface

<br>

## CheckSprintfMatchingTypesRule

`sprintf()` call mask type at index [%d] expects type "%s", but "%s" given

- class: [`Symplify\PHPStanRules\Rules\Missing\CheckSprintfMatchingTypesRule`](../src/Rules/Missing/CheckSprintfMatchingTypesRule.php)

```php
echo sprintf('My name is %s and I have %d children', 10, 'Tomas');
```

:x:

<br>

```php
echo sprintf('My name is %s and I have %d children', 'Tomas', 10);
```

:+1:

<br>

## CheckTypehintCallerTypeRule

Parameter %d should use "%s" type as the only type passed to this method
Expand Down Expand Up @@ -2140,55 +2118,6 @@ class SomeClass extends Rule

<br>

## TwigPublicCallableExistsRule

The callable method [$this, "%s"] was not found

- class: [`Symplify\PHPStanRules\Symfony\Rules\TwigPublicCallableExistsRule`](../packages/Symfony/Rules/TwigPublicCallableExistsRule.php)

```php
use Twig\Extension\AbstractExtension;
use Twig_SimpleFunction;

final class TwigExtensionWithMissingCallable extends AbstractExtension
{
public function getFunctions()
{
return [
new Twig_SimpleFunction('someFunctionName', [$this, 'someMethod']),
];
}
}
```

:x:

<br>

```php
use Twig\Extension\AbstractExtension;
use Twig_SimpleFunction;

final class TwigExtensionWithMissingCallable extends AbstractExtension
{
public function getFunctions()
{
return [
new Twig_SimpleFunction('someFunctionName', [$this, 'someMethod']),
];
}

public function someMethod()
{
// ...
}
}
```

:+1:

<br>

## UppercaseConstantRule

Constant "%s" must be uppercase
Expand Down
140 changes: 0 additions & 140 deletions src/Rules/Missing/CheckSprintfMatchingTypesRule.php

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 78b72f7

Please sign in to comment.