updated-packages
This commit is contained in:
16
vendor/maatwebsite/excel/src/Exceptions/ConcernConflictException.php
vendored
Normal file
16
vendor/maatwebsite/excel/src/Exceptions/ConcernConflictException.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Exceptions;
|
||||
|
||||
use LogicException;
|
||||
|
||||
class ConcernConflictException extends LogicException implements LaravelExcelException
|
||||
{
|
||||
/**
|
||||
* @return ConcernConflictException
|
||||
*/
|
||||
public static function queryOrCollectionAndView()
|
||||
{
|
||||
return new static('Cannot use FromQuery, FromArray or FromCollection and FromView on the same sheet.');
|
||||
}
|
||||
}
|
||||
9
vendor/maatwebsite/excel/src/Exceptions/LaravelExcelException.php
vendored
Normal file
9
vendor/maatwebsite/excel/src/Exceptions/LaravelExcelException.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Exceptions;
|
||||
|
||||
use Throwable;
|
||||
|
||||
interface LaravelExcelException extends Throwable
|
||||
{
|
||||
}
|
||||
38
vendor/maatwebsite/excel/src/Exceptions/NoFilePathGivenException.php
vendored
Normal file
38
vendor/maatwebsite/excel/src/Exceptions/NoFilePathGivenException.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Exceptions;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Throwable;
|
||||
|
||||
class NoFilePathGivenException extends InvalidArgumentException implements LaravelExcelException
|
||||
{
|
||||
/**
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct(
|
||||
$message = 'A filepath needs to be passed.',
|
||||
$code = 0,
|
||||
Throwable $previous = null
|
||||
) {
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return NoFilePathGivenException
|
||||
*/
|
||||
public static function import()
|
||||
{
|
||||
return new static('A filepath or UploadedFile needs to be passed to start the import.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return NoFilePathGivenException
|
||||
*/
|
||||
public static function export()
|
||||
{
|
||||
return new static('A filepath needs to be passed in order to store the export.');
|
||||
}
|
||||
}
|
||||
22
vendor/maatwebsite/excel/src/Exceptions/NoFilenameGivenException.php
vendored
Normal file
22
vendor/maatwebsite/excel/src/Exceptions/NoFilenameGivenException.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Exceptions;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Throwable;
|
||||
|
||||
class NoFilenameGivenException extends InvalidArgumentException implements LaravelExcelException
|
||||
{
|
||||
/**
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct(
|
||||
$message = 'A filename needs to be passed in order to download the export',
|
||||
$code = 0,
|
||||
Throwable $previous = null
|
||||
) {
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
}
|
||||
22
vendor/maatwebsite/excel/src/Exceptions/NoTypeDetectedException.php
vendored
Normal file
22
vendor/maatwebsite/excel/src/Exceptions/NoTypeDetectedException.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
class NoTypeDetectedException extends Exception implements LaravelExcelException
|
||||
{
|
||||
/**
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct(
|
||||
$message = 'No ReaderType or WriterType could be detected. Make sure you either pass a valid extension to the filename or pass an explicit type.',
|
||||
$code = 0,
|
||||
Throwable $previous = null
|
||||
) {
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
}
|
||||
41
vendor/maatwebsite/excel/src/Exceptions/RowSkippedException.php
vendored
Normal file
41
vendor/maatwebsite/excel/src/Exceptions/RowSkippedException.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Support\Collection;
|
||||
use Maatwebsite\Excel\Validators\Failure;
|
||||
|
||||
class RowSkippedException extends Exception
|
||||
{
|
||||
/**
|
||||
* @var Failure[]
|
||||
*/
|
||||
private $failures;
|
||||
|
||||
/**
|
||||
* @param Failure ...$failures
|
||||
*/
|
||||
public function __construct(Failure ...$failures)
|
||||
{
|
||||
$this->failures = $failures;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Failure[]|Collection
|
||||
*/
|
||||
public function failures(): Collection
|
||||
{
|
||||
return new Collection($this->failures);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int[]
|
||||
*/
|
||||
public function skippedRows(): array
|
||||
{
|
||||
return $this->failures()->map->row()->all();
|
||||
}
|
||||
}
|
||||
27
vendor/maatwebsite/excel/src/Exceptions/SheetNotFoundException.php
vendored
Normal file
27
vendor/maatwebsite/excel/src/Exceptions/SheetNotFoundException.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Exceptions;
|
||||
|
||||
class SheetNotFoundException extends \Exception implements LaravelExcelException
|
||||
{
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return SheetNotFoundException
|
||||
*/
|
||||
public static function byName(string $name): SheetNotFoundException
|
||||
{
|
||||
return new static("Your requested sheet name [{$name}] is out of bounds.");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $index
|
||||
* @param int $sheetCount
|
||||
*
|
||||
* @return SheetNotFoundException
|
||||
*/
|
||||
public static function byIndex(int $index, int $sheetCount): SheetNotFoundException
|
||||
{
|
||||
return new static("Your requested sheet index: {$index} is out of bounds. The actual number of sheets is {$sheetCount}.");
|
||||
}
|
||||
}
|
||||
22
vendor/maatwebsite/excel/src/Exceptions/UnreadableFileException.php
vendored
Normal file
22
vendor/maatwebsite/excel/src/Exceptions/UnreadableFileException.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Maatwebsite\Excel\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
class UnreadableFileException extends Exception implements LaravelExcelException
|
||||
{
|
||||
/**
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct(
|
||||
$message = 'File could not be read',
|
||||
$code = 0,
|
||||
Throwable $previous = null
|
||||
) {
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user