Code Duplication    Length = 15-15 lines in 2 locations

Src/Router/Adaptor/FastRouteAdaptor.php 1 location

@@ 158-172 (lines=15) @@
155
     * @param RouteInterface $route
156
     * @return array
157
     */
158
    protected function _createFastRouteHandler(RouteInterface $route)
159
    {
160
        $handlerOut = [
161
            'type' => $route->getHandlerType(),
162
            'name' => $route->getNames()
163
        ];
164
165
        if ($route->getHandlerType() === 'object') {
166
            $handlerOut['content'] = $this->serializer->serialize($route->getHandler());
167
        } else {
168
            $handlerOut['content'] = $route->getHandler();
169
        }
170
171
        return $handlerOut;
172
    }
173
174
    /**
175
     * Return handler if it exists.

Src/Router/Adaptor/SymfonyAdaptor.php 1 location

@@ 131-145 (lines=15) @@
128
        );
129
    }
130
131
    public function createFastRouteHandler(RouteInterface $route)
132
    {
133
        $handlerOut = [
134
            'type' => $route->getHandlerType(),
135
            'name' => $route->getNames()
136
        ];
137
138
        if ($route->getHandlerType() === 'object') {
139
            $handlerOut['content'] = $this->serializer->serialize($route->getHandler());
140
        } else {
141
            $handlerOut['content'] = $route->getHandler();
142
        }
143
144
        return $handlerOut;
145
    }
146
147
    /**
148
     * Check if Cache Enabled and whether too skip adding routes.