Code Duplication    Length = 3-3 lines in 2 locations

Sources/Class-TOTP.php 2 locations

@@ 117-119 (lines=3) @@
114
	 */
115
	public function setInitKey($key)
116
	{
117
		if (preg_match('/^[' . implode('', array_keys($this->getLookup())) . ']+$/', $key) == false) {
118
			throw new \InvalidArgumentException('Invalid base32 hash!');
119
		}
120
		$this->initKey = $key;
121
		return $this;
122
	}
@@ 318-320 (lines=3) @@
315
	{
316
		$lookup = $this->getLookup();
317
318
		if (preg_match('/^[' . implode('', array_keys($lookup)) . ']+$/', $hash) == false) {
319
			throw new \InvalidArgumentException('Invalid base32 hash!');
320
		}
321
322
		$hash = strtoupper($hash);
323
		$buffer = 0;