Code Duplication    Length = 8-10 lines in 2 locations

src/Cornford/Setter/Setting.php 1 location

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

src/Cornford/Setter/SettingBase.php 1 location

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