@@ -94,8 +94,8 @@ class AqlUserFunction
94
94
* )
95
95
*
96
96
*
97
- * @param Connection $connection - the connection to be used
98
- * @param array $attributesArray - user function initialization data
97
+ * @param Connection $connection - the connection to be used
98
+ * @param array $attributesArray - user function initialization data
99
99
*
100
100
*/
101
101
public function __construct (Connection $ connection , array $ attributesArray = null )
@@ -138,6 +138,7 @@ public function register($name = null, $code = null)
138
138
Urls::URL_AQL_USER_FUNCTION ,
139
139
$ this ->getConnection ()->json_encode_wrapper ($ attributes )
140
140
);
141
+
141
142
return $ response ->getJson ();
142
143
}
143
144
@@ -149,7 +150,7 @@ public function register($name = null, $code = null)
149
150
*
150
151
* If $name is passed, it will override the object's property with the passed one
151
152
*
152
- * @param string $name
153
+ * @param string $name
153
154
* @param boolean $namespace
154
155
*
155
156
* @throws Exception throw exception if the request fails
@@ -169,6 +170,7 @@ public function unregister($name = null, $namespace = false)
169
170
}
170
171
171
172
$ response = $ this ->_connection ->delete ($ url );
173
+
172
174
return $ response ->getJson ();
173
175
}
174
176
@@ -207,20 +209,20 @@ protected function getConnection()
207
209
}
208
210
209
211
210
- /**
211
- * Set name of the user function. It must have at least one namespace, but also can have sub-namespaces.
212
- * correct:
213
- * 'myNamespace:myFunction'
214
- * 'myRootNamespace:mySubNamespace:myFunction'
215
- *
216
- * wrong:
217
- * 'myFunction'
218
- *
219
- *
220
- * @param string $value
221
- *
222
- * @throws \triagens\ArangoDb\ClientException
223
- */
212
+ /**
213
+ * Set name of the user function. It must have at least one namespace, but also can have sub-namespaces.
214
+ * correct:
215
+ * 'myNamespace:myFunction'
216
+ * 'myRootNamespace:mySubNamespace:myFunction'
217
+ *
218
+ * wrong:
219
+ * 'myFunction'
220
+ *
221
+ *
222
+ * @param string $value
223
+ *
224
+ * @throws \triagens\ArangoDb\ClientException
225
+ */
224
226
public function setName ($ value )
225
227
{
226
228
$ this ->set (self ::ENTRY_NAME , (string ) $ value );
@@ -237,13 +239,13 @@ public function getName()
237
239
return $ this ->get (self ::ENTRY_NAME );
238
240
}
239
241
240
- /**
241
- * Set user function code
242
- *
243
- * @param string $value
244
- *
245
- * @throws \triagens\ArangoDb\ClientException
246
- */
242
+ /**
243
+ * Set user function code
244
+ *
245
+ * @param string $value
246
+ *
247
+ * @throws \triagens\ArangoDb\ClientException
248
+ */
247
249
public function setCode ($ value )
248
250
{
249
251
$ this ->set (self ::ENTRY_CODE , (string ) $ value );
@@ -261,22 +263,23 @@ public function getCode()
261
263
}
262
264
263
265
264
- /**
265
- * Set an attribute
266
- *
267
- * @param $key
268
- * @param $value
269
- *
270
- * @return $this
271
- * @throws ClientException
272
- */
266
+ /**
267
+ * Set an attribute
268
+ *
269
+ * @param $key
270
+ * @param $value
271
+ *
272
+ * @return $this
273
+ * @throws ClientException
274
+ */
273
275
public function set ($ key , $ value )
274
276
{
275
277
if (!is_string ($ key )) {
276
278
throw new ClientException ('Invalid attribute key ' );
277
279
}
278
280
279
281
$ this ->attributes [$ key ] = $ value ;
282
+
280
283
return $ this ;
281
284
}
282
285
@@ -291,8 +294,8 @@ public function set($key, $value)
291
294
*
292
295
* @magic
293
296
*
294
- * @param string $key - attribute name
295
- * @param mixed $value - value for attribute
297
+ * @param string $key - attribute name
298
+ * @param mixed $value - value for attribute
296
299
*/
297
300
public function __set ($ key , $ value )
298
301
{
@@ -321,6 +324,7 @@ public function get($key)
321
324
if (isset ($ this ->attributes [$ key ])) {
322
325
return $ this ->attributes [$ key ];
323
326
}
327
+
324
328
return null ;
325
329
}
326
330
0 commit comments