/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/ORM
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/ORM/AssociationsNormalizerTrait.php (2357B)
$options) {
$pointer = &$result;
if (is_int($table)) {
$table = $options;
$options = [];
}
if (!strpos($table, '.')) {
$result[$table] = $options;
continue;
}
$path = explode('.', $table);
$table = array_pop($path);
/** @var string $first */
$first = array_shift($path);
$pointer += [$first => []];
$pointer = &$pointer[$first];
$pointer += ['associated' => []];
foreach ($path as $t) {
$pointer += ['associated' => []];
$pointer['associated'] += [$t => []];
$pointer['associated'][$t] += ['associated' => []];
$pointer = &$pointer['associated'][$t];
}
$pointer['associated'] += [$table => []];
$pointer['associated'][$table] = $options + $pointer['associated'][$table];
}
return $result['associated'] ?? $result;
}
}