Last active
April 19, 2017 08:00
-
-
Save dmitryd/18ddad4b6ff80622d89b119b5d0abda8 to your computer and use it in GitHub Desktop.
Let PhpStorm recognise types of objects created by GeneralUtility::makeInstance(), ObjectManager::get(), etc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This file configures factory methods in TYPO3 CMS. | |
* The file should be dropped to project root. You may need | |
* to restart PhpStorm. | |
* | |
* PhpStorm will now correctly recognise types of objects | |
* returned by TYPO3 methods listed below. | |
* | |
* (c) 2017 Dmitry Dulepov <[email protected]> | |
*/ | |
namespace PHPSTORM_META { | |
/** @noinspection PhpUnusedLocalVariableInspection */ | |
/** @noinspection PhpIllegalArrayKeyTypeInspection */ | |
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */ | |
$STATIC_METHOD_TYPES = [ | |
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('') => [ | |
'' == '@', | |
], | |
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::get('') => [ | |
'' == '@', | |
], | |
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::getEmptyObject('') => [ | |
'' == '@', | |
], | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment