Code Duplication    Length = 15-15 lines in 2 locations

Src/Router/Adaptor/FastRouteAdaptor.php 1 location

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

Src/Router/Adaptor/SymfonyAdaptor.php 1 location

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