mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-09 08:23:53 +09:00
changes
This commit is contained in:
32
vendor/knplabs/github-api/lib/Github/Exception/ApiLimitExceedException.php
vendored
Normal file
32
vendor/knplabs/github-api/lib/Github/Exception/ApiLimitExceedException.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Exception;
|
||||
|
||||
/**
|
||||
* ApiLimitExceedException.
|
||||
*
|
||||
* @author Joseph Bielawski <stloyd@gmail.com>
|
||||
*/
|
||||
class ApiLimitExceedException extends RuntimeException
|
||||
{
|
||||
private $limit;
|
||||
private $reset;
|
||||
|
||||
public function __construct($limit = 5000, $reset = 1800, $code = 0, $previous = null)
|
||||
{
|
||||
$this->limit = (int) $limit;
|
||||
$this->reset = (int) $reset;
|
||||
|
||||
parent::__construct(sprintf('You have reached GitHub hourly limit! Actual limit is: %d', $limit), $code, $previous);
|
||||
}
|
||||
|
||||
public function getLimit()
|
||||
{
|
||||
return $this->limit;
|
||||
}
|
||||
|
||||
public function getResetTime()
|
||||
{
|
||||
return $this->reset;
|
||||
}
|
||||
}
|
||||
12
vendor/knplabs/github-api/lib/Github/Exception/BadMethodCallException.php
vendored
Normal file
12
vendor/knplabs/github-api/lib/Github/Exception/BadMethodCallException.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Exception;
|
||||
|
||||
/**
|
||||
* BadMethodCallException.
|
||||
*
|
||||
* @author James Brooks <jbrooksuk@me.com>
|
||||
*/
|
||||
class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
|
||||
{
|
||||
}
|
||||
12
vendor/knplabs/github-api/lib/Github/Exception/ErrorException.php
vendored
Normal file
12
vendor/knplabs/github-api/lib/Github/Exception/ErrorException.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Exception;
|
||||
|
||||
/**
|
||||
* ErrorException.
|
||||
*
|
||||
* @author Joseph Bielawski <stloyd@gmail.com>
|
||||
*/
|
||||
class ErrorException extends \ErrorException implements ExceptionInterface
|
||||
{
|
||||
}
|
||||
9
vendor/knplabs/github-api/lib/Github/Exception/ExceptionInterface.php
vendored
Normal file
9
vendor/knplabs/github-api/lib/Github/Exception/ExceptionInterface.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Exception;
|
||||
|
||||
use Http\Client\Exception;
|
||||
|
||||
interface ExceptionInterface extends Exception
|
||||
{
|
||||
}
|
||||
12
vendor/knplabs/github-api/lib/Github/Exception/InvalidArgumentException.php
vendored
Normal file
12
vendor/knplabs/github-api/lib/Github/Exception/InvalidArgumentException.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Exception;
|
||||
|
||||
/**
|
||||
* InvalidArgumentException.
|
||||
*
|
||||
* @author Joseph Bielawski <stloyd@gmail.com>
|
||||
*/
|
||||
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
|
||||
{
|
||||
}
|
||||
20
vendor/knplabs/github-api/lib/Github/Exception/MissingArgumentException.php
vendored
Normal file
20
vendor/knplabs/github-api/lib/Github/Exception/MissingArgumentException.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Exception;
|
||||
|
||||
/**
|
||||
* MissingArgumentException.
|
||||
*
|
||||
* @author Joseph Bielawski <stloyd@gmail.com>
|
||||
*/
|
||||
class MissingArgumentException extends ErrorException
|
||||
{
|
||||
public function __construct($required, $code = 0, $previous = null)
|
||||
{
|
||||
if (is_string($required)) {
|
||||
$required = [$required];
|
||||
}
|
||||
|
||||
parent::__construct(sprintf('One or more of required ("%s") parameters is missing!', implode('", "', $required)), $code, $previous);
|
||||
}
|
||||
}
|
||||
12
vendor/knplabs/github-api/lib/Github/Exception/RuntimeException.php
vendored
Normal file
12
vendor/knplabs/github-api/lib/Github/Exception/RuntimeException.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Exception;
|
||||
|
||||
/**
|
||||
* RuntimeException.
|
||||
*
|
||||
* @author Joseph Bielawski <stloyd@gmail.com>
|
||||
*/
|
||||
class RuntimeException extends \RuntimeException implements ExceptionInterface
|
||||
{
|
||||
}
|
||||
19
vendor/knplabs/github-api/lib/Github/Exception/TwoFactorAuthenticationRequiredException.php
vendored
Normal file
19
vendor/knplabs/github-api/lib/Github/Exception/TwoFactorAuthenticationRequiredException.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Exception;
|
||||
|
||||
class TwoFactorAuthenticationRequiredException extends RuntimeException
|
||||
{
|
||||
private $type;
|
||||
|
||||
public function __construct($type, $code = 0, $previous = null)
|
||||
{
|
||||
$this->type = $type;
|
||||
parent::__construct('Two factor authentication is enabled on this account', $code, $previous);
|
||||
}
|
||||
|
||||
public function getType()
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
}
|
||||
12
vendor/knplabs/github-api/lib/Github/Exception/ValidationFailedException.php
vendored
Normal file
12
vendor/knplabs/github-api/lib/Github/Exception/ValidationFailedException.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Exception;
|
||||
|
||||
/**
|
||||
* When GitHub returns with a HTTP response that says our request is invalid.
|
||||
*
|
||||
* @author Joseph Bielawski <stloyd@gmail.com>
|
||||
*/
|
||||
class ValidationFailedException extends ErrorException
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user