1 | <?php |
||
24 | trait JoinsTrait |
||
25 | { |
||
26 | /** |
||
27 | * Check relation type and join |
||
28 | * |
||
29 | * @param Relation $relation |
||
30 | * @param JoinClause $join |
||
31 | * @param \stdClass $table |
||
32 | * @param string $operator |
||
33 | * @param string $direction |
||
|
|||
34 | * @return Builder|JoinClause |
||
35 | */ |
||
36 | protected function relationJoinType($relation, $join, $table, $operator, $direction = null) |
||
45 | |||
46 | /** |
||
47 | * Join a HasOne relation which is ordered |
||
48 | * |
||
49 | * @param Relation $relation |
||
50 | * @param JoinClause $join |
||
51 | * @return JoinClause |
||
52 | */ |
||
53 | protected function hasOneJoin($relation, $join) |
||
60 | |||
61 | /** |
||
62 | * Get join sql for a HasOne relation |
||
63 | * |
||
64 | * @param Relation $relation |
||
65 | * @param array $order |
||
66 | * @return Expression |
||
67 | */ |
||
68 | protected function hasOneJoinSql($relation, $order) |
||
82 | |||
83 | /** |
||
84 | * Join a HasMany Relation |
||
85 | * |
||
86 | * @param Relation $relation |
||
87 | * @param JoinClause $join |
||
88 | * @param \stdClass $table |
||
89 | * @param string $operator |
||
90 | * @param string $direction |
||
91 | * @return Builder|JoinClause |
||
92 | */ |
||
93 | protected function hasManyJoin($relation, $join, $table, $operator, $direction) |
||
110 | |||
111 | /** |
||
112 | * Get the join columns for a relation |
||
113 | * |
||
114 | * @param Relation|BelongsTo|HasOneOrMany $relation |
||
115 | * @return \stdClass |
||
116 | */ |
||
117 | protected function getJoinColumns($relation) |
||
130 | |||
131 | /** |
||
132 | * Replace column table names with aliases |
||
133 | * |
||
134 | * @param \stdClass $joinColumns |
||
135 | * @param \stdClass $table |
||
136 | * @return \stdClass |
||
137 | */ |
||
138 | protected function replaceColumnTables($joinColumns, $table) |
||
147 | } |
||
148 |
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.