Code Duplication    Length = 11-11 lines in 2 locations

code/model/Pipeline.php 2 locations

@@ 1004-1014 (lines=11) @@
1001
	 *
1002
	 * @return DataObject|null The next step in the pipeline, or null if none remain.
1003
	 */
1004
	protected function findNextStep() {
1005
		// otherwise get next step in chain
1006
		$currentStep = $this->CurrentStep();
1007
1008
		return $this
1009
			->Steps()
1010
			->filter("Status", "Queued")
1011
			->filter("Order:GreaterThanOrEqual", $currentStep->Order)
1012
			->exclude("ID", $currentStep->ID)
1013
			->sort("Order ASC")
1014
			->first();
1015
	}
1016
1017
	/**
@@ 1022-1032 (lines=11) @@
1019
	 *
1020
	 * @return DataObject|null The previous step in the pipeline, or null if this is the first.
1021
	 */
1022
	public function findPreviousStep() {
1023
		// otherwise get previous step in chain
1024
		$currentStep = $this->CurrentStep();
1025
1026
		return $this
1027
			->Steps()
1028
			->filter("Status", "Finished")
1029
			->filter("Order:LessThanOrEqual", $currentStep->Order)
1030
			->exclude("ID", $currentStep->ID)
1031
			->sort("Order DESC")
1032
			->first();
1033
	}
1034
1035
	/**