Code Duplication    Length = 8-8 lines in 2 locations

apps/files_trashbin/lib/expiration.php 1 location

@@ 113-120 (lines=8) @@
110
	/**
111
	 * @return bool|int
112
	 */
113
	public function getMaxAgeAsTimestamp() {
114
		$maxAge = false;
115
		if ($this->isEnabled() && $this->maxAge !== self::NO_OBLIGATION) {
116
			$time = $this->timeFactory->getTime();
117
			$maxAge = $time - ($this->maxAge * 86400);
118
		}
119
		return $maxAge;
120
	}
121
122
	private function parseRetentionObligation(){
123
		$splitValues = explode(',', $this->retentionObligation);

apps/files_versions/lib/expiration.php 1 location

@@ 120-127 (lines=8) @@
117
	 * Get maximal retention obligation as a timestamp
118
	 * @return int
119
	 */
120
	public function getMaxAgeAsTimestamp(){
121
		$maxAge = false;
122
		if ($this->isEnabled() && $this->maxAge !== self::NO_OBLIGATION) {
123
			$time = $this->timeFactory->getTime();
124
			$maxAge = $time - ($this->maxAge * 86400);
125
		}
126
		return $maxAge;
127
	}
128
129
	/**
130
	* Read versions_retention_obligation, validate it