mirror of
https://github.com/standardebooks/web.git
synced 2025-07-17 20:06:39 -04:00
PHPStan corrections
This commit is contained in:
parent
30cd00dbb7
commit
afab78af46
32 changed files with 77 additions and 40 deletions
|
@ -1,4 +1,5 @@
|
|||
<?
|
||||
use function Safe\session_start;
|
||||
use function Safe\session_unset;
|
||||
|
||||
try{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?
|
||||
use function Safe\session_start;
|
||||
use function Safe\session_unset;
|
||||
|
||||
session_start();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?
|
||||
use function Safe\session_start;
|
||||
use function Safe\session_unset;
|
||||
|
||||
try{
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<?
|
||||
use function Safe\session_start;
|
||||
|
||||
try{
|
||||
session_start();
|
||||
$httpMethod = HttpInput::ValidateRequestMethod([Enums\HttpMethod::Post, Enums\HttpMethod::Patch, Enums\HttpMethod::Put]);
|
||||
$exceptionRedirectUrl = '/artworks/new';
|
||||
$artwork = new Artwork();
|
||||
|
||||
if(HttpInput::IsRequestTooLarge()){
|
||||
throw new Exceptions\InvalidRequestException('File upload too large.');
|
||||
|
@ -18,8 +20,6 @@ try{
|
|||
if(!Session::$User->Benefits->CanUploadArtwork){
|
||||
throw new Exceptions\InvalidPermissionsException();
|
||||
}
|
||||
|
||||
$artwork = new Artwork();
|
||||
$artwork->FillFromHttpPost();
|
||||
|
||||
$artwork->SubmitterUserId = Session::$User->UserId ?? null;
|
||||
|
@ -54,8 +54,6 @@ try{
|
|||
|
||||
$exceptionRedirectUrl = $originalArtwork->EditUrl;
|
||||
|
||||
$artwork = new Artwork();
|
||||
|
||||
try{
|
||||
$artwork->FillFromHttpPost();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue