You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($container->findTaggedServiceIds('webfactory.integration.filter')) {
29
-
thrownew \RuntimeException("The webfactory.integration.filter tag has been renamed to webfactory_legacy_integration.filter already back 1.0.23. Please update your DIC configuration, and sorry for the hassle.");
28
+
thrownew \RuntimeException('The webfactory.integration.filter tag has been renamed to webfactory_legacy_integration.filter already back 1.0.23. Please update your DIC configuration, and sorry for the hassle.');
Copy file name to clipboardExpand all lines: Integration/Annotation/Filter.php
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@
17
17
*/
18
18
class Filter implements Factory
19
19
{
20
-
21
20
protected$class;
22
21
protected$service;
23
22
@@ -29,24 +28,29 @@ public function __construct($values)
29
28
if (isset($values['service'])) {
30
29
$this->service = $values['service'];
31
30
}
32
-
if (!$this->class && !$this->service)
31
+
if (!$this->class && !$this->service) {
33
32
thrownew \Exception('Parameter "class" or "service" is missing in Webfactory\Bundle\LegacyIntegrationBundle\Integration\Annotation\Filter.');
33
+
}
34
34
}
35
35
36
36
publicfunctioncreateFilter(Container$container)
37
37
{
38
38
if ($class = $this->class) {
39
-
if (!class_exists($class))
40
-
thrownew \Exception('Unknown class ' . $class . ' configured with the Webfactory\Bundle\LegacyIntegrationBundle\Integration\Annotation\Filter annotation.');
39
+
if (!class_exists($class)) {
40
+
thrownew \Exception('Unknown class '.$class.' configured with the Webfactory\Bundle\LegacyIntegrationBundle\Integration\Annotation\Filter annotation.');
41
+
}
41
42
$filter = new$class();
42
43
}
43
44
if ($service = $this->service) {
44
-
if (!$container->has($service))
45
-
thrownew \Exception('Unknown service ' . $service . ' configured with the Webfactory\Bundle\LegacyIntegrationBundle\Integration\Annotation\Filter annotation.');
45
+
if (!$container->has($service)) {
46
+
thrownew \Exception('Unknown service '.$service.' configured with the Webfactory\Bundle\LegacyIntegrationBundle\Integration\Annotation\Filter annotation.');
47
+
}
46
48
$filter = $container->get($service);
47
49
}
48
-
if (!$filterinstanceof FilterInterface)
49
-
thrownew \Exception("Class " . get_class($filter) . ' configured with the Webfactory\Bundle\LegacyIntegrationBundle\Integration\Annotation\Filter annotation is not a Webfactory\Bundle\LegacyIntegrationBundle\Integration\Filter.');
50
+
if (!$filterinstanceof FilterInterface) {
51
+
thrownew \Exception('Class '.\get_class($filter).' configured with the Webfactory\Bundle\LegacyIntegrationBundle\Integration\Annotation\Filter annotation is not a Webfactory\Bundle\LegacyIntegrationBundle\Integration\Filter.');
0 commit comments