Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
JoinType | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
parse | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 |
1 | <?php declare(strict_types=1); |
2 | /** |
3 | * Query |
4 | * |
5 | * SQL Query Builder / Database Abstraction Layer |
6 | * |
7 | * PHP version 8.1 |
8 | * |
9 | * @package Query |
10 | * @author Timothy J. Warren <tim@timshome.page> |
11 | * @copyright 2012 - 2023 Timothy J. Warren |
12 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
13 | * @link https://git.timshomepage.net/aviat/Query |
14 | * @version 4.0.0 |
15 | */ |
16 | |
17 | namespace Query; |
18 | |
19 | /** |
20 | * Enum of join types |
21 | */ |
22 | enum JoinType: string |
23 | { |
24 | public static function parse(string|self $val): self |
25 | { |
26 | if ($val instanceof self) |
27 | { |
28 | return $val; |
29 | } |
30 | |
31 | return self::from($val); |
32 | } |
33 | |
34 | case CROSS = 'cross'; |
35 | |
36 | case INNER = 'inner'; |
37 | |
38 | case OUTER = 'outer'; |
39 | |
40 | case LEFT = 'left'; |
41 | |
42 | case RIGHT = 'right'; |
43 | } |