admin/jqadm/src/Admin/JQAdm/Coupon/Code/Standard.php
protected function checkFileUpload( \Psr\Http\Message\UploadedFileInterface $file )
	{
		if( $file->getError() !== UPLOAD_ERR_OK )
		{
			switch( $file->getError() )
			{
				case UPLOAD_ERR_INI_SIZE:
				case UPLOAD_ERR_FORM_SIZE:
					throw new \Aimeos\Admin\JQAdm\Exception( 'The uploaded file exceeds the max. allowed filesize' );
				case UPLOAD_ERR_PARTIAL:
					throw new \Aimeos\Admin\JQAdm\Exception( 'The uploaded file was only partially uploaded' );
				case UPLOAD_ERR_NO_FILE:
					throw new \Aimeos\Admin\JQAdm\Exception( 'No file was uploaded' );
				case UPLOAD_ERR_NO_TMP_DIR:
					throw new \Aimeos\Admin\JQAdm\Exception( 'Temporary folder is missing' );
				case UPLOAD_ERR_CANT_WRITE:
					throw new \Aimeos\Admin\JQAdm\Exception( 'Failed to write file to disk' );
				case UPLOAD_ERR_EXTENSION:
					throw new \Aimeos\Admin\JQAdm\Exception( 'File upload stopped by extension' );
				default:
					throw new \Aimeos\Admin\JQAdm\Exception( 'Unknown upload error' );
			}
		}
	}
protected function checkFileUpload( \Psr\Http\Message\UploadedFileInterface $file )
	{
		if( $file->getError() !== UPLOAD_ERR_OK )
		{
			switch( $file->getError() )
			{
				case UPLOAD_ERR_INI_SIZE:
				case UPLOAD_ERR_FORM_SIZE:
					throw new \Aimeos\Admin\JQAdm\Exception( 'The uploaded file exceeds the max. allowed filesize' );
				case UPLOAD_ERR_PARTIAL:
					throw new \Aimeos\Admin\JQAdm\Exception( 'The uploaded file was only partially uploaded' );
				case UPLOAD_ERR_NO_FILE:
					throw new \Aimeos\Admin\JQAdm\Exception( 'No file was uploaded' );
				case UPLOAD_ERR_NO_TMP_DIR:
					throw new \Aimeos\Admin\JQAdm\Exception( 'Temporary folder is missing' );
				case UPLOAD_ERR_CANT_WRITE:
					throw new \Aimeos\Admin\JQAdm\Exception( 'Failed to write file to disk' );
				case UPLOAD_ERR_EXTENSION:
					throw new \Aimeos\Admin\JQAdm\Exception( 'File upload stopped by extension' );
				default:
					throw new \Aimeos\Admin\JQAdm\Exception( 'Unknown upload error' );
			}
		}
	}
protected function checkFileUpload ( \ Psr \ Http \ Message \ UploadedFileInterface $ file ) { if ( $ file -> getError ( ) !== UPLOAD_ERR_OK ) { switch ( $ file -> getError ( ) ) { case UPLOAD_ERR_INI_SIZE : case UPLOAD_ERR_FORM_SIZE : throw new \ Aimeos \ Admin \ JQAdm \ Exception ( 'The uploaded file exceeds the max. allowed filesize' ) ; case UPLOAD_ERR_PARTIAL : throw new \ Aimeos \ Admin \ JQAdm \ Exception ( 'The uploaded file was only partially uploaded' ) ; case UPLOAD_ERR_NO_FILE : throw new \ Aimeos \ Admin \ JQAdm \ Exception ( 'No file was uploaded' ) ; case UPLOAD_ERR_NO_TMP_DIR : throw new \ Aimeos \ Admin \ JQAdm \ Exception ( 'Temporary folder is missing' ) ; case UPLOAD_ERR_CANT_WRITE : throw new \ Aimeos \ Admin \ JQAdm \ Exception ( 'Failed to write file to disk' ) ; case UPLOAD_ERR_EXTENSION : throw new \ Aimeos \ Admin \ JQAdm \ Exception ( 'File upload stopped by extension' ) ; default : throw new \ Aimeos \ Admin \ JQAdm \ Exception ( 'Unknown upload error' ) ; } } }
Checks if an error during upload occured

@param \Psr\Http\Message\UploadedFileInterface $file Uploaded file
@throws \Aimeos\Admin\JQAdm\Exception If an error occured during upload
Checks if an error during upload occured