Skip to content

Commit

Permalink
Code for types tag uses Twig types in examples instead of PHP
Browse files Browse the repository at this point in the history
Thanks, @smnandre!
  • Loading branch information
drjayvee committed Oct 22, 2024
1 parent 4d5be0d commit 2c8cc21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/TokenParser/TypesTokenParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* Declare variable types.
*
* {% types {foo: 'int', bar?: 'string'} %}
* {% types {foo: 'number', bar?: 'string'} %}
*
* @author Jeroen Versteeg <[email protected]>
*
Expand Down
4 changes: 2 additions & 2 deletions tests/Node/TypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ class TypesTest extends NodeTestCase
{
private static function getValidMapping(): array
{
// {foo: 'string', bar?: 'int'}
// {foo: 'string', bar?: 'number'}
return [
'foo' => [
'type' => 'string',
'optional' => false,
],
'bar' => [
'type' => 'int',
'type' => 'number',
'optional' => true,
],
];
Expand Down

0 comments on commit 2c8cc21

Please sign in to comment.