mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-04 02:14:06 +02:00
stricter cs
This commit is contained in:
parent
309ae17036
commit
d9a843ecd6
54 changed files with 346 additions and 168 deletions
|
|
@ -1,7 +1,10 @@
|
|||
<?php namespace Demostf\API\Controllers;
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Demostf\API\Controllers;
|
||||
|
||||
use Demostf\API\Providers\UploadProvider;
|
||||
use flight\Engine;
|
||||
|
||||
class UploadController extends BaseController {
|
||||
private $uploadProvider;
|
||||
|
|
@ -11,13 +14,14 @@ class UploadController extends BaseController {
|
|||
}
|
||||
|
||||
public function upload() {
|
||||
$key = $this->post('key', '');
|
||||
$red = $this->post('red', 'RED');
|
||||
$blu = $this->post('blu', 'BLU');
|
||||
$name = $this->post('name', 'Unnamed');
|
||||
$key = (string) $this->post('key', '');
|
||||
$red = (string) $this->post('red', 'RED');
|
||||
$blu = (string) $this->post('blu', 'BLU');
|
||||
$name = (string) $this->post('name', 'Unnamed');
|
||||
$demo = $this->file('demo');
|
||||
if (is_null($demo)) {
|
||||
if (null === $demo) {
|
||||
echo 'No demo uploaded';
|
||||
|
||||
return;
|
||||
}
|
||||
$demoFile = $demo['tmp_name'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue