Code Duplication    Length = 4-4 lines in 2 locations

src/Notifynder/Parsers/NotificationParser.php 2 locations

@@ 102-105 (lines=4) @@
99
                $object = $object->{$segment};
100
                continue;
101
            }
102
            if (is_object($object) && method_exists($object, '__get') && ! is_null($object->__get($segment))) {
103
                $object = $object->__get($segment);
104
                continue;
105
            }
106
            if (is_object($object) && method_exists($object, 'getAttribute') && ! is_null($object->getAttribute($segment))) {
107
                $object = $object->getAttribute($segment);
108
                continue;
@@ 106-109 (lines=4) @@
103
                $object = $object->__get($segment);
104
                continue;
105
            }
106
            if (is_object($object) && method_exists($object, 'getAttribute') && ! is_null($object->getAttribute($segment))) {
107
                $object = $object->getAttribute($segment);
108
                continue;
109
            }
110
            if (is_array($object) && array_key_exists($segment, $object)) {
111
                $object = array_get($object, $segment, $default);
112
                continue;