Skip to content

Commit a732d20

Browse files
authored
Allow object typehints (#47)
* Move test fixtures into their own directory * Add test for object typehint * Add object to built-in typehints
1 parent bd2b114 commit a732d20

18 files changed

+28
-23
lines changed

ImportDetection/SniffHelpers.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function isPredefinedTypehint(File $phpcsFile, $stackPtr) {
3333
$allTypehints = [
3434
'bool',
3535
'string',
36+
'object',
3637
'int',
3738
'float',
3839
'void',

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
bootstrap="tests/bootstrap.php"
33
>
44
<testsuites>
5-
<testsuite>
5+
<testsuite name="ImportDetection">
66
<directory>tests</directory>
77
</testsuite>
88
</testsuites>
File renamed without changes.

tests/Sniffs/Imports/ClassUsedAsNamespaceFixture.php renamed to tests/Sniffs/Imports/Fixtures/ClassUsedAsNamespaceFixture.php

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/Sniffs/Imports/MultipleFilesFixtures/MultipleFilesFixtures1.php renamed to tests/Sniffs/Imports/Fixtures/MultipleFilesFixtures/MultipleFilesFixtures1.php

File renamed without changes.

tests/Sniffs/Imports/MultipleFilesFixtures/MultipleFilesFixtures2.php renamed to tests/Sniffs/Imports/Fixtures/MultipleFilesFixtures/MultipleFilesFixtures2.php

File renamed without changes.

0 commit comments

Comments
 (0)