Skip to content

Commit

Permalink
Merge pull request #345 from cakephp/support-scalar
Browse files Browse the repository at this point in the history
Add support for scalar type
  • Loading branch information
othercorey authored Oct 22, 2021
2 parents e098e1f + 34e8e42 commit fce45ed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CakePHP/Sniffs/Commenting/TypeHintSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ protected function getSortedTypeHint(array $types): string
'callable-string',
'class-string',
'interface-string',
'scalar',
'string',
'float',
'int',
Expand Down
2 changes: 1 addition & 1 deletion CakePHP/Tests/Commenting/TypeHintUnitTest.1.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ function test()
/** @var class-string<\Cake\I18n\Number>|null */
$testVar;

/** @psalm-var null|string|class-string<\Cake\I18n\Number>|array $testVar2 */
/** @psalm-var null|scalar|class-string<\Cake\I18n\Number>|array $testVar2 */
$testVar2;
}
2 changes: 1 addition & 1 deletion CakePHP/Tests/Commenting/TypeHintUnitTest.1.inc.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ function test()
/** @var class-string<\Cake\I18n\Number>|null */
$testVar;

/** @psalm-var array|class-string<\Cake\I18n\Number>|string|null $testVar2 */
/** @psalm-var array|class-string<\Cake\I18n\Number>|scalar|null $testVar2 */
$testVar2;
}

0 comments on commit fce45ed

Please sign in to comment.