| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\Type; |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | final class TypeKind |
| 14: | { |
| 15: | |
| 16: | public const NULL = 1; |
| 17: | public const FALSE = 2; |
| 18: | public const TRUE = 4; |
| 19: | public const INT = 8; |
| 20: | public const FLOAT = 16; |
| 21: | public const STRING = 32; |
| 22: | public const ARRAY = 64; |
| 23: | public const OBJECT = 128; |
| 24: | public const RESOURCE = 256; |
| 25: | |
| 26: | public const BOOL = self::FALSE | self::TRUE; |
| 27: | public const ALL = self::NULL | self::BOOL | self::INT | self::FLOAT | self::STRING | self::ARRAY | self::OBJECT | self::RESOURCE; |
| 28: | |
| 29: | |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | public static function areDisjoint(int $a, int $b): bool |
| 35: | { |
| 36: | return ($a & $b) === 0 && $a !== 0 && $b !== 0; |
| 37: | } |
| 38: | |
| 39: | } |
| 40: | |