Code Duplication    Length = 7-7 lines in 2 locations

backend/webcal/object.php 2 locations

@@ 102-108 (lines=7) @@
99
	 * {@inheritDoc}
100
	 */
101
	public function find($objectURI, $type=ObjectType::ALL) {
102
		if (!($this->objects instanceof IObjectCollection)) {
103
			$this->findAll();
104
105
			if (!($this->objects instanceof IObjectCollection)) {
106
				throw new BackendUtils\DoesNotExistException('Object not found');
107
			}
108
		}
109
110
		foreach($this->objects as $object) {
111
			/** @var IObject $object */
@@ 153-159 (lines=7) @@
150
	 * {@inheritDoc}
151
	 */
152
	public function listAll($type=ObjectType::ALL) {
153
		if (!($this->objects instanceof IObjectCollection)) {
154
			$this->findAll();
155
156
			if (!($this->objects instanceof IObjectCollection)) {
157
				return [];
158
			}
159
		}
160
161
		return $this->objects->listAll($type);
162
	}