-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promote DocBlock to native types #128
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e78d2f5
vendor/bin/psalm --alter --issues=MissingReturnType,MissingClosureRet…
Slamdunk 6abe15d
Fix emerged type
Slamdunk ba32d3d
Tests ok
Slamdunk 40a35aa
Fix PSalm errors
Slamdunk 15d3de2
./php-cs-fixer fix --verbose --rules=phpdoc_to_param_type --allow-ris…
Slamdunk f4fef6b
Final manual fixes
Slamdunk 2766d08
Fix PHP 8.0 BuilderAbstractFactory return type
Slamdunk ae64251
Revert to DocBlock Element::init() native return type that depends on…
Slamdunk 6f7c64a
Document automatic tool for migrating to native types
Slamdunk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,10 +24,9 @@ class BuilderAbstractFactory implements AbstractFactoryInterface | |
/** | ||
* @param string $requestedName | ||
* @param null|array $options | ||
* @return AnnotationBuilder | ||
* @throws ServiceNotCreatedException For invalid listener configuration. | ||
*/ | ||
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) | ||
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): AbstractBuilder | ||
{ | ||
// resolve aliases used in laminas servicemanager | ||
if (isset($this->aliases[$requestedName])) { | ||
|
@@ -53,9 +52,8 @@ public function __invoke(ContainerInterface $container, $requestedName, ?array $ | |
|
||
/** | ||
* @param string $requestedName | ||
* @return bool | ||
*/ | ||
public function canCreate(ContainerInterface $container, $requestedName) | ||
public function canCreate(ContainerInterface $container, $requestedName): bool | ||
{ | ||
return isset($this->aliases[$requestedName]) || is_subclass_of($requestedName, AbstractBuilder::class); | ||
} | ||
|
@@ -73,7 +71,7 @@ public function canCreate(ContainerInterface $container, $requestedName) | |
* | ||
* @return array | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PHP Code Sniffer keeps |
||
*/ | ||
private function marshalConfig(ContainerInterface $container) | ||
private function marshalConfig(ContainerInterface $container): array | ||
{ | ||
if (! $container->has('config')) { | ||
return []; | ||
|
@@ -95,10 +93,9 @@ private function marshalConfig(ContainerInterface $container) | |
* - otherwise attaches it to the event manager | ||
* | ||
* @param array $config | ||
* @return void | ||
* @throws ServiceNotCreatedException If any listener is not an event listener aggregate. | ||
*/ | ||
private function injectListeners(array $config, EventManagerInterface $events, ContainerInterface $container) | ||
private function injectListeners(array $config, EventManagerInterface $events, ContainerInterface $container): void | ||
{ | ||
if (! isset($config['listeners'])) { | ||
return; | ||
|
@@ -120,7 +117,7 @@ private function injectListeners(array $config, EventManagerInterface $events, C | |
* | ||
* Also injects the factory with the InputFilterManager if present. | ||
*/ | ||
private function injectFactory(Factory $factory, ContainerInterface $container) | ||
private function injectFactory(Factory $factory, ContainerInterface $container): void | ||
{ | ||
$factory->setFormElementManager($container->get('FormElementManager')); | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Slamdunk
Thank you! 😃