Code Duplication    Length = 11-11 lines in 4 locations

src/Rule/Validate/MySql/Blob.php 1 location

@@ 12-22 (lines=11) @@
9
 * - Blob
10
 * - Text
11
 */
12
class Blob extends Strlen
13
{
14
    public function __construct(int $len)
15
    {
16
        if ($len < 0 || $len > (pow(2, 16))) {
17
            throw new \InvalidArgumentException('Blob & Text can only accept lengths between 0 - 2^16');
18
        }
19
20
        parent::__construct($len);
21
    }
22
}
23

src/Rule/Validate/MySql/LongBlob.php 1 location

@@ 12-22 (lines=11) @@
9
 * - LongBlob
10
 * - LongText
11
 */
12
class LongBlob extends Strlen
13
{
14
    public function __construct(int $len)
15
    {
16
        if ($len < 0 || $len > (pow(2, 32))) {
17
            throw new \InvalidArgumentException('Long Blob & Text can only accept lengths between 0 - 2^16');
18
        }
19
20
        parent::__construct($len);
21
    }
22
}
23

src/Rule/Validate/MySql/MediumBlob.php 1 location

@@ 12-22 (lines=11) @@
9
 * - MediumBlob
10
 * - MediumText
11
 */
12
class MediumBlob extends Strlen
13
{
14
    public function __construct(int $len)
15
    {
16
        if ($len < 0 || $len > (pow(2, 24))) {
17
            throw new \InvalidArgumentException('Medium Blob & Text can only accept lengths between 0 - 2^16');
18
        }
19
20
        parent::__construct($len);
21
    }
22
}
23

src/Rule/Validate/MySql/TinyBlob.php 1 location

@@ 12-22 (lines=11) @@
9
 * - TinyBlob
10
 * - TinyText
11
 */
12
class TinyBlob extends Strlen
13
{
14
    public function __construct(int $len)
15
    {
16
        if ($len < 0 || $len > (pow(2, 8))) {
17
            throw new \InvalidArgumentException('TinyBlob & Text can only accept lengths between 0 - 2^8');
18
        }
19
20
        parent::__construct($len);
21
    }
22
}
23