Code Duplication    Length = 3-3 lines in 2 locations

lib/private/Comments/Manager.php 1 location

@@ 86-88 (lines=3) @@
83
		$data['parent_id'] = strval($data['parent_id']);
84
		$data['topmost_parent_id'] = strval($data['topmost_parent_id']);
85
		$data['creation_timestamp'] = new \DateTime($data['creation_timestamp']);
86
		if (!is_null($data['latest_child_timestamp'])) {
87
			$data['latest_child_timestamp'] = new \DateTime($data['latest_child_timestamp']);
88
		}
89
		$data['children_count'] = intval($data['children_count']);
90
		return $data;
91
	}

apps/comments/lib/Dav/CommentsPlugin.php 1 location

@@ 180-182 (lines=3) @@
177
			$args[str_replace($ns, '', $parameter['name'])] = $parameter['value'];
178
		}
179
180
		if(!is_null($args['datetime'])) {
181
			$args['datetime'] = new \DateTime($args['datetime']);
182
		}
183
184
		$results = $node->findChildren($args['limit'], $args['offset'], $args['datetime']);
185