1 | <?php |
||
21 | class JoinKeyword extends Component |
||
22 | { |
||
23 | /** |
||
24 | * Types of join. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | public static $JOINS = array( |
||
29 | 'CROSS JOIN' => 'CROSS', |
||
30 | 'FULL JOIN' => 'FULL', |
||
31 | 'FULL OUTER JOIN' => 'FULL', |
||
32 | 'INNER JOIN' => 'INNER', |
||
33 | 'JOIN' => 'JOIN', |
||
34 | 'LEFT JOIN' => 'LEFT', |
||
35 | 'LEFT OUTER JOIN' => 'LEFT', |
||
36 | 'RIGHT JOIN' => 'RIGHT', |
||
37 | 'RIGHT OUTER JOIN' => 'RIGHT', |
||
38 | 'NATURAL JOIN' => 'NATURAL', |
||
39 | 'NATURAL LEFT JOIN' => 'NATURAL LEFT', |
||
40 | 'NATURAL RIGHT JOIN' => 'NATURAL RIGHT', |
||
41 | 'NATURAL LEFT OUTER JOIN' => 'NATURAL LEFT OUTER', |
||
42 | 'NATURAL RIGHT OUTER JOIN' => 'NATURAL RIGHT OUTER', |
||
43 | 'STRAIGHT_JOIN' => 'STRAIGHT', |
||
44 | ); |
||
45 | |||
46 | /** |
||
47 | * Type of this join. |
||
48 | * |
||
49 | * @see static::$JOINS |
||
50 | * |
||
51 | * @var string |
||
52 | */ |
||
53 | public $type; |
||
54 | |||
55 | /** |
||
56 | * Join expression. |
||
57 | * |
||
58 | * @var Expression |
||
59 | */ |
||
60 | public $expr; |
||
61 | |||
62 | /** |
||
63 | * Join conditions. |
||
64 | * |
||
65 | * @var Condition[] |
||
66 | */ |
||
67 | public $on; |
||
68 | |||
69 | /** |
||
70 | * Columns in Using clause. |
||
71 | * |
||
72 | * @var ArrayObj |
||
73 | */ |
||
74 | public $using; |
||
75 | |||
76 | /** |
||
77 | * Constructor. |
||
78 | * |
||
79 | * @param string $type Join type |
||
|
|||
80 | * @param Expression $expr Join expression. |
||
81 | * @param Condition[] $on Join conditions. |
||
82 | * @param ArrayObj $using Columns joined. |
||
83 | * |
||
84 | * @see JoinKeyword::$JOINS |
||
85 | */ |
||
86 | 22 | public function __construct($type = null, $expr = null, $on = null, $using = null) |
|
93 | |||
94 | /** |
||
95 | * @param Parser $parser the parser that serves as context |
||
96 | * @param TokensList $list the list of tokens that are being parsed |
||
97 | * @param array $options parameters for parsing |
||
98 | * |
||
99 | * @return JoinKeyword[] |
||
100 | */ |
||
101 | 22 | public static function parse(Parser $parser, TokensList $list, array $options = array()) |
|
205 | |||
206 | /** |
||
207 | * @param JoinKeyword[] $component the component to be built |
||
208 | * @param array $options parameters for building |
||
209 | * |
||
210 | * @return string |
||
211 | */ |
||
212 | 4 | public static function build($component, array $options = array()) |
|
225 | } |
||
226 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.