Skip to content

Commit

Permalink
Rename ValidTypes to InvalidTypes for consistency with other inspections
Browse files Browse the repository at this point in the history
Inspections are now all labelled after the issues they find, instead of
the goal of fixing said issues.
  • Loading branch information
drjayvee committed Oct 28, 2024
1 parent 4bedca3 commit c5dd9c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
use AlisQI\TwigQI\Inspection\InvalidDotOperation;
use AlisQI\TwigQI\Inspection\RequiredMacroArgumentAfterOptional;
use AlisQI\TwigQI\Inspection\UndeclaredVariableInMacro;
use AlisQI\TwigQI\Inspection\ValidTypes;
use AlisQI\TwigQI\Inspection\InvalidTypes;
use Twig\Extension\AbstractExtension;

class Extension extends AbstractExtension
{
public function getNodeVisitors(): array
{
return [
new ValidTypes(),
new InvalidTypes(),
new InvalidDotOperation(),
new WrapTypesInAssertedTypes(),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Twig\Node\TypesNode;
use Twig\NodeVisitor\NodeVisitorInterface;

class ValidTypes implements NodeVisitorInterface
class InvalidTypes implements NodeVisitorInterface
{
private const BASIC_TYPES = [
'string',
Expand Down
2 changes: 1 addition & 1 deletion tests/ValidTypesTest.php → tests/InvalidTypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace AlisQI\TwigQI\Tests;

class ValidTypesTest extends AbstractTestCase
class InvalidTypesTest extends AbstractTestCase
{
public static function getTypes(): array
{
Expand Down

0 comments on commit c5dd9c4

Please sign in to comment.