ci: add travis

pull/29/head
sualko 2020-04-29 11:08:49 +02:00
parent 387b66a675
commit 8cbfcab7c4
3 changed files with 19 additions and 8 deletions

View File

@ -1,7 +1,6 @@
<?php <?php
$finder = PhpCsFixer\Finder::create() $finder = PhpCsFixer\Finder::create()
->in('lib/') ->in('lib/')
->in('tests/')
; ;
return PhpCsFixer\Config::create() return PhpCsFixer\Config::create()
->setRules([ ->setRules([

15
.travis.yml Normal file
View File

@ -0,0 +1,15 @@
dist: bionic
cache:
yarn: true
directories:
- node_modules
before_script: phpenv global 7.3
script:
- php -v
- yarn install
- yarn composer:install:dev
- yarn lint
- yarn commitlint-travis

View File

@ -23,8 +23,7 @@ class RoomController extends Controller
IRequest $request, IRequest $request,
RoomService $service, RoomService $service,
$userId $userId
) ) {
{
parent::__construct($appName, $request); parent::__construct($appName, $request);
$this->service = $service; $this->service = $service;
$this->userId = $userId; $this->userId = $userId;
@ -56,8 +55,7 @@ class RoomController extends Controller
string $welcome, string $welcome,
int $maxParticipants, int $maxParticipants,
bool $record bool $record
): DataResponse ): DataResponse {
{
return new DataResponse($this->service->create( return new DataResponse($this->service->create(
$name, $name,
$welcome, $welcome,
@ -76,8 +74,7 @@ class RoomController extends Controller
string $welcome, string $welcome,
int $maxParticipants, int $maxParticipants,
bool $record bool $record
): DataResponse ): DataResponse {
{
return $this->handleNotFound(function () use ($id, $name, $welcome, $maxParticipants, $record) { return $this->handleNotFound(function () use ($id, $name, $welcome, $maxParticipants, $record) {
return $this->service->update($id, $name, $welcome, $maxParticipants, $record, $this->userId); return $this->service->update($id, $name, $welcome, $maxParticipants, $record, $this->userId);
}); });