Skip to content

Commit cb72c56

Browse files
committed
cs
1 parent 61a21b7 commit cb72c56

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/Configurator/DockerComposeConfigurator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private function normalizeConfig(array $config): array
156156
}
157157

158158
// If the recipe still use the legacy "docker-compose.yml" names, remove the "docker-" prefix and change the extension
159-
$newKey = pathinfo(substr($key, 7), PATHINFO_FILENAME).'.yaml';
159+
$newKey = pathinfo(substr($key, 7), \PATHINFO_FILENAME).'.yaml';
160160
$config[$newKey] = $val;
161161
unset($config[$key]);
162162
}
@@ -170,12 +170,12 @@ private function normalizeConfig(array $config): array
170170
private function findDockerComposeFile(string $rootDir, string $file): ?string
171171
{
172172
if (isset($_SERVER['COMPOSE_FILE'])) {
173-
$filenameToFind = pathinfo($file, PATHINFO_FILENAME);
173+
$filenameToFind = pathinfo($file, \PATHINFO_FILENAME);
174174
$separator = $_SERVER['COMPOSE_PATH_SEPARATOR'] ?? ('\\' === \DIRECTORY_SEPARATOR ? ';' : ':');
175175

176176
$files = explode($separator, $_SERVER['COMPOSE_FILE']);
177177
foreach ($files as $f) {
178-
$filename = pathinfo($f, PATHINFO_FILENAME);
178+
$filename = pathinfo($f, \PATHINFO_FILENAME);
179179
if ($filename !== $filenameToFind && "docker-$filenameToFind" !== $filename) {
180180
continue;
181181
}

tests/Configurator/DockerComposeConfiguratorTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public function testConfigure(string $fileName)
220220
###< doctrine/doctrine-bundle ###
221221

222222
YAML
223-
);
223+
);
224224

225225
$this->configurator->unconfigure($this->recipeDb, self::CONFIG_DB, $this->lock);
226226
$this->assertEquals(self::ORIGINAL_CONTENT, file_get_contents($dockerComposeFile));
@@ -331,7 +331,7 @@ public function testConfigureFileWithExistingVolumes()
331331
###< doctrine/doctrine-bundle ###
332332

333333
YAML
334-
);
334+
);
335335

336336
$this->configurator->unconfigure($this->recipeDb, self::CONFIG_DB, $this->lock);
337337
// Not the same original, we have an extra breaks line
@@ -426,7 +426,7 @@ public function testConfigureFileWithExistingMarks()
426426
###< doctrine/doctrine-bundle ###
427427

428428
YAML
429-
);
429+
);
430430

431431
$this->configurator->unconfigure($recipe, $config, $this->lock);
432432
$this->assertEquals($originalContent, file_get_contents($dockerComposeFile));
@@ -541,7 +541,7 @@ public function testConfigureMultipleFiles()
541541
###< doctrine/doctrine-bundle ###
542542

543543
YAML
544-
);
544+
);
545545
}
546546

547547
$this->configurator->unconfigure($this->recipeDb, self::CONFIG_DB_MULTIPLE_FILES, $this->lock);
@@ -586,7 +586,7 @@ public function testConfigureEnvVar()
586586
###< doctrine/doctrine-bundle ###
587587

588588
YAML
589-
);
589+
);
590590
}
591591

592592
$this->configurator->unconfigure($this->recipeDb, self::CONFIG_DB_MULTIPLE_FILES, $this->lock);
@@ -668,7 +668,7 @@ public function testConfigureWithoutExistingDockerComposeFiles()
668668
###< doctrine/doctrine-bundle ###
669669

670670
YAML
671-
);
671+
);
672672

673673
$this->configurator->unconfigure($this->recipeDb, self::CONFIG_DB, $this->lock);
674674
$this->assertEquals(trim($defaultContent), file_get_contents($dockerComposeFile));

0 commit comments

Comments
 (0)