@@ -152,6 +152,9 @@ |
||
| 152 | 152 | $renderer->error($error); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | + /** |
|
| 156 | + * @param string $text |
|
| 157 | + */ |
|
| 155 | 158 | protected function _xmlMessage($text) |
| 156 | 159 | { |
| 157 | 160 | return '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . $text . "\n"; |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | * |
| 129 | 129 | * @param EntityInterface $entity An Entity instance. |
| 130 | 130 | * @param array $data Entity data. |
| 131 | - * @return \Cake\Datasource\EntityInterface|mixed |
|
| 131 | + * @return EntityInterface |
|
| 132 | 132 | */ |
| 133 | 133 | protected function _patchEntity($entity, $data) |
| 134 | 134 | { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | /** |
| 163 | 163 | * Returns single entity by id. |
| 164 | 164 | * |
| 165 | - * @param mixed $primaryKey Primary key. |
|
| 165 | + * @param string $primaryKey Primary key. |
|
| 166 | 166 | * @return \Cake\Collection\Collection |
| 167 | 167 | */ |
| 168 | 168 | protected function _getEntity($primaryKey) |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | /** |
| 212 | 212 | * Model id getter. |
| 213 | 213 | * |
| 214 | - * @return mixed|string |
|
| 214 | + * @return string |
|
| 215 | 215 | */ |
| 216 | 216 | public function id() |
| 217 | 217 | { |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | /** |
| 232 | 232 | * Parent id getter. |
| 233 | 233 | * |
| 234 | - * @return mixed|string |
|
| 234 | + * @return string |
|
| 235 | 235 | */ |
| 236 | 236 | public function parentId() |
| 237 | 237 | { |
@@ -7,11 +7,8 @@ |
||
| 7 | 7 | use Cake\Core\Configure; |
| 8 | 8 | use Cake\Http\RequestTransformer; |
| 9 | 9 | use Cake\Http\ResponseTransformer; |
| 10 | -use Cake\Routing\Exception\RedirectException; |
|
| 11 | -use Cake\Routing\Router; |
|
| 12 | 10 | use Psr\Http\Message\ResponseInterface; |
| 13 | 11 | use Psr\Http\Message\ServerRequestInterface; |
| 14 | -use Zend\Diactoros\Response\RedirectResponse; |
|
| 15 | 12 | |
| 16 | 13 | /** |
| 17 | 14 | * Applies routing rules to the request and creates the controller |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | /** |
| 62 | 62 | * Determines the content type of the data the client has sent (i.e. in a POST request) |
| 63 | 63 | * |
| 64 | - * @param string|array|null $type Can be null (or no parameter), a string type name, or an array of types |
|
| 64 | + * @param string $type Can be null (or no parameter), a string type name, or an array of types |
|
| 65 | 65 | * @return mixed If a single type is supplied a boolean will be returned. If no type is provided |
| 66 | 66 | * The mapped value of CONTENT_TYPE will be returned. If an array is supplied the first type |
| 67 | 67 | * in the request content type will be returned. |
@@ -4,17 +4,11 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Cake\Utility\Exception\XmlException; |
| 6 | 6 | use Cake\Utility\Xml; |
| 7 | -use CakeDC\Api\Service\ConfigReader; |
|
| 8 | -use CakeDC\Api\Service\ServiceRegistry; |
|
| 9 | -use Cake\Core\Configure; |
|
| 10 | 7 | use Cake\Http\RequestTransformer; |
| 11 | 8 | use Cake\Http\ResponseTransformer; |
| 12 | -use Cake\Routing\Exception\RedirectException; |
|
| 13 | -use Cake\Routing\Router; |
|
| 14 | 9 | use Psr\Http\Message\ResponseInterface; |
| 15 | 10 | use Psr\Http\Message\ServerRequestInterface; |
| 16 | 11 | use RuntimeException; |
| 17 | -use Zend\Diactoros\Response\RedirectResponse; |
|
| 18 | 12 | |
| 19 | 13 | /** |
| 20 | 14 | * Applies routing rules to the request and creates the controller |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | /** |
| 68 | 68 | * Execute action. |
| 69 | 69 | * |
| 70 | - * @return mixed |
|
| 70 | + * @return string|null |
|
| 71 | 71 | * @throws Exception |
| 72 | 72 | */ |
| 73 | 73 | public function execute() |
@@ -85,6 +85,9 @@ |
||
| 85 | 85 | $this->Action->execute(); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | + /** |
|
| 89 | + * @param integer $id |
|
| 90 | + */ |
|
| 88 | 91 | protected function _initializeAction($id, $post = []) |
| 89 | 92 | { |
| 90 | 93 | $this->_initializeRequest([ |
@@ -16,8 +16,6 @@ |
||
| 16 | 16 | use CakeDC\Api\TestSuite\TestCase; |
| 17 | 17 | use CakeDC\Api\Test\ConfigTrait; |
| 18 | 18 | use CakeDC\Api\Test\FixturesTrait; |
| 19 | -use Cake\Network\Request; |
|
| 20 | -use Cake\Network\Response; |
|
| 21 | 19 | |
| 22 | 20 | class ServiceRegistryTest extends TestCase |
| 23 | 21 | { |
@@ -18,7 +18,6 @@ |
||
| 18 | 18 | use CakeDC\Api\TestSuite\TestCase; |
| 19 | 19 | use CakeDC\Api\Test\ConfigTrait; |
| 20 | 20 | use CakeDC\Api\Test\FixturesTrait; |
| 21 | -use Cake\Controller\Controller; |
|
| 22 | 21 | use Cake\Core\Configure; |
| 23 | 22 | |
| 24 | 23 | class ServiceTest extends TestCase |
@@ -85,6 +85,9 @@ |
||
| 85 | 85 | $this->Action->execute(); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | + /** |
|
| 89 | + * @param integer $id |
|
| 90 | + */ |
|
| 88 | 91 | protected function _initializeAction($id, $post = []) |
| 89 | 92 | { |
| 90 | 93 | $this->_initializeRequest([ |