20220717
This commit is contained in:
40
vendor/illuminate/collections/MultipleItemsFoundException.php
vendored
Normal file
40
vendor/illuminate/collections/MultipleItemsFoundException.php
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Support;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class MultipleItemsFoundException extends RuntimeException
|
||||
{
|
||||
/**
|
||||
* The number of items found.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $count;
|
||||
|
||||
/**
|
||||
* Create a new exception instance.
|
||||
*
|
||||
* @param int $count
|
||||
* @param int $code
|
||||
* @param \Throwable|null $previous
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($count, $code = 0, $previous = null)
|
||||
{
|
||||
$this->count = $count;
|
||||
|
||||
parent::__construct("$count items were found.", $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of items found.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getCount()
|
||||
{
|
||||
return $this->count;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user