Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/code/Magento/Developer/Model/Di/PluginList.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ private function addPluginToList($pluginInstance, $pluginMethod, $methodTypes, $
{
if ($methodTypes & $typeCode) {
if (!array_key_exists($pluginInstance, $this->pluginList[$this->pluginTypeMapping[$typeCode]])) {
$this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance] = [];
$this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance][] = $pluginMethod;
}
$this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance][] = $pluginMethod ;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance][] = $pluginMethod ; ->

$this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance][$pluginMethod] = 1

Please avoid duplication by reversing array. Please check if it is possible to remove if while avoiding PHP notice.

}
}
}