Code Duplication    Length = 6-6 lines in 2 locations

lib/private/Share/Share.php 2 locations

@@ 745-750 (lines=6) @@
742
			}
743
		}
744
745
		if ($date < $today) {
746
			$message = 'Cannot set expiration date. Expiration date is in the past';
747
			$message_t = $l->t('Cannot set expiration date. Expiration date is in the past');
748
			\OCP\Util::writeLog('OCP\Share', $message, \OCP\Util::WARN);
749
			throw new \Exception($message_t);
750
		}
751
752
		return $date;
753
	}
@@ 963-968 (lines=6) @@
960
					throw new \Exception($message_t);
961
				}
962
				return self::$backends[$itemType];
963
			} else {
964
				$message = 'Sharing backend %s not found';
965
				$message_t = $l->t('Sharing backend %s not found', [$class]);
966
				\OCP\Util::writeLog('OCP\Share', \sprintf($message, $class), \OCP\Util::ERROR);
967
				throw new \Exception($message_t);
968
			}
969
		}
970
		$message = 'Sharing backend for %s not found';
971
		$message_t = $l->t('Sharing backend for %s not found', [$itemType]);