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
$finder = PhpCsFixer\Finder::create()
->in('lib/')
->in('tests/')
;
return PhpCsFixer\Config::create()
->setRules([
@ -11,4 +10,4 @@ return PhpCsFixer\Config::create()
])
->setIndent("\t")
->setFinder($finder)
;
;

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