protected function isConnectionForAllTablesTheSame(string ...$tableNames) : bool
    {
        /** @var ConnectionPool $connectionPool */
        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
        $connection = $connectionPool->getConnectionForTable(array_shift($tableNames));
        foreach ($tableNames as $tableName) {
            $connectionForTable = $connectionPool->getConnectionForTable($tableName);
            if ($connection !== $connectionForTable) {
                return false;
            }
        }
        return true;
    }
protected function isConnectionForAllTablesTheSame(string ...$tableNames) : bool
    {
        /** @var ConnectionPool $connectionPool */
        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
        $connection = $connectionPool->getConnectionForTable(array_shift($tableNames));
        foreach ($tableNames as $tableName) {
            $connectionForTable = $connectionPool->getConnectionForTable($tableName);
            if ($connection !== $connectionForTable) {
                return false;
            }
        }
        return true;
    }
protected function isConnectionForAllTablesTheSame ( string ... $ tableNames ) : bool { /** @var ConnectionPool $connectionPool */ $ connectionPool = GeneralUtility :: makeInstance ( ConnectionPool :: class ) ; $ connection = $ connectionPool -> getConnectionForTable ( array_shift ( $ tableNames ) ) ; foreach ( $ tableNames as $ tableName ) { $ connectionForTable = $ connectionPool -> getConnectionForTable ( $ tableName ) ; if ( $ connection !== $ connectionForTable ) { return false ; } } return true ; }
Checks whether all table involved in transaction using same connection.

@param string[] ...$tableNames
@return bool
Checks whether all table involved in transaction using same connection .