Skip to content
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

DROOP-1026: Fixed wrong type declarations in ProviderManager #852

Conversation

michal-odorski-droptica
Copy link
Contributor

No description provided.

return $definition ? $this->createInstance($definition['id'], ['input' => $input]) : FALSE;
if ($definition) {
$provider_plugin = $this->createInstance($definition['id'], ['input' => $input]);
assert($provider_plugin instanceof ProviderPluginInterface);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary here? The method will throw exception anyway if the return type will be different than ProviderPluginInterface

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHPstorm warns me that \Return value is expected to be '\Drupal\d_media\Plugin\Provider\ProviderPluginInterface|false', 'object' returned. But you're right, maybe I'm being too cautious.

@js-droptica js-droptica merged commit 9949aa1 into 4.0.x Dec 21, 2023
1 of 2 checks passed
@js-droptica js-droptica deleted the feature/DROOP-1026-Error-displayed-when-background-video-is-added-to-Banner-Paragraph branch December 21, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants