Skip to content

Commit

Permalink
fix cs again
Browse files Browse the repository at this point in the history
  • Loading branch information
ol0lll committed Aug 28, 2024
1 parent 5d0d3b0 commit 86f6e37
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions BackendCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public function createTestingDump()
// Prepare settings file.
$defaultSettingsFile = $this->drupalRootDirectory().'/sites/default/settings.php';
if (file_exists($defaultSettingsFile)) {
$tmpName = tempnam( $this->drupalRootDirectory().'/sites/default/', 'settings.tmp');
$tmpName = tempnam($this->drupalRootDirectory().'/sites/default/', 'settings.tmp');
rename($defaultSettingsFile, $tmpName);
}
$this->prepareSettingsFile($defaultSettingsFile, $dbSpec);
Expand Down Expand Up @@ -493,9 +493,11 @@ private function filesAreEqual($firstFile, $secondFile): bool
*
* @param $defaultSettingsFile
* @param $dbSpec
*
* @return void
*/
private function prepareSettingsFile($defaultSettingsFile, $dbSpec) {
private function prepareSettingsFile($defaultSettingsFile, $dbSpec)
{

$fileString = <<<EOF
<?php
Expand All @@ -512,6 +514,5 @@ private function prepareSettingsFile($defaultSettingsFile, $dbSpec) {
EOF;
$fileString = str_replace(['{{ database }}', '{{ username }}', '{{ password }}', '{{ host }}', '{{ port }}', '{{ driver }}'], [$dbSpec['database'], $dbSpec['username'], $dbSpec['password'], $dbSpec['host'], $dbSpec['port'], $dbSpec['driver']], $fileString);
file_put_contents($defaultSettingsFile, $fileString, FILE_APPEND);

}
}

0 comments on commit 86f6e37

Please sign in to comment.