Code Duplication    Length = 2-2 lines in 2 locations

src/RM/SMSender/EuroSms/Message.php 1 location

@@ 31-32 (lines=2) @@
28
29
	public function setText(string $text = '') : SMSender\IMessage
30
	{
31
		if (strlen($text) < 1 OR strlen($text) > 459)
32
			throw new InvalidArgumentException('Parameter "text" must be length 1-459 characters. Has ' . strlen($text) . ' characters.');
33
		return parent::setText(Strings::toAscii($text));
34
	}
35
}

src/RM/SMSender/EuroSms/Sender.php 1 location

@@ 101-102 (lines=2) @@
98
	{
99
		if (!Strings::match($id, '~^\d-[0-9a-zA-Z]{6}$~'))
100
			throw new ConfigurationException('Parameter "id" must be in format "\d-[0-9a-zA-Z]{6}".');
101
		if (strlen($key) !== 8 && strlen($key) !== 9)
102
			throw new ConfigurationException('Parameter "key" must have 8 or 9 characters. It has ' . strlen($key) . ' characters.');
103
		return TRUE;
104
	}
105