Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Tokenizers/PHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,7 @@ protected function tokenize($string)
if ($tokenType === T_FUNCTION
|| $tokenType === T_FN
|| isset(Util\Tokens::$methodPrefixes[$tokenType]) === true
|| $tokenType === T_VAR
) {
if (PHP_CODESNIFFER_VERBOSITY > 1) {
echo "\t\t* token $stackPtr changed from ? to T_NULLABLE".PHP_EOL;
Expand Down
4 changes: 2 additions & 2 deletions tests/Core/File/GetMemberPropertiesTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class TestMemberProperties
var $varA = true;

/* testVarType */
var int $varA = true;
var ?int $varA = true;

/* testPublic */
public $varB = true;
Expand All @@ -30,7 +30,7 @@ class TestMemberProperties
static $varE = true;

/* testStaticType */
static string $varE = true;
static ?string $varE = true;

/* testStaticVar */
static var $varF = true;
Expand Down
8 changes: 4 additions & 4 deletions tests/Core/File/GetMemberPropertiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public function dataGetMemberProperties()
'scope' => 'public',
'scope_specified' => false,
'is_static' => false,
'type' => 'int',
'nullable_type' => false,
'type' => '?int',
'nullable_type' => true,
],
],
[
Expand Down Expand Up @@ -141,8 +141,8 @@ public function dataGetMemberProperties()
'scope' => 'public',
'scope_specified' => false,
'is_static' => true,
'type' => 'string',
'nullable_type' => false,
'type' => '?string',
'nullable_type' => true,
],
],
[
Expand Down