Skip to content

Commit 5dbe95a

Browse files
committed
Some more cleanup of documentation plus some reformatting
1 parent d009762 commit 5dbe95a

34 files changed

+624
-591
lines changed

lib/triagens/ArangoDb/AqlUserFunction.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
* @property string $code - The code of the user function
4646
* @property mixed _action
4747
*
48-
* @package triagens\ArangoDb
48+
* @package triagens\ArangoDb
49+
* @since 1.3
4950
*/
5051
class AqlUserFunction
5152
{
@@ -93,8 +94,8 @@ class AqlUserFunction
9394
* )
9495
*
9596
*
96-
* @param Connection $connection - the connection to be used
97-
* @param array $attributesArray - user function initialization data
97+
* @param Connection $connection - the connection to be used
98+
* @param array $attributesArray - user function initialization data
9899
*
99100
* @return \triagens\ArangoDb\AqlUserFunction
100101
*/
@@ -135,8 +136,8 @@ public function register($name = null, $code = null)
135136
}
136137

137138
$response = $this->_connection->post(
138-
Urls::URL_AQL_USER_FUNCTION,
139-
$this->getConnection()->json_encode_wrapper($attributes)
139+
Urls::URL_AQL_USER_FUNCTION,
140+
$this->getConnection()->json_encode_wrapper($attributes)
140141
);
141142
$responseArray = $response->getJson();
142143

@@ -151,7 +152,7 @@ public function register($name = null, $code = null)
151152
*
152153
* If $name is passed, it will override the object's property with the passed one
153154
*
154-
* @param string $name
155+
* @param string $name
155156
* @param boolean $namespace
156157
*
157158
* @throws Exception throw exception if the request fails
@@ -166,7 +167,7 @@ public function unregister($name = null, $namespace = false)
166167

167168
$url = UrlHelper::buildUrl(Urls::URL_AQL_USER_FUNCTION, array($name));
168169

169-
if($namespace){
170+
if ($namespace) {
170171
$url = UrlHelper::appendParamsUrl($url, array('group' => true));
171172
}
172173

lib/triagens/ArangoDb/Autoloader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
* process classes from its own namespace and ignore all others.<br>
1818
* <br>
1919
*
20-
* @package triagens\ArangoDb
20+
* @package triagens\ArangoDb
21+
* @since 0.2
2122
*/
2223
class Autoloader
2324
{

lib/triagens/ArangoDb/Batch.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@
1616
*
1717
* <br>
1818
*
19-
* @package triagens\ArangoDb
20-
* @example ArangoDb/examples/batch.php
19+
* @package triagens\ArangoDb
20+
* @since 1.1
2121
*/
22-
23-
2422
class Batch
2523
{
2624
/**

lib/triagens/ArangoDb/BatchPart.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
*
1717
* <br>
1818
*
19-
* @package triagens\ArangoDb
19+
* @package triagens\ArangoDb
20+
* @since 1.1
2021
*/
2122

2223

lib/triagens/ArangoDb/BindVars.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
* This container also handles validation of the bind values.<br>
1717
* <br>
1818
*
19-
* @package triagens\ArangoDb
19+
* @package triagens\ArangoDb
20+
* @since 0.2
2021
*/
2122
class BindVars
2223
{

lib/triagens/ArangoDb/ClientException.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
* on the client side, i.e. something the server is not involved in.<br>
1818
* <br>
1919
*
20-
* @package triagens\ArangoDb
20+
* @package triagens\ArangoDb
21+
* @since 0.2
2122
*/
2223
class ClientException extends
2324
Exception

lib/triagens/ArangoDb/Collection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
*
1616
* <br>
1717
*
18-
* @package triagens\ArangoDb
18+
* @package triagens\ArangoDb
19+
* @since 0.2
1920
*/
2021
class Collection
2122
{

lib/triagens/ArangoDb/CollectionHandler.php

Lines changed: 196 additions & 187 deletions
Large diffs are not rendered by default.

lib/triagens/ArangoDb/ConnectException.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
* during connecting to the server.<br>
1818
* <br>
1919
*
20-
* @package triagens\ArangoDb
20+
* @package triagens\ArangoDb
21+
* @since 0.2
2122
*/
2223
class ConnectException extends
2324
Exception

lib/triagens/ArangoDb/Connection.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
* and are destroyed afterwards.<br>
2020
* <br>
2121
*
22-
* @package triagens\ArangoDb
22+
* @package triagens\ArangoDb
23+
* @since 0.2
2324
*/
2425
class Connection
2526
{
@@ -221,7 +222,7 @@ private function getHandle()
221222
$handle = $this->_handle;
222223

223224
// check if connection is still valid
224-
if (! feof($handle)) {
225+
if (!feof($handle)) {
225226
// connection still valid
226227
return $handle;
227228
}
@@ -281,7 +282,7 @@ public function parseResponse(HttpResponse $response)
281282

282283
return $response;
283284
}
284-
285+
285286
/**
286287
* Execute an HTTP request and return the results
287288
*
@@ -315,7 +316,7 @@ private function executeRequest($method, $url, $data)
315316

316317
if ($this->_captureBatch === true) {
317318
$batchPart = $this->doBatch($method, $request);
318-
if (! is_null($batchPart)) {
319+
if (!is_null($batchPart)) {
319320
return $batchPart;
320321
}
321322
}
@@ -360,24 +361,25 @@ private function executeRequest($method, $url, $data)
360361
$timeTaken = microtime(true) - $startTime;
361362
}
362363

363-
if (! $this->_useKeepAlive) {
364+
if (!$this->_useKeepAlive) {
364365
// must close the connection
365366
fclose($handle);
366367
}
367368

368-
/*
369-
$status = socket_get_status($handle);
370-
if ($status['timed_out']) {
371-
throw new ClientException('Got a timeout when waiting on the server\'s response');
372-
}
373-
*/
369+
/*
370+
$status = socket_get_status($handle);
371+
if ($status['timed_out']) {
372+
throw new ClientException('Got a timeout when waiting on the server\'s response');
373+
}
374+
*/
374375
$response = new HttpResponse($result);
375376

376377
if ($traceFunc) {
377378
// call tracer func
378379
if ($this->_options[ConnectionOptions::OPTION_ENHANCED_TRACE]) {
379380
$traceFunc(
380-
new TraceResponse($response->getHeaders(), $response->getHttpCode(), $response->getBody(), $timeTaken)
381+
new TraceResponse($response->getHeaders(), $response->getHttpCode(), $response->getBody(
382+
), $timeTaken)
381383
);
382384
} else {
383385
$traceFunc('receive', $result);

0 commit comments

Comments
 (0)