Lines Matching refs:SimpleType

171 class ArrayType extends SimpleType {
198 public function equals(SimpleType $other): bool {
210 class SimpleType { class
214 public static function fromNode(Node $node): SimpleType {
218 return new SimpleType($node->toLowerString(), true);
223 return new SimpleType($node->toLowerString(), true);
231 return new SimpleType($node->toString(), false);
239 return new SimpleType($node->toLowerString(), true);
245 public static function fromString(string $typeString): SimpleType
263 return new SimpleType(strtolower($typeString), true);
288 return new SimpleType($typeString, false);
294 public static function fromValue($value): SimpleType
298 return SimpleType::null();
300 return SimpleType::bool();
302 return SimpleType::int();
304 return SimpleType::float();
306 return SimpleType::string();
308 return SimpleType::array();
310 return SimpleType::object();
316 public static function null(): SimpleType
318 return new SimpleType("null", true);
321 public static function bool(): SimpleType
323 return new SimpleType("bool", true);
326 public static function int(): SimpleType
328 return new SimpleType("int", true);
331 public static function float(): SimpleType
333 return new SimpleType("float", true);
336 public static function string(): SimpleType
338 return new SimpleType("string", true);
341 public static function array(): SimpleType
343 return new SimpleType("array", true);
346 public static function object(): SimpleType
348 return new SimpleType("object", true);
351 public static function void(): SimpleType
353 return new SimpleType("void", true);
542 public function equals(SimpleType $other): bool {
548 /** @var SimpleType[] */
566 SimpleType::null(),
575 SimpleType::fromString("Traversable"),
582 return new Type([SimpleType::fromNode($node)], false);
614 $simpleTypes[] = SimpleType::fromString($simpleTypeName);
624 * @param SimpleType[] $types
655 function(SimpleType $type) {
663 public function tryToSimpleType(): ?SimpleType {
775 /** @var SimpleType[] $classTypes */
777 /** @var SimpleType[] $builtinTypes */
781 * @param SimpleType[] $classTypes
782 * @param SimpleType[] $builtinTypes
794 return implode('|', array_map(function(SimpleType $type) {
803 return implode('|', array_map(function(SimpleType $type) {
1580 public SimpleType $type;
1588 …public static function createFromExpression(Expr $expr, ?SimpleType $constType, ?string $cConstNam…
1635 $constType ?: SimpleType::fromValue($result),
1644 return new self(null, SimpleType::null(), null, null, false);
1650 …private function __construct($value, SimpleType $type, ?string $cConstName, ?ConstInfo $originatin…
2381 public ?SimpleType $enumBackingType;
2417 ?SimpleType $enumBackingType,
3565 ? SimpleType::fromNode($class->scalarType) : null,