Skip to content

Commit 37e204c

Browse files
committed
Add explaination to docs
1 parent 1ff0a61 commit 37e204c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/features.md

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Additionally, a PHPStan rule checks that only `Magento\Framework\Data\Collection
2424
### ObjectManager type hints
2525
A type extension is provided so that `Magento\Framework\App\ObjectManager` method calls do return the correct return type.
2626

27+
### ResultFactory type hints
28+
Correct type is returned from `Magento\Framework\Controller\ResultFactory` based on passed parameter.
29+
2730
## Magic method calls
2831
For some classes like `Magento\Framework\DataObject` or `Magento\Framework\Session\SessionManager` PHPStan logic is provided
2932
to be able to let the magic method calls return proper types.

tests/bitExpert/PHPStan/Magento/Type/ControllerResultFactoryReturnTypeExtensionUnitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function returnTypeDataProvider(): array
4040
{
4141
return [
4242
['TYPE_JSON', 'Magento\Framework\Controller\Result\Json'],
43-
['TYPE_PAGE', 'Magento\Framework\View\Result\Page'],
43+
['TYPE_PAGE', 'Magento\Framework\View\Result\Page']
4444
];
4545
}
4646

0 commit comments

Comments
 (0)