Skip to content

Commit

Permalink
[TASK] Do not import TYPO3 namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschaufi committed May 16, 2024
1 parent 7dc2ce7 commit f8394ac
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions config/v13/strict-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
use Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration;
use Rector\ValueObject\PhpVersionFeature;
use Ssch\TYPO3Rector\TypeDeclaration\Property\AddPropertyTypeDeclarationWithDefaultNullRector;
use TYPO3\CMS\Core\Resource\FileInterface;
use TYPO3\CMS\Core\Resource\ResourceInterface;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->phpVersion(PhpVersionFeature::MIXED_TYPE);
Expand Down Expand Up @@ -669,44 +667,44 @@
$rectorConfig->ruleWithConfiguration(
AddReturnTypeDeclarationRector::class,
[
new AddReturnTypeDeclaration(FileInterface::class, 'hasProperty', new BooleanType()),
new AddReturnTypeDeclaration(FileInterface::class, 'getProperty', new MixedType(true)),
new AddReturnTypeDeclaration(FileInterface::class, 'getSize', new IntegerType()),
new AddReturnTypeDeclaration(FileInterface::class, 'getModificationTime', new IntegerType()),
new AddReturnTypeDeclaration(FileInterface::class, 'getCreationTime', new IntegerType()),
new AddReturnTypeDeclaration(FileInterface::class, 'getSha1', new StringType()),
new AddReturnTypeDeclaration(FileInterface::class, 'getNameWithoutExtension', new StringType()),
new AddReturnTypeDeclaration(FileInterface::class, 'getExtension', new StringType()),
new AddReturnTypeDeclaration(FileInterface::class, 'getContents', new StringType()),
new AddReturnTypeDeclaration(FileInterface::class, 'getForLocalProcessing', new StringType()),
new AddReturnTypeDeclaration(FileInterface::class, 'getMimeType', new StringType()),
new AddReturnTypeDeclaration(FileInterface::class, 'delete', new BooleanType()),
new AddReturnTypeDeclaration(FileInterface::class, 'isIndexed', new BooleanType()),
new AddReturnTypeDeclaration(FileInterface::class, 'getPublicUrl', TypeCombinator::addNull(
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'hasProperty', new BooleanType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'getProperty', new MixedType(true)),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'getSize', new IntegerType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'getModificationTime', new IntegerType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'getCreationTime', new IntegerType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'getSha1', new StringType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'getNameWithoutExtension', new StringType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'getExtension', new StringType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'getContents', new StringType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'getForLocalProcessing', new StringType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'getMimeType', new StringType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'delete', new BooleanType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'isIndexed', new BooleanType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'getPublicUrl', TypeCombinator::addNull(
new StringType()
)),
new AddReturnTypeDeclaration(FileInterface::class, 'toArray', new ArrayType(
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'toArray', new ArrayType(
new MixedType(),
new MixedType()
)),
new AddReturnTypeDeclaration(FileInterface::class, 'rename', new ObjectType(
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\FileInterface', 'rename', new ObjectType(
'TYPO3\CMS\Core\Resource\FileInterface'
)),
new AddReturnTypeDeclaration(
FileInterface::class,
'TYPO3\CMS\Core\Resource\FileInterface',
'setContents',
new SelfObjectType('TYPO3\CMS\Core\Resource\FileInterface')
),
new AddReturnTypeDeclaration(ResourceInterface::class, 'getIdentifier', new StringType()),
new AddReturnTypeDeclaration(ResourceInterface::class, 'getName', new StringType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\ResourceInterface', 'getIdentifier', new StringType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\ResourceInterface', 'getName', new StringType()),
new AddReturnTypeDeclaration(
ResourceInterface::class,
'TYPO3\CMS\Core\Resource\ResourceInterface',
'getStorage',
new ObjectType('TYPO3\CMS\Core\Resource\ResourceStorage')
),
new AddReturnTypeDeclaration(ResourceInterface::class, 'getHashedIdentifier', new StringType()),
new AddReturnTypeDeclaration('TYPO3\CMS\Core\Resource\ResourceInterface', 'getHashedIdentifier', new StringType()),
new AddReturnTypeDeclaration(
ResourceInterface::class,
'TYPO3\CMS\Core\Resource\ResourceInterface',
'getParentFolder',
new ObjectType('TYPO3\CMS\Core\Resource\FolderInterface')
),
Expand Down

0 comments on commit f8394ac

Please sign in to comment.