@@ -18,7 +18,6 @@ trait ManagesCollections
1818 /**
1919 * @SuppressWarnings(PHPMD.BooleanArgumentFlag)
2020 *
21- * @param bool $excludeSystemCollections
2221 * @return array<mixed>
2322 *
2423 * @throws ArangoException
@@ -41,16 +40,14 @@ public function getCollections(bool $excludeSystemCollections = false): array
4140 /**
4241 * Check for collection existence in current DB.
4342 *
44- * @param string $name
45- * @return bool
4643 *
4744 * @throws ArangoException
4845 */
4946 public function hasCollection (string $ name ): bool
5047 {
5148 $ results = $ this ->getCollections ();
5249
53- return array_search ($ name , array_column ($ results , 'name ' ), true ) !== false ;
50+ return in_array ($ name , array_column ($ results , 'name ' ), true );
5451 }
5552
5653 /**
@@ -68,9 +65,6 @@ public function getCollection(string $name): stdClass
6865 /**
6966 * @see https://www.arangodb.com/docs/stable/http/collection-getting.html#read-properties-of-a-collection
7067 *
71- * @param string $name
72- * @return stdClass
73- *
7468 * @throws ArangoException
7569 */
7670 public function getCollectionProperties (string $ name ): stdClass
@@ -83,9 +77,6 @@ public function getCollectionProperties(string $name): stdClass
8377 /**
8478 * @see https://www.arangodb.com/docs/stable/http/collection-getting.html#return-number-of-documents-in-a-collection
8579 *
86- * @param string $name
87- * @return stdClass
88- *
8980 * @throws ArangoException
9081 */
9182 public function getCollectionWithDocumentCount (string $ name ): stdClass
@@ -98,9 +89,6 @@ public function getCollectionWithDocumentCount(string $name): stdClass
9889 /**
9990 * @see https://www.arangodb.com/docs/stable/http/collection-getting.html#return-number-of-documents-in-a-collection
10091 *
101- * @param string $name
102- * @return int
103- *
10492 * @throws ArangoException
10593 */
10694 public function getCollectionDocumentCount (string $ name ): int
@@ -115,10 +103,6 @@ public function getCollectionDocumentCount(string $name): int
115103 *
116104 * @SuppressWarnings(PHPMD.BooleanArgumentFlag)
117105 *
118- * @param string $name
119- * @param bool $details
120- * @return stdClass
121- *
122106 * @throws ArangoException
123107 */
124108 public function getCollectionStatistics (string $ name , bool $ details = false ): stdClass
@@ -137,11 +121,9 @@ public function getCollectionStatistics(string $name, bool $details = false): st
137121 }
138122
139123 /**
140- * @param string $name
141124 * @param array<mixed> $config
142125 * @param int|bool|null $waitForSyncReplication
143126 * @param int|bool|null $enforceReplicationFactor
144- * @return stdClass
145127 *
146128 * @throws ArangoException
147129 */
@@ -166,11 +148,9 @@ public function createCollection(
166148 }
167149
168150 /**
169- * @param string $name
170151 * @param array<mixed> $config
171152 * @param int|bool|null $waitForSyncReplication
172153 * @param int|bool|null $enforceReplicationFactor
173- * @return stdClass
174154 *
175155 * @throws ArangoException
176156 */
@@ -186,9 +166,7 @@ public function createEdgeCollection(
186166 }
187167
188168 /**
189- * @param string $name
190169 * @param array<mixed> $config
191- * @return stdClass
192170 *
193171 * @throws ArangoException
194172 */
@@ -202,10 +180,6 @@ public function updateCollection(string $name, array $config = []): stdClass
202180 }
203181
204182 /**
205- * @param string $old
206- * @param string $new
207- * @return stdClass
208- *
209183 * @throws ArangoException
210184 */
211185 public function renameCollection (string $ old , string $ new ): stdClass
@@ -222,9 +196,6 @@ public function renameCollection(string $old, string $new): stdClass
222196 }
223197
224198 /**
225- * @param string $name
226- * @return stdClass
227- *
228199 * @throws ArangoException
229200 */
230201 public function truncateCollection (string $ name ): stdClass
@@ -235,9 +206,6 @@ public function truncateCollection(string $name): stdClass
235206 }
236207
237208 /**
238- * @param string $name
239- * @return bool
240- *
241209 * @throws ArangoException
242210 */
243211 public function deleteCollection (string $ name ): bool
0 commit comments