Code Duplication    Length = 7-7 lines in 2 locations

src/Darya/Storage/InMemory.php 2 locations

@@ 134-140 (lines=7) @@
131
	 * @param array  $filter   [optional]
132
	 * @return int
133
	 */
134
	public function count($resource, array $filter = array()) {
135
		if (empty($this->data[$resource])) {
136
			return 0;
137
		}
138
		
139
		return count($this->filterer->filter($this->data[$resource], $filter));
140
	}
141
	
142
	/**
143
	 * Create resource instances in the data store.
@@ 201-207 (lines=7) @@
198
	 * @param int    $limit    [optional]
199
	 * @return int|bool
200
	 */
201
	public function delete($resource, array $filter = array(), $limit = null) {
202
		if (empty($this->data[$resource])) {
203
			return;
204
		}
205
		
206
		$this->data[$resource] = $this->filterer->reject($this->data[$resource], $filter);
207
	}
208
	
209
	/**
210
	 * Search for resource data with fields that match the given query and