mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-04 02:14:06 +02:00
type hint all the things
This commit is contained in:
parent
28589d505d
commit
3f9e613e77
34 changed files with 287 additions and 309 deletions
|
|
@ -4,22 +4,19 @@ declare(strict_types=1);
|
|||
|
||||
namespace Demostf\API\Controllers;
|
||||
|
||||
use Demostf\API\Error\InvalidKeyException;
|
||||
use Demostf\API\Providers\UploadProvider;
|
||||
use Exception;
|
||||
use Flight;
|
||||
use flight\net\Request;
|
||||
use flight\net\Response;
|
||||
|
||||
class UploadController extends BaseController {
|
||||
private $uploadProvider;
|
||||
private UploadProvider $uploadProvider;
|
||||
|
||||
public function __construct(Request $request, Response $response, UploadProvider $uploadProvider) {
|
||||
parent::__construct($request, $response);
|
||||
$this->uploadProvider = $uploadProvider;
|
||||
}
|
||||
|
||||
public function upload() {
|
||||
public function upload(): void {
|
||||
$key = (string) $this->post('key', '');
|
||||
$red = (string) $this->post('red', 'RED');
|
||||
$blu = (string) $this->post('blu', 'BLU');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue