Skip to content

Commit 58b43e7

Browse files
committed
Auto-fix CS
1 parent 0a0fb9d commit 58b43e7

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

config/bootstrap.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
use Cake\Routing\Router;
34

45
Router::extensions(['json']);

src/Controller/Component/AjaxComponent.php

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ protected function _isControllerSerializeTrue() {
149149
if ($this->getController()->viewBuilder()->getVar('_serialize') && $this->getController()->viewBuilder()->getVar('_serialize') === true) {
150150
return true;
151151
}
152+
152153
return false;
153154
}
154155

src/View/AjaxView.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
class AjaxView extends AppView {
2525

26-
const JSON_OPTIONS = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_PARTIAL_OUTPUT_ON_ERROR;
26+
public const JSON_OPTIONS = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_PARTIAL_OUTPUT_ON_ERROR;
2727

2828
/**
2929
* List of variables to collect from the associated controller.
@@ -59,9 +59,9 @@ class AjaxView extends AppView {
5959
* options which get set as class properties.
6060
*/
6161
public function __construct(
62-
ServerRequest $request = null,
63-
Response $response = null,
64-
EventManager $eventManager = null,
62+
?ServerRequest $request = null,
63+
?Response $response = null,
64+
?EventManager $eventManager = null,
6565
array $viewOptions = []
6666
) {
6767
parent::__construct($request, $response, $eventManager, $viewOptions);
@@ -152,6 +152,7 @@ protected function _dataToSerialize($serialize, $additionalData = []) {
152152
$this->viewVars,
153153
array_flip($this->_specialVars)
154154
);
155+
155156
return $data;
156157
}
157158

src/View/JsonEncoder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class JsonEncoder {
1010
* @param array $dataToSerialize
1111
* @param int $options
1212
*
13-
* @return string
1413
* @throws \RuntimeException
14+
* @return string
1515
*/
1616
public static function encode(array $dataToSerialize, $options = 0) {
1717
$result = json_encode($dataToSerialize, $options);

tests/TestCase/View/AjaxViewTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* For full copyright and license information, please see the LICENSE.txt
55
* Redistributions of files must retain the above copyright notice
66
*
7-
* @author Mark Scherer
7+
* @author Mark Scherer
88
* @license http://opensource.org/licenses/mit-license.php MIT
99
*/
1010

0 commit comments

Comments
 (0)