Code Duplication    Length = 12-12 lines in 2 locations

PluginProvider.php 2 locations

@@ 67-78 (lines=12) @@
64
    /**
65
     * {@inheritdoc}
66
     */
67
    public function geocodeQuery(GeocodeQuery $query): Collection
68
    {
69
        $pluginChain = $this->createPluginChain($this->plugins, function (GeocodeQuery $query) {
70
            try {
71
                return new GeocoderFulfilledPromise($this->provider->geocodeQuery($query));
72
            } catch (Exception $exception) {
73
                return new GeocoderRejectedPromise($exception);
74
            }
75
        });
76
77
        return $pluginChain($query)->wait();
78
    }
79
80
    /**
81
     * {@inheritdoc}
@@ 83-94 (lines=12) @@
80
    /**
81
     * {@inheritdoc}
82
     */
83
    public function reverseQuery(ReverseQuery $query): Collection
84
    {
85
        $pluginChain = $this->createPluginChain($this->plugins, function (ReverseQuery $query) {
86
            try {
87
                return new GeocoderFulfilledPromise($this->provider->reverseQuery($query));
88
            } catch (Exception $exception) {
89
                return new GeocoderRejectedPromise($exception);
90
            }
91
        });
92
93
        return $pluginChain($query)->wait();
94
    }
95
96
    /**
97
     * {@inheritdoc}