/home/techb158/ileadtechnology.com/vendor/sebastian/type/src
NameSizeModeActions
exception/-0755rm
CallableType.php45060644editdlrm
GenericObjectType.php9860644editdlrm
IterableType.php16170644editdlrm
NullType.php6030644editdlrm
ObjectType.php15090644editdlrm
SimpleType.php17460644editdlrm
Type.php20430644editdlrm
TypeName.php18160644editdlrm
UnknownType.php5810644editdlrm
VoidType.php6030644editdlrm
Edit: /home/techb158/ileadtechnology.com/vendor/sebastian/type/src/IterableType.php (1617B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\Type; final class IterableType extends Type { /** * @var bool */ private $allowsNull; public function __construct(bool $nullable) { $this->allowsNull = $nullable; } /** * @throws RuntimeException */ public function isAssignable(Type $other): bool { if ($this->allowsNull && $other instanceof NullType) { return true; } if ($other instanceof self) { return true; } if ($other instanceof SimpleType) { return \is_iterable($other->value()); } if ($other instanceof ObjectType) { try { return (new \ReflectionClass($other->className()->getQualifiedName()))->isIterable(); // @codeCoverageIgnoreStart } catch (\ReflectionException $e) { throw new RuntimeException( $e->getMessage(), (int) $e->getCode(), $e ); // @codeCoverageIgnoreEnd } } return false; } public function getReturnTypeDeclaration(): string { return ': ' . ($this->allowsNull ? '?' : '') . 'iterable'; } public function allowsNull(): bool { return $this->allowsNull; } }