* Exception thrown when TDBM cannot find a straight path between supposedly inherited tables.
7
*/
8
class TDBMInheritanceException extends TDBMException
9
{
10
public static function create(array $tables) : TDBMInheritanceException
11
{
12
return new self(sprintf('The tables (%s) cannot be linked by an inheritance relationship. Does your data set contains multiple children for one parent row? (multiple inheritance is not supported by TDBM)', implode(', ', $tables)));
13
}
14
15
public static function extendException(TDBMInheritanceException $e, TDBMService $tdbmService, array $beanData)
The expression $primaryKeyColumns of type string|array is not guaranteed to be traversable. How about adding an additional type check?
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
$collection=json_decode($data,true);if(!is_array($collection)){thrownew\RuntimeException('$collection must be an array.');}foreach($collectionas$item){/** ... */}
If you are sure that the expression is traversable, you might want to add a
doc comment cast to improve IDE auto-completion and static analysis:
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.