fix(lint): Fix code style issues by using `composer run cs:fix`
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
This commit is contained in:
Родитель
2e416e2f2b
Коммит
6e23be415a
|
@ -18,8 +18,8 @@ class NoteApiController extends ApiController {
|
|||
use Errors;
|
||||
|
||||
public function __construct(IRequest $request,
|
||||
NoteService $service,
|
||||
$userId) {
|
||||
NoteService $service,
|
||||
$userId) {
|
||||
parent::__construct(Application::APP_ID, $request);
|
||||
$this->service = $service;
|
||||
$this->userId = $userId;
|
||||
|
@ -61,7 +61,7 @@ class NoteApiController extends ApiController {
|
|||
* @NoAdminRequired
|
||||
*/
|
||||
public function update(int $id, string $title,
|
||||
string $content): DataResponse {
|
||||
string $content): DataResponse {
|
||||
return $this->handleNotFound(function () use ($id, $title, $content) {
|
||||
return $this->service->update($id, $title, $content, $this->userId);
|
||||
});
|
||||
|
|
|
@ -18,8 +18,8 @@ class NoteController extends Controller {
|
|||
use Errors;
|
||||
|
||||
public function __construct(IRequest $request,
|
||||
NoteService $service,
|
||||
$userId) {
|
||||
NoteService $service,
|
||||
$userId) {
|
||||
parent::__construct(Application::APP_ID, $request);
|
||||
$this->service = $service;
|
||||
$this->userId = $userId;
|
||||
|
@ -53,7 +53,7 @@ class NoteController extends Controller {
|
|||
* @NoAdminRequired
|
||||
*/
|
||||
public function update(int $id, string $title,
|
||||
string $content): DataResponse {
|
||||
string $content): DataResponse {
|
||||
return $this->handleNotFound(function () use ($id, $title, $content) {
|
||||
return $this->service->update($id, $title, $content, $this->userId);
|
||||
});
|
||||
|
|
|
@ -37,9 +37,9 @@ class NoteService {
|
|||
return $this->mapper->find($id, $userId);
|
||||
|
||||
// in order to be able to plug in different storage backends like files
|
||||
// for instance it is a good idea to turn storage related exceptions
|
||||
// into service related exceptions so controllers and service users
|
||||
// have to deal with only one type of exception
|
||||
// for instance it is a good idea to turn storage related exceptions
|
||||
// into service related exceptions so controllers and service users
|
||||
// have to deal with only one type of exception
|
||||
} catch (Exception $e) {
|
||||
$this->handleException($e);
|
||||
}
|
||||
|
|
|
@ -30,9 +30,9 @@ class NoteControllerTest extends TestCase {
|
|||
$this->service->expects($this->once())
|
||||
->method('update')
|
||||
->with($this->equalTo(3),
|
||||
$this->equalTo('title'),
|
||||
$this->equalTo('content'),
|
||||
$this->equalTo($this->userId))
|
||||
$this->equalTo('title'),
|
||||
$this->equalTo('content'),
|
||||
$this->equalTo($this->userId))
|
||||
->will($this->returnValue($note));
|
||||
|
||||
$result = $this->controller->update(3, 'title', 'content');
|
||||
|
|
Загрузка…
Ссылка в новой задаче