Code Duplication    Length = 4-6 lines in 2 locations

src/IPub/Widgets/DI/WidgetsExtension.php 2 locations

@@ 142-145 (lines=4) @@
139
		$decoratorsManager = $builder->getDefinition($this->prefix('decorators.manager'));
140
141
		// Get all registered widgets decorators
142
		foreach (array_keys($builder->findByTag(self::TAG_WIDGET_DECORATOR)) as $serviceName) {
143
			// Register decorator to manager
144
			$decoratorsManager->addSetup('register', ['@' . $serviceName, $serviceName]);
145
		}
146
147
		// Get widgets filters manager
148
		$filtersManager = $builder->getDefinition($this->prefix('filters.manager'));
@@ 151-156 (lines=6) @@
148
		$filtersManager = $builder->getDefinition($this->prefix('filters.manager'));
149
150
		// Get all registered widgets decorators
151
		foreach (array_keys($builder->findByTag(self::TAG_WIDGET_FILTER)) as $serviceName) {
152
			$priority = 999;
153
154
			// Register filter to manager
155
			$filtersManager->addSetup('register', ['@' . $serviceName, $serviceName, $priority]);
156
		}
157
158
		// Get widgets control provider
159
		$widgetsContainer = $builder->getDefinition($this->prefix('widgets.component'));