Class PHPStan\Type\StringRefinement

final

Bits of Type::getStringRefinement(): the strings split into cells that the string accessory types never split further. Every refinement of string - a conjunction of accessories - holds whole cells, so the union of two refinements is a refinement exactly when some conjunction holds the cells of both, and a constant string fills a cell only when it is the cell's sole value (the empty string and '0').

Whether a string is a literal-string is not decided by its value, so every cell of values comes twice: the low bits are the literal strings, the same bits shifted by NON_LITERAL_SHIFT the others. The constants below name the cells of values; of() makes the cells of both halves from them.

Methods