Code Duplication    Length = 13-13 lines in 2 locations

code/model/Blog.php 2 locations

@@ 808-820 (lines=13) @@
805
	 *
806
	 * @return null|BlogTag
807
	 */
808
	public function getCurrentTag() {
809
		/**
810
		 * @var Blog $dataRecord
811
		 */
812
		$dataRecord = $this->dataRecord;
813
		$tag = $this->request->param('Tag');
814
		if($tag) {
815
			return $dataRecord->Tags()
816
				->filter('URLSegment', array($tag, rawurlencode($tag)))
817
				->first();
818
		}
819
		return null;
820
	}
821
822
	/**
823
	 * Renders the blog posts for a given category.
@@ 846-858 (lines=13) @@
843
	 *
844
	 * @return null|BlogCategory
845
	 */
846
	public function getCurrentCategory() {
847
		/**
848
		 * @var Blog $dataRecord
849
		 */
850
		$dataRecord = $this->dataRecord;
851
		$category = $this->request->param('Category');
852
		if($category) {
853
			return $dataRecord->Categories()
854
				->filter('URLSegment', array($category, rawurlencode($category)))
855
				->first();
856
		}
857
		return null;
858
	}
859
860
	/**
861
	 * Get the meta title for the current action.