Lines Matching refs:SimpleType
185 class ArrayType extends SimpleType {
212 public function equals(SimpleType $other): bool {
224 class SimpleType { class
228 public static function fromNode(Node $node): SimpleType {
232 return new SimpleType($node->toLowerString(), true);
240 return new SimpleType($node->toString(), false);
248 return new SimpleType($node->toLowerString(), true);
254 public static function fromString(string $typeString): SimpleType
272 return new SimpleType(strtolower($typeString), true);
297 return new SimpleType($typeString, false);
303 public static function fromValue($value): SimpleType
307 return SimpleType::null();
309 return SimpleType::bool();
311 return SimpleType::int();
313 return SimpleType::float();
315 return SimpleType::string();
317 return SimpleType::array();
319 return SimpleType::object();
325 public static function null(): SimpleType
327 return new SimpleType("null", true);
330 public static function bool(): SimpleType
332 return new SimpleType("bool", true);
335 public static function int(): SimpleType
337 return new SimpleType("int", true);
340 public static function float(): SimpleType
342 return new SimpleType("float", true);
345 public static function string(): SimpleType
347 return new SimpleType("string", true);
350 public static function array(): SimpleType
352 return new SimpleType("array", true);
355 public static function object(): SimpleType
357 return new SimpleType("object", true);
360 public static function void(): SimpleType
362 return new SimpleType("void", true);
555 public function equals(SimpleType $other): bool {
561 /** @var SimpleType[] */
579 SimpleType::null(),
588 SimpleType::fromString("Traversable"),
595 return new Type([SimpleType::fromNode($node)], false);
627 $simpleTypes[] = SimpleType::fromString($simpleTypeName);
637 * @param SimpleType[] $types
669 function(SimpleType $type) {
678 public function tryToSimpleType(): ?SimpleType {
786 /** @var SimpleType[] $classTypes */
788 /** @var SimpleType[] $builtinTypes */
792 * @param SimpleType[] $classTypes
793 * @param SimpleType[] $builtinTypes
805 return implode('|', array_map(function(SimpleType $type) {
814 return implode('|', array_map(function(SimpleType $type) {
2174 public SimpleType $type;
2183 …public static function createFromExpression(Expr $expr, ?SimpleType $constType, ?string $cConstNam…
2274 $constType ?? SimpleType::fromValue($result),
2283 … return new self(null, SimpleType::null(), new Expr\ConstFetch(new Node\Name('null')), [], false);
2290 …private function __construct($value, SimpleType $type, Expr $expr, array $originatingConsts, bool …
3319 public ?SimpleType $enumBackingType;
3356 ?SimpleType $enumBackingType,
4743 ? SimpleType::fromNode($class->scalarType) : null,