Code Duplication    Length = 3-3 lines in 2 locations

Jid.php 2 locations

@@ 63-65 (lines=3) @@
60
61
    public function __construct(string $address, string $local = null, string $resource = null)
62
    {
63
        if ($local === null && $resource === null) {
64
            list($address, $local, $resource) = self::_split($address);
65
        }
66
67
        self::validate($address, $local, $resource);
68
@@ 91-93 (lines=3) @@
88
     */
89
    public static function validate(string $address, string $local = null, string $resource = null)
90
    {
91
        if ($local === null && $resource === null) {
92
            list($address, $local, $resource) = self::_split($address);
93
        }
94
95
        if (empty($address)) {
96
            throw new InvalidArgumentException("Domain-part of JID is REQUIRED");