Lines Matching refs:SimpleType
103 class SimpleType { class
114 public static function fromNode(Node $node): SimpleType {
118 return new SimpleType($node->toString(), true);
126 return new SimpleType($node->toString(), false);
129 return new SimpleType($node->toString(), true);
134 public static function fromPhpDoc(string $type): SimpleType
150 return new SimpleType(strtolower($type), true);
156 return new SimpleType("array", true);
159 return new SimpleType($type, false);
162 public static function null(): SimpleType
164 return new SimpleType("null", true);
167 public static function void(): SimpleType
169 return new SimpleType("void", true);
240 public function equals(SimpleType $other) {
247 /** @var SimpleType[] $types */
260 SimpleType::fromNode($node->type),
261 SimpleType::null(),
264 return new Type([SimpleType::fromNode($node)]);
272 $simpleTypes[] = SimpleType::fromPhpDoc($type);
288 return new Type(array_filter($this->types, function(SimpleType $type) {
293 public function tryToSimpleType(): ?SimpleType {
348 /** @var SimpleType[] $builtinTypes */
361 return implode('|', array_map(function(SimpleType $type) {
370 return implode('|', array_map(function(SimpleType $type) {