Skip to content

Commit 2ad401f

Browse files
committed
Fix phpcs issue
1 parent b6c7df5 commit 2ad401f

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/Attribute/TranslatedTableMulti.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @author David Maack <david.maack@arcor.de>
2020
* @author Stefan Heimes <stefan_heimes@hotmail.com>
2121
* @author Ingolf Steinhardt <info@e-spin.de>
22+
* @author Sven Baumann <baumann.sv@gmail.com>
2223
* @copyright 2012-2022 The MetaModels team.
2324
* @license https://github.com/MetaModels/attribute_translatedtablemulti/blob/master/LICENSE LGPL-3.0-or-later
2425
* @filesource
@@ -319,8 +320,8 @@ public function setTranslatedDataFor($arrValues, $strLangCode)
319320
->setParameter($name, $value);
320321
}
321322

322-
$updateSql = $queryBuilder->getSQL();
323-
$sql .= ' ON DUPLICATE KEY ' . str_replace($this->getValueTable() . ' SET ', '', $updateSql);
323+
$updateSql = $queryBuilder->getSQL();
324+
$sql .= ' ON DUPLICATE KEY ' . str_replace($this->getValueTable() . ' SET ', '', $updateSql);
324325

325326
$this->connection->executeQuery($sql, $parameters);
326327
}

src/Migration/ChangeTranslatedTableNameMigration.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* @package MetaModels/attribute_translatedtablemulti
1414
* @author Stefan Heimes <stefan_heimes@hotmail.com>
1515
* @author Ingolf Steinhardt <info@e-spin.de>
16+
* @author Sven Baumann <baumann.sv@gmail.com>
1617
* @copyright 2012-2022 The MetaModels team.
1718
* @license https://github.com/MetaModels/attribute_translatedtablemulti/blob/master/LICENSE LGPL-3.0-or-later
1819
* @filesource
@@ -25,6 +26,7 @@
2526
use Contao\CoreBundle\Migration\AbstractMigration;
2627
use Contao\CoreBundle\Migration\MigrationResult;
2728
use Doctrine\DBAL\Connection;
29+
use RuntimeException;
2830

2931
/**
3032
* Change the database table name from "tl_metamodel_translatedmulti" to "tl_metamodel_translatedtablemulti".
@@ -63,6 +65,8 @@ public function getName(): string
6365
* - the MM tables tl_metamodel_translatedmulti exist.
6466
*
6567
* @return bool
68+
*
69+
* @throws RuntimeException If the old table not migrated.
6670
*/
6771
public function shouldRun(): bool
6872
{
@@ -73,7 +77,7 @@ public function shouldRun(): bool
7377
$error .= ' Reason: There are both tables available.';
7478
$error .= ' Old table: tl_metamodel_translatedmulti | New table: attribute_translatedtablemulti.';
7579
$error .= ' Please migrate the tables manually or delete one table.';
76-
throw new \RuntimeException($error);
80+
throw new RuntimeException($error);
7781
}
7882

7983
if ($schemaManager->tablesExist(['tl_metamodel_translatedmulti'])) {

0 commit comments

Comments
 (0)