Code Duplication    Length = 13-13 lines in 2 locations

src/Model/BlogController.php 2 locations

@@ 241-253 (lines=13) @@
238
     *
239
     * @return null|BlogTag
240
     */
241
    public function getCurrentTag()
242
    {
243
        /**
244
         * @var Blog $dataRecord
245
         */
246
        $dataRecord = $this->dataRecord;
247
        $tag = $this->request->param('Tag');
248
        if ($tag) {
249
            return $dataRecord->Tags()
250
                ->filter('URLSegment', array($tag, rawurlencode($tag)))
251
                ->first();
252
        }
253
        return null;
254
    }
255
256
    /**
@@ 285-297 (lines=13) @@
282
     *
283
     * @return null|BlogCategory
284
     */
285
    public function getCurrentCategory()
286
    {
287
        /**
288
         * @var Blog $dataRecord
289
         */
290
        $dataRecord = $this->dataRecord;
291
        $category = $this->request->param('Category');
292
        if ($category) {
293
            return $dataRecord->Categories()
294
                ->filter('URLSegment', array($category, rawurlencode($category)))
295
                ->first();
296
        }
297
        return null;
298
    }
299
300
    /**