@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | /** |
| 111 | 111 | * Sets the config property and merge the defaults. |
| 112 | 112 | * |
| 113 | - * @param array $config=null |
|
| 113 | + * @param array $config |
|
| 114 | 114 | */ |
| 115 | 115 | public function setConfig(array $config=null) |
| 116 | 116 | { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * Returns the specified config value using its index key. If the index key |
| 133 | 133 | * is not set then it will return the whole config property. |
| 134 | 134 | * |
| 135 | - * @param string $key=null The key to retrieve. |
|
| 135 | + * @param string $key |
|
| 136 | 136 | * @return mixed |
| 137 | 137 | * @throws \InvalidArgumentException |
| 138 | 138 | */ |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | * Returns the specified default config value using its index key. |
| 176 | 176 | * If the index key is not set then it will return the whole default config property. |
| 177 | 177 | * |
| 178 | - * @param string $key=null The key to retrieve. |
|
| 178 | + * @param string $key |
|
| 179 | 179 | * @return mixed |
| 180 | 180 | * @throws \InvalidArgumentException |
| 181 | 181 | */ |
@@ -197,7 +197,6 @@ discard block |
||
| 197 | 197 | * If an index key is specified return the corresponding (mixed) value. |
| 198 | 198 | * |
| 199 | 199 | * @param string $type The sub-array type to retrieve. |
| 200 | - * @param string $key=null A key to narrow the retrieval. |
|
| 201 | 200 | * @return mixed |
| 202 | 201 | * @throws \InvalidArgumentException |
| 203 | 202 | */ |
@@ -222,7 +221,6 @@ discard block |
||
| 222 | 221 | /** |
| 223 | 222 | * Returns all the resources or as the specified. |
| 224 | 223 | * |
| 225 | - * @param string $key=null The resource key to retrieve. |
|
| 226 | 224 | * @see self::retrieve |
| 227 | 225 | */ |
| 228 | 226 | public function getResources($key=null) |
@@ -247,7 +245,6 @@ discard block |
||
| 247 | 245 | /** |
| 248 | 246 | * Returns the specified service -- or all if unspecified. |
| 249 | 247 | * |
| 250 | - * @param string $key=null The service key to retrieve. |
|
| 251 | 248 | * @see self::retrieve |
| 252 | 249 | * @return mixed Generally should return a callback |
| 253 | 250 | */ |
@@ -243,6 +243,11 @@ discard block |
||
| 243 | 243 | exit; |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | + /** |
|
| 247 | + * @param string $url |
|
| 248 | + * |
|
| 249 | + * @return string |
|
| 250 | + */ |
|
| 246 | 251 | public function getContents($url, $method='GET', $body=null) |
| 247 | 252 | { |
| 248 | 253 | $opts = array('http' => array( |
@@ -270,6 +275,9 @@ discard block |
||
| 270 | 275 | return null; |
| 271 | 276 | } |
| 272 | 277 | |
| 278 | + /** |
|
| 279 | + * @param string $url |
|
| 280 | + */ |
|
| 273 | 281 | protected function retrieveUpdate($url, $dest) |
| 274 | 282 | { |
| 275 | 283 | $temp = basename($dest, '.phar').'-temp.phar'; |
@@ -140,7 +140,6 @@ discard block |
||
| 140 | 140 | * Checks wether the current entity holds the specified method. |
| 141 | 141 | * |
| 142 | 142 | * @param string $method |
| 143 | - * @param array $actions=null Use to override local actions. |
|
| 144 | 143 | * @return boolean |
| 145 | 144 | */ |
| 146 | 145 | public function hasMethod($method) |
@@ -217,7 +216,7 @@ discard block |
||
| 217 | 216 | * @param \ReflectionFunctionAbstract $refMethod A reflected method/function to introspect. |
| 218 | 217 | * @param string $httpMethod A public method name e.g. GET, POST. |
| 219 | 218 | * @param array $routeParams An array of route parameters to check upon. |
| 220 | - * @return array The array of validated and required parameters |
|
| 219 | + * @return callable The array of validated and required parameters |
|
| 221 | 220 | * @throws \BadMethodCallException 400 |
| 222 | 221 | */ |
| 223 | 222 | public function getValidatedParams( |
@@ -302,7 +301,7 @@ discard block |
||
| 302 | 301 | /** |
| 303 | 302 | * Returns the redirect location. |
| 304 | 303 | * |
| 305 | - * @return string |
|
| 304 | + * @return boolean |
|
| 306 | 305 | */ |
| 307 | 306 | public function hasRedirect() |
| 308 | 307 | { |
@@ -322,7 +321,6 @@ discard block |
||
| 322 | 321 | /** |
| 323 | 322 | * Returns an array of method keys and action values. |
| 324 | 323 | * |
| 325 | - * @param array $array |
|
| 326 | 324 | * @return array |
| 327 | 325 | */ |
| 328 | 326 | public function getActions() |
@@ -116,6 +116,7 @@ |
||
| 116 | 116 | |
| 117 | 117 | /** |
| 118 | 118 | * {@inheritdoc} |
| 119 | + * @return \ReflectionFunctionAbstract |
|
| 119 | 120 | */ |
| 120 | 121 | public function getMethod(Router $route) |
| 121 | 122 | { |
@@ -137,6 +137,11 @@ discard block |
||
| 137 | 137 | return $method; |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | + /** |
|
| 141 | + * @param string $method |
|
| 142 | + * |
|
| 143 | + * @return callable |
|
| 144 | + */ |
|
| 140 | 145 | private function getAction($method) |
| 141 | 146 | { |
| 142 | 147 | return $this->actions[$method]['action']; |
@@ -148,8 +153,7 @@ discard block |
||
| 148 | 153 | * Adds a redirect. |
| 149 | 154 | * |
| 150 | 155 | * @param string $location A name |
| 151 | - * @param array $resource The resource definition array |
|
| 152 | - * @return void |
|
| 156 | + * @return EntityClosure |
|
| 153 | 157 | */ |
| 154 | 158 | public function redirect($location) |
| 155 | 159 | { |
@@ -161,8 +165,7 @@ discard block |
||
| 161 | 165 | /** |
| 162 | 166 | * Group a resource entity. |
| 163 | 167 | * |
| 164 | - * @param string $name The group name |
|
| 165 | - * @return void |
|
| 168 | + * @return EntityClosure |
|
| 166 | 169 | */ |
| 167 | 170 | public function group($title) |
| 168 | 171 | { |
@@ -20,7 +20,6 @@ discard block |
||
| 20 | 20 | /** |
| 21 | 21 | * Appends the given array definition and apply _local_ mappings. |
| 22 | 22 | * |
| 23 | - * @param array $definitions |
|
| 24 | 23 | * @return void |
| 25 | 24 | */ |
| 26 | 25 | public function append(array $defs); |
@@ -44,15 +43,13 @@ discard block |
||
| 44 | 43 | /** |
| 45 | 44 | * Gets the method |
| 46 | 45 | * |
| 47 | - * @param string $name |
|
| 48 | 46 | * @return |
| 49 | - */ |
|
| 47 | + \ReflectionFunctionAbstract |
|
| 50 | 48 | public function getMethod(Router $route); |
| 51 | 49 | |
| 52 | 50 | /** |
| 53 | 51 | * Sets the actions array. |
| 54 | 52 | * |
| 55 | - * @param array $array=null An associative array of methods as keys and actions as values. |
|
| 56 | 53 | * @return void |
| 57 | 54 | */ |
| 58 | 55 | public function setActions(array $asso = null); |
@@ -81,6 +81,7 @@ |
||
| 81 | 81 | * Handles critical errors (output and logging). |
| 82 | 82 | * |
| 83 | 83 | * @param \Exception $e |
| 84 | + * @param string $alt_msg |
|
| 84 | 85 | * @return array |
| 85 | 86 | */ |
| 86 | 87 | public static function criticalError(\Exception $e, $alt_msg) |
@@ -137,6 +137,7 @@ discard block |
||
| 137 | 137 | * |
| 138 | 138 | * @param mix $plugin |
| 139 | 139 | * @param mix $args |
| 140 | + * @return \SplObserver |
|
| 140 | 141 | */ |
| 141 | 142 | private function callPlugin($plugin, $args) |
| 142 | 143 | { |
@@ -156,7 +157,6 @@ discard block |
||
| 156 | 157 | /** |
| 157 | 158 | * Load the specified plugin |
| 158 | 159 | * |
| 159 | - * @param string $name The plugin name to load |
|
| 160 | 160 | * @param mix $mix The plugin options |
| 161 | 161 | * @return boolean True on success, false otherwise |
| 162 | 162 | * @throws RuntimeException If the plugin does not exists |
@@ -290,7 +290,7 @@ |
||
| 290 | 290 | /** |
| 291 | 291 | * Returns the route object. |
| 292 | 292 | * |
| 293 | - * @return Router |
|
| 293 | + * @return Entity |
|
| 294 | 294 | */ |
| 295 | 295 | public function getRoute() |
| 296 | 296 | { |