text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|>* @psalm-pure
*/
function isCallable(mixed $value): callable
{
return Assert::isCallable($value);
}
/**
* @psalm-pure
*/
function nullOrIsCallable(mixed $value): ?callable
{
return Assert::nullOrIsCallable($value);
}
/**
* @psalm-pure
*/
function allIsCallable(mixed $value): iterable
{
... | fim | webmozarts/assert | php |
<|fim_suffix|>@return iterable<Countable|null>
*/
function allNullOrIsCountable(mixed $value)
{
return Assert::allNullOrIsCountable($value);
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Countable;<|fim_middle|>
use Webmozart\Assert\Assert;
/**
* @psalm-pu... | fim | webmozarts/assert | php |
<|fim_suffix|> Assert::nullOrIsEmpty($value);
}
/**
* @psalm-pure
*/
function allIsEmpty(mixed $value): iterable
{
return Assert::allIsEmpty($value);
}
/**
* @psalm-pure
*/
function allNullOrIsEmpty(mixed $value): iterable
{
return Assert::allNullOrIsEmpty($value);
}
<|fim_prefix|><?php
declare(strict_ty... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozar<|fim_suffix|>Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function isInitialized(mixed $value, string $property): object
{
return Assert::isInitialized($value, $property);
}
<|fim_middle|>t\<|endoftext|> | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticA<|fim_suffix|>\Assert;
/**
* @psalm-pure
*/
function isInstanceOf(mixed $value): Serializable
{
return Assert::isInstanceOf($value, Serializable::class);
}
/**
* @psalm-pure
*/
function nullOrIsInstanceOf(mixed $value): ?Se... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @param object $value
* @param array<class-string> $classes
*/
function isInstanceOfAny(object $value, array $classes): object
{
return Assert::isInstanceOfAny($value, $classes);
}
... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function isIterable(mixed $value): iterable
{
return Assert::isIterable($value);
}
/**
* @psalm-pure
*/
function nullOrIsIterable(mixed $value): ?iterable
{
re... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use stdClass;
use Webmozart\Assert\A<|fim_suffix|>param array<stdClass> $value
*
* @return list<stdClass>
*/
function isListWithKnownType(array $value): array
{
return Assert::isList($value);
}
/**
* @psalm-pure
*... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use stdClass;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @return array<string, mixed>
*/
function isMap(mixed $value): array
{
r<|fim_suffix|>
{
$value = [];
return Assert::isMap($value);
}
/**
*... | fim | webmozarts/assert | php |
<|fim_suffix|> * @param array<int> $value
*/
function isNonEmptyListWithRange(array $value): array
{
return Assert::isNonEmptyList($value);
}
/**
* @psalm-pure
*
* @return null|non-empty-list<mixed>
*/
function nullOrIsNonEmptyList(mixed $value): ?array
{
return Assert::nullOrIsNonEmptyList($value);
}
/*... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use stdClass;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* <|fim_suffix|>EmptyMap($value);
}
/**
* @psalm-pure
*
* @param array<string, mixed>|null $value
*/
function nullOrIsNonEmptyMap(?array $value): ?arra... | fim | webmozarts/assert | php |
<|fim_suffix|>e, $class): iterable
{
return Assert::allNullOrIsNotA($value, $class);
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use DateTime;
use Webmozart\Assert\Assert;
/**
<|fim_middle|> * @psalm-pure
*
* @psalm-return object|class-string
*/
function is... | fim | webmozarts/assert | php |
<|fim_suffix|>urn Assert::allNullOrIsNotInstanceOfAny($value, $classes);
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @param array<class-string> $classes
*/
function isNotInstanceOfAny(mixed $value, array $classes): mixed
{
... | fim | webmozarts/assert | php |
<|fim_suffix|>le
{
return Assert::isStatic($closure);
}
<|fim_prefix|><?php
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
function isStat<|fim_middle|>ic(callable $closure): callab<|endoftext|> | fim | webmozarts/assert | php |
<|fim_suffix|>ert;
/**
* @psalm-pure
*
* @param array-key $key
*/
function keyExists(array $array, $key): array
{
return Assert::keyExists($array, $key);
}
/**
* @psalm-pure
*
* @param array-key $key
*/
function nullOrKeyExists(?array $array, $key): ?array
{
return Assert::nullOrKeyExists($array, $key... | fim | webmozarts/assert | php |
<|fim_suffix|>$array, $key);
}
/**
* @psalm-pure
*
* @param iterable<array|null> $array
* @param array-key $key
*/
function allNullOrKeyNotExists(iterable $array, $key): iterable
{
return Assert::allNullOrKeyNotExists($array, $key);
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\T... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function length(string $value, int $length): string
{
return Assert:<|fim_suffix|>h);
}
/**
* @psalm-pure
*
* @param iterable<string> $value
*/
function allLengt... | fim | webmozarts/assert | php |
<|fim_suffix|>*/
function nullOrLengthBetween(?string $value, int $min, int $max): ?string
{
return Assert::nullOrLengthBetween($value, $min, $max);
}
/**
* @psalm-pure
*
* @param iterable<string> $value
*
* @return iterable<string>
*/
function allLengthBetween(iterable $value, int $min, int $max): iterable
... | fim | webmozarts/assert | php |
<|fim_suffix|>lOrLessThan($value, $limit);
}
/**
* @psalm-pure
* @param mixed $limit
*/
function allLessThan(mixed $value, mixed $limit): mixed
{
return Assert::allLessThan($value, $limit);
}
/**
* @psalm-pure
* @param mixed $limit
*/
function allNullOrLessThan(mixed $value, mixed $limit): mixed
{
retur... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
* @param mixed $limit
*/
function lessThanEq(mixed $value, mixed $limit): mixed
{
return Assert::lessThanEq($value, $limit);
}
<|fim_suffix|>imit);
}
<|fim_middle|>/**... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @return lowercase-string
*/
function lower(string $value): string
{
return Assert::lower($value);
}
/**
* @psalm-pure
*
* @return null|lowercase-string
*/
fun... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Countable;
use Webmozart\Assert\Assert;
/**
* @param Countable|array $array
* @param int|float $max
*/
function maxCount(mixed $array, $max): Countable|array
{
return Assert::maxCount($array, $max);
}
/**<|fim_... | fim | webmozarts/assert | php |
<|fim_suffix|>iterable $value, int $max): iterable
{
return Assert::allMaxLength($value, $max);
}
/**
* @psalm-pure
*
* @param iterable<string|null> $value
*
* @return iterable<string|null>
*/
function allNullOrMaxLength(iterable $value, int $max): iterable
{
return Assert::allMaxLength($value, $max);
}
... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_<|fim_suffix|>
/**
* @psalm-pure
*
* @param class-string|object $classOrObject
* @param mixed $method
*/
function methodExists(mixed $classOrObject, $method): string|object
{
return Assert::methodExists($classOrObject, $method);
}
/**
* @psalm-pure
*
* @param null|class-... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @param class-string|object $classOrObject
* @param mixed $method
*/
function methodNotExists(mixed $classOrObject, $method): string|object
{
return Assert::method... | fim | webmozarts/assert | php |
<|fim_suffix|>allNullOrMinCount(mixed $array, $min)
{
return Assert::allNullOrMinCount($array, $min);
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Countable;
use Webmozart\Assert\Assert;
/**
* @param Countable|array $array
* @param int|float $min
*/
func... | fim | webmozarts/assert | php |
<|fim_suffix|>le<string> $value
* @param int|float $min
*/
function allMinLength(iterable $value, $min): iterable
{
return Assert::allMinLength($value, $min);
}
/**
* @psalm-pure
*
* @param iterable<string|null> $value
* @param int|float $min
*/
function allNullOrMinLength(iterable $value, $min): iterable
{... | fim | webmozarts/assert | php |
<|fim_suffix|>ullOrNatural($value);
}
/**
* @psalm-pure
*
* @return iterable<positive-int|0>
*/
function allNatural(mixed $value): iterable
{
return Assert::allNatural($value);
}
/**
* @psalm-pure
*
* @return iterable<positive-int|0|null>
*/
function allNullOrNatural(mixed $value): iterable
{
return A... | fim | webmozarts/assert | php |
<|fim_suffix|>
/**
* @psalm-pure
*
* @return iterable<negative-int>
*/
function allNegativeInteger(mixed $value): iterable
{
return Assert::allNegativeInteger($value);
}
/**
* @psalm-pure
*
* @return iterable<negative-int|null>
*/
function allNullOrNegativeInteger(mixed $value): iterable
{
return Asser... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
func<|fim_suffix|>e, $subString);
}
/**
* @psalm-pure
*
* @param iterable<string|null> $value
*/
function allNullOrNotContains(iterable $value, string $subString): i... | fim | webmozarts/assert | php |
<|fim_suffix|>tEmpty($value);
}
/**
* @psalm-pure
*
* @return true
*/
function notEmptyBool(bool $value)
{
return Assert::notEmpty($value);
}
/**
* @psalm-pure
*
* @return non-empty-array
*/
function notEmptyArray(array $value)
{
return Assert::notEmpty($value);
}
/**
* @psalm-pure
*/
function null... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function notEndsWith(string $value, string $suffix): string
{
return Assert::notEndsWith($value, $suffix);
}
/**
* @psalm-pure
*/
function nullOrNotEndsWith(?strin... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1)<|fim_suffix|>sis;
use Webmozart\Assert\Assert;
function notEq(mixed $value, mixed $expect): mixed
{
return Assert::notEq($value, $expect);
}
function nullOrNotEq(mixed $value, mixed $expect): mixed
{
return Assert::nullOrNotEq($value, $expect);
}
function allNotE... | fim | webmozarts/assert | php |
<|fim_suffix|>NullOrNotFalse(iterable $value): iterable
{
return Assert::allNullOrNotFalse($value);
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Asser<|fim_middle|>t\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @return true
*/
function notFalseBool(bool $val... | fim | webmozarts/assert | php |
<|fim_suffix|>ixed $value, array $values): mixed
{
return Assert::nullOrNotInArray($value, $values);
}
/**
* @psalm-pure
*/
function allNotInArray(mixed $value, array $values): mixed
{
return Assert::allNotInArray($value, $values);
}
<|fim_prefix|><?php
namespace Webmozart\Assert\Tests\StaticAnalysis;
use ... | fim | webmozarts/assert | php |
<|fim_suffix|>*/
function allNotInstanceOf(mixed $value, $class): mixed
{
return Assert::allNotInstanceOf($value, $class);
}
/**
* @psalm-template T of object
* @param class-string<T> $class
*/
function allNullOrNotInstanceOf(mixed $value, $class): mixed
{
return Assert::allNullOrNotInstanceOf($value, $clas... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @psalm-return non-negative-int
*/
function nonNegativeInteger(mixed $value): int
{
<|fim_suffix|> */
function allNullOrNonNegativeInteger(mixed $value): iterable
{... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
final class a extends Assert
{
}
/**
* @psalm<|fim_suffix|>otNull($value);
}
<|fim_middle|>-pure
*/
function notNull(?object $value): object
{
return Assert::notNull($value);
}
/**
* @... | fim | webmozarts/assert | php |
<|fim_suffix|>s): mixed
{
return Assert::allNotOneOf($value, $values);
}
<|fim_prefix|><?php
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function notOneOf(mixed $value, array $values): mixed
{
return Assert::notOneOf($value, $values);
}
/**
* @psalm-... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function notRegex(string $value, string $pattern): string
{
return Assert::notRegex($value, $pattern);
}
/**
* @psalm-pure
*/
function nullOrNotRegex(?string $value, string $pat... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
* @param mixed $expect
*/
function notSame(mixed $value, $expect): mixed
{
return Assert::notSame($value, $expect);
}
/**
* @psalm-pure
* @param mixed $expe<|fim_suf... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function notStartsWith(string $value, string $prefix): string
{
return Assert::notStartsWith($value, $prefix);
}
/**
* @psalm-pure
*/
function nullOrNotStartsWith(?string $value... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
namesp<|fim_suffix|>;
use Webmozart\Assert\Assert;
function notStatic(callable $closure): callable
{
return Assert::notStatic($closure);
}
<|fim_middle|>ace Webmozart\Assert\Tests\StaticAnalysis<|endoftext|> | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function notWhitespaceOnly(string $value): string
{
return Assert::notWhitespaceOnly($value);
}
/**
* @psalm-pu<|fim_suffix|>spaceOnly($value);
}
<|fim_middle|>re
... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert<|fim_suffix|>l($value);
}
/**
* @psalm-pure
*/
function allNull(mixed $value): iterable
{
return Assert::allNull($value);
}
<|fim_middle|>;
/**
* @psalm-pure
*/
function null(mixed $val... | fim | webmozarts/assert | php |
<|fim_suffix|>salm-pure
*
* @return null|numeric
*/
function nullOrNumeric(mixed $value)
{
return Assert::nullOrNumeric($value);
}
/**
* @psalm-pure
*/
function allNumeric(mixed $value): iterable
{
return Assert::allNumeric($value);
}
/**
* @psalm-pure
*/
function allNullOrNumeric(mixed $value): iterab... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozar<|fim_suffix|>): iterable
{
return Assert::allNullOrObject($value);
}
<|fim_middle|>t\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function object(mixed $value): object
{
return Assert::object($value);
}
/**
... | fim | webmozarts/assert | php |
<|fim_suffix|>(mixed $value): object|string|null
{
return Assert::nullOrObjectish($value);
}
/**
* @psalm-pure
*/
function allObjectish(mixed $value): iterable
{
return Assert::allObjectish($value);
}
/**
* @psalm-pure
*/
function allNullOrObjectish(mixed $value): iterable
{
return Assert::allNullOrOb... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function oneOf(mixed $value, array $values): mixed
{
return Assert::oneOf($value, $values);
}
/**
* @psalm-pure
*/
function nullOrOneOf(mixed $value, array $values): mixed
{
... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @psalm-return positive-int
*/
function positiveInteger(mixed $valu<|fim_suffix|>$value): int
{
return Assert::positiveInteger($value);
}
/**
* @psalm-pure
*
* ... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namesp<|fim_suffix|>
* @psalm-pure
*
* @param iterable<class-string|object> $classOrObject
* @param mixed $property
*/
function allPropertyExists(iterable $classOrObject, $property): iterable
{
return Assert::allPropertyExists($classOrObject, $property);
}
/**
*... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @param class-string|object $classOrObject
* @param mixed $property
*/
function propertyNotExists(mixed $classOrObject, $property): string|object
{
return Assert::propertyNotExi... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @see https://github.com/webmozart/assert/pull/160#issuecomment-564491986
* @see https://github.com/vimeo/psalm/commit/4b715cdbffea19a7eab6f72482027d2dd358aab2
* @see https://github... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @return numeric
*/
function returnedNumeric(mixed $value): int|float|string
{
return Assert::numeric($value);
}
/**
* @psalm-pure
*
* @return numeric
*/
funct... | fim | webmozarts/assert | php |
<|fim_suffix|>string>
*/
function preserveContainerAllArrayIterator(mixed $value)
{
return Assert::allString($value);
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use ArrayIterator;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @param mixed[] $va<|fim_... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAna<|fim_suffix|> Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @param non-empty-string $value
*
* @return non-empty-string
*/
function lowerPreservesTypes(string $value): string
{
return Assert::lower($value);
}
<|fim_mid... | fim | webmozarts/assert | php |
<|fim_suffix|>m mixed $max
*/
function allRange(mixed $value, $min, $max): mixed
{
return Assert::allRange($value, $min, $max);
}
/**
* @psalm-pure
* @param mixed $min
* @param mixed $max
*/
function allNullOrRange(mixed $value, $min, $max): mixed
{
return Assert::allNullOrRange($value, $min, $max);
}
<|f... | fim | webmozarts/assert | php |
<|fim_suffix|>value): iterable
{
return Assert::allReadable($value);
}
/**
* @param iterable<string|null> $value
*/
function allNullOrReadable(iterable $value): iterable
{
return Assert::allNullOrReadable($value);
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysi... | fim | webmozarts/assert | php |
<|fim_suffix|>$value, string $pattern): ?string
{
return Assert::nullOrRegex($value, $pattern);
}
/**
* @psalm-pure
*
* @param iterable<string> $value
*/
function allRegex(iterable $value, string $pattern): iterable
{
return Assert::allRegex($value, $pattern);
}
/**
* @psalm-pure
*
* @param iterable<st... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
* @param null|string $type
*/
function resource(mixed $value, ?string $type): mixed
{
return Assert::resource($value, $type);
}
/**
* @psalm-pure
* @param null|strin... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
* @param mixed $expect
*/
function same(mixed $value, $expect): mixed
{
return Assert::same($value, $expect);
}
/**
* @psalm-pure
* @param mixed $expect
*/
function... | fim | webmozarts/assert | php |
<|fim_suffix|>lOrScalar(mixed $value): iterable
{
return Assert::allNullOrScalar($value);
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function scalar(mixed $value): int|float|<|fim_middle|>string|bool
{
r... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function startsWit<|fim_suffix|>*/
function allNullOrStartsWith(iterable $value, string $prefix): iterable
{
return Assert::allNullOrStartsWith($value, $prefix);
}
<|... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function startsWithLetter(mixed $value, string $prefix): mixed
{
return Assert::startsWithLetter($value, $prefix);
}
/**
* @psalm-pure
*/
function nullOrStartsWithLetter(mixed $... | fim | webmozarts/assert | php |
<|fim_prefix|><?p<|fim_suffix|>espace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function string(mixed $value): string
{
return Assert::string($value);
}
/**
* @psalm-pure
*/
function nullOrString(mixed $value): ?string
{
return Assert::nullOrString($value);
... | fim | webmozarts/assert | php |
<|fim_suffix|>on allNullOrStringNotEmpty(mixed $value): iterable
{
return Assert::allNullOrStringNotEmpty($value);
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @return non-empty-string
*/
function stringNot... | fim | webmozarts/assert | php |
<|fim_suffix|>): iterable
{
return Assert::allNullOrSubclassOf($value, stdClass::class);
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use stdClass;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @return class-string<stdClass>|stdClass
*/
function subcla... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Closure;
use Throwable;
use Webmozart\Assert\Assert;
/**
* @param class-string<Throwable> $class
*/
function throws(Closure $value, $class): Closure
{
return Assert::throws($value, $class);
}
/**
* @param class... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @return true
*/
function true(mixed $value): bool
{
return Assert::true($value);
}
/**
* @psalm-pure
*
* @return null|true
*/
function nullOrTrue(mixed $value): ?bool
{
... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function unicodeLetters(mixed $value): mixed
{
return Assert::unicodeLetters($value);
}
/**
* @psalm-pure
*/
function nullOrUnicodeLetters(mixed $value): mixed
{
return Asse... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
function uniqueValues(mixed $values): array
{
return Assert::uniqueValues($values);
}
function nullOrUniqueValues(mixed $values): ?array
{
return Assert<|fim_suffix|> iterable
{
re... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function upper(mixed $value): string
{
return Assert::upper($value);
}
/**
* @psalm-pure
*/
function nullOrUpper(?string $value): ?string
{
return Assert::nullOrUpper($value... | fim | webmozarts/assert | php |
<|fim_suffix|>rUuid(iterable $value): iterable
{
return Assert::allNullOrUuid($value);
}
<|fim_prefix|><?php
declare(strict_types=<|fim_middle|>1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function uuid(string $value): string
{
return Assert::uuid(... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @return array-key
*/
function validArrayKey(mixed $value)
{
return Assert::validArrayKey($value);
}
/**
* @psalm-pure
*
* @return null|array-key
*/
function n... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
decl<|fim_suffix|>{
return Assert::allWritable($value);
}
/**
* @param iterable<string|null> $value
*/
function allNullOrWritable(iterable $value): iterable
{
return Assert::allNullOrWritable($value);
}
<|fim_middle|>are(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis;
... | fim | webmozarts/assert | php |
<|fim_suffix|>rable
{
Assert::allAlnum($value);
return $value;
}
/**
* @psalm-pure
*
* @param iterable<string|null> $value
*/
function allNullOrAlnum(iterable $value): iterable
{
Assert::allNullOrAlnum($value);
return $value;
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\As... | fim | webmozarts/assert | php |
<|fim_suffix|>rAlpha($value);
return $value;
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function alpha(mixed $value): mixed
{
Assert::alpha($value);
return $value;
}
/**
* @psalm-pure
... | fim | webmozarts/assert | php |
<|fim_suffix|>unction allNullOrBoolean(mixed $value): iterable
{
Assert::allNullOrBoolean($value);
return $value;
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function boolean(mixed $value): boo... | fim | webmozarts/assert | php |
<|fim_suffix|>:classExists($value);
return $value;
}
/**
* @return class-string|null
*/
function nullOrClassExists(mixed $value): ?string
{
Assert::nullOrClassExists($value);
return $value;
}
function allClassExists(mixed $value): iterable
{
Assert::allClassExists($value);
return $value;
}
f... | fim | webmozarts/assert | php |
<|fim_suffix|>e;
}
/**
* @psalm-pure
*
* @param iterable<string> $value
*/
function allContains(iterable $value, string $subString): iterable
{
Assert::allContains($value, $subString);
return $value;
}
/**
* @psalm-pure
*
* @param iterable<string|null> $value
*/
function allNullOrContains(iterable $v... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Countable;
use Webmozart\Assert\Assert;
/**
* @param Countable|array $value
*/
function count(Countable|array $value, int $number): Countable|array
{
Assert::count($value, $number);
return $value;
... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Countable;
use Webmozart\Assert\Assert;
/**
* @param Countable|array $value
* @param int|float $min
* @param int|float $max
*/
function countBetween(mixed $value, $min, $max): Countable|array
{
Assert... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function digit<|fim_suffix|>@psalm-pure
*/
function nullOrDigits(?string $value): ?string
{
Assert::nullOrDigits($value);
return $value;
}
/**
* @ps... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tes<|fim_suffix|> return $value;
}
function nullOrDirectory(mixed $value): mixed
{
Assert::nullOrDirectory($value);
return $value;
}
function allDirectory(mixed $value): mixed
{
Assert::allDirectory($value);
return $value;
... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
function email(string $value): string
{
Assert::email($value);
return $value;
}
function nullOrEmail(?string $value): ?string
{
Assert::nullOrEmail($value);
return $value;
}
/**... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function endsWith(string $value, string $suffix): string
{
Assert::endsWith($value, $suffix);
return $value;
}
/**
* @psalm-pure
*/
function nullOrEndsWith(?strin... | fim | webmozarts/assert | php |
<|fim_prefix|><<|fim_suffix|>ed $expect
*/
function nullOrEq(mixed $value, mixed $expect): mixed
{
Assert::nullOrEq($value, $expect);
return $value;
}
/**
* @param mixed $expect
*/
function allEq(mixed $value, mixed $expect): mixed
{
Assert::allEq($value, $expect);
return $value;
}
/**
* @param ... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
<|fim_suffix|>ixed $value): iterable
{
Assert::allFalse($value);
return $value;
}
<|fim_middle|> * @return false
*/
function false(mixed $value): bool
... | fim | webmozarts/assert | php |
<|fim_suffix|>llNullOrFile($value);
return $value;
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
function file(mi<|fim_middle|>xed $value): mixed
{
Assert::file($value);
return $value;
}
function nullOrFile(mixed... | fim | webmozarts/assert | php |
<|fim_suffix|>
return $value;
}
function allNullOrFileExists(mixed $value): mixed
{
Assert::allNullOrFileExists($value);
return $value;
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
function fileExists(mixed $valu... | fim | webmozarts/assert | php |
<|fim_suffix|>llOrFloat(mixed $value): iterable
{
Assert::allNullOrFloat($value);
return $value;
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*/
function float(mixed $value): float
{
Assert::fl... | fim | webmozarts/assert | php |
<?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
* @param mixed $limit
*/
function greaterThan(mixed $value, $limit): mixed
{
Assert::greaterThan($value, $limit);
return $value;
}
/**
* @psalm-pure
* @param mixed ... | fim | webmozarts/assert | php |
<|fim_suffix|> nullOrGreaterThanEq(mixed $value, mixed $limit): mixed
{
Assert::nullOrGreaterThanEq($value, $limit);
return $value;
}
/**
* @psalm-pure
* @param mixed $limit
*/
function allGreaterThanEq(mixed $value, mixed $limit): mixed
{
Assert::allGreaterThanEq($value, $limit);
return $value;
}... | fim | webmozarts/assert | php |
<|fim_suffix|> *
* @return Serializable|class-string<Serializable>|null
*/
function nullOrImplementsInterface(mixed $value)
{
Assert::nullOrImplementsInterface($value, Serializable::class);
return $value;
}
/**
* @psalm-pure
*/
function allImplementsInterface(mixed $value): iterable
{
Assert::allImple... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Te<|fim_suffix|>
*/
function inArray(mixed $value, array $values): mixed
{
Assert::inArray($value, $values);
return $value;
}
/**
* @psalm-pure
*/
function nullOrInArray(mixed $value, array $values): mixed
{
Assert::nullOrInArray... | fim | webmozarts/assert | php |
<|fim_suffix|>le
{
Assert::allInteger($value);
return $value;
}
/**
* @psalm-pure
*/
function allNullOrInteger(mixed $value): iterable
{
Assert::allNullOrInteger($value);
return $value;
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use ... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
/**
* @psalm-pure
*
* @return numeric
*/
fun<|fim_suffix|>e
{
Assert::allIntegerish($value);
return $value;
}
/**
* @psalm-pure
*/
function allNullOrIntegerish(mixed $... | fim | webmozarts/assert | php |
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
/**
* @return class-string
*/
function interfaceExists(mixed $value): string
{
Assert::interfaceExists($value);
<|fim_suffix|>
Assert::nullOrInterfaceExists($value);
... | fim | webmozarts/assert | php |
<|fim_suffix|> return $value;
}
/**
* @param iterable<string|null> $value
*/
function allNullOrIp(iterable $value): iterable
{
Assert::allNullOrIp($value);
return $value;
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Asse... | fim | webmozarts/assert | php |
<|fim_suffix|>Ipv4($value);
return $value;
}
<|fim_prefix|><?php
declare(strict_types=1);
namespace Webmozart\Assert\Tests\StaticAnalysis\NonReturn;
use Webmozart\Assert\Assert;
function ipv4(string $value): string
{
Assert::ipv4($value);
return $value;
}
function nullOrIpv4(?string $value): ?string
... | fim | webmozarts/assert | php |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.