| 1 | <?php |
||
| 21 | trait TableComponentTrait |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var AbstractTable[] $tables |
||
| 25 | */ |
||
| 26 | private $rootTables = []; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return TableFactoryInterface |
||
| 30 | */ |
||
| 31 | abstract protected function getTableFactory(); |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return BuilderInterface |
||
| 35 | */ |
||
| 36 | abstract public function getQueryBuilder(); |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param mixed $table |
||
| 40 | * @param string $alias |
||
|
|
|||
| 41 | * |
||
| 42 | * @return AbstractTable |
||
| 43 | */ |
||
| 44 | 4 | protected function addRootTable($table, $alias = null) |
|
| 45 | { |
||
| 46 | 4 | $this->rootTables[] = $table = $this->getTableFactory()->createNewTable($table, $this->getQueryBuilder()); |
|
| 47 | |||
| 48 | 4 | if ($alias) { |
|
| 49 | $table->setAlias($alias); |
||
| 50 | } |
||
| 51 | |||
| 52 | 4 | return $table; |
|
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return AbstractTable[] |
||
| 57 | */ |
||
| 58 | 4 | public function getRootTables() |
|
| 62 | } |
This check looks for
@paramannotations 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.