Code Duplication    Length = 8-10 lines in 2 locations

src/Cornford/Setter/Setting.php 1 location

@@ 212-221 (lines=10) @@
209
	 *
210
	 * @return self
211
	 */
212
	public function cacheExpires($expiry)
213
	{
214
		if (!is_bool($expiry) && !is_integer($expiry) && !$expiry instanceof DateTime) {
215
			throw new SettingArgumentException('Expiry is required in boolean, integer or DateTime format.');
216
		}
217
218
		$this->cacheExpiry = $expiry;
219
220
		return $this;
221
	}
222
223
}

src/Cornford/Setter/SettingBase.php 1 location

@@ 181-188 (lines=8) @@
178
	 *
179
	 * @return void
180
	 */
181
	protected function setCacheExpiry($value)
182
	{
183
		if (!is_bool($value) && !is_integer($value) && !$value instanceof DateTime) {
184
			throw new SettingArgumentException('Expiry is required in boolean, integer or DateTime format.');
185
		}
186
187
		$this->cacheExpiry = $value;
188
	}
189
190
	/**
191
	 * Get the cache tag