Skip to content

Commit 7ca309f

Browse files
committed
Merge remote-tracking branch 'origin/feature/gha-windows' into feature/gha-windows
2 parents b646ac8 + f138129 commit 7ca309f

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/Definition/ArrayDefinition.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function replaceNestedDefinitions(callable $replacer) : void
4242

4343
public function __toString() : string
4444
{
45-
$str = '[' . \PHP_EOL;
45+
$str = '[' . "\n";
4646

4747
foreach ($this->values as $key => $value) {
4848
if (is_string($key)) {
@@ -52,12 +52,12 @@ public function __toString() : string
5252
$str .= ' ' . $key . ' => ';
5353

5454
if ($value instanceof Definition) {
55-
$str .= str_replace(\PHP_EOL, \PHP_EOL . ' ', (string) $value);
55+
$str .= str_replace("\n", "\n" . ' ', (string) $value);
5656
} else {
5757
$str .= var_export($value, true);
5858
}
5959

60-
$str .= ',' . \PHP_EOL;
60+
$str .= ',' . "\n";
6161
}
6262

6363
return $str . ']';

src/Definition/Dumper/ObjectDefinitionDumper.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function dump(ObjectDefinition $definition) : string
3535
$str = sprintf(' class = %s%s', $warning, $className);
3636

3737
// Lazy
38-
$str .= \PHP_EOL . ' lazy = ' . var_export($definition->isLazy(), true);
38+
$str .= "\n" . ' lazy = ' . var_export($definition->isLazy(), true);
3939

4040
if ($classExist) {
4141
// Constructor
@@ -48,7 +48,7 @@ public function dump(ObjectDefinition $definition) : string
4848
$str .= $this->dumpMethods($className, $definition);
4949
}
5050

51-
return sprintf('Object (' . \PHP_EOL . '%s' . \PHP_EOL . ')', $str);
51+
return sprintf('Object (' . "\n" . '%s' . "\n" . ')', $str);
5252
}
5353

5454
/**
@@ -63,7 +63,7 @@ private function dumpConstructor(string $className, ObjectDefinition $definition
6363
if ($constructorInjection !== null) {
6464
$parameters = $this->dumpMethodParameters($className, $constructorInjection);
6565

66-
$str .= sprintf(\PHP_EOL . ' __construct(' . \PHP_EOL . ' %s' . \PHP_EOL . ' )', $parameters);
66+
$str .= sprintf("\n" . ' __construct(' . "\n" . ' %s' . "\n" . ' )', $parameters);
6767
}
6868

6969
return $str;
@@ -77,7 +77,7 @@ private function dumpProperties(ObjectDefinition $definition) : string
7777
$value = $propertyInjection->getValue();
7878
$valueStr = $value instanceof Definition ? (string) $value : var_export($value, true);
7979

80-
$str .= sprintf(\PHP_EOL . ' $%s = %s', $propertyInjection->getPropertyName(), $valueStr);
80+
$str .= sprintf("\n" . ' $%s = %s', $propertyInjection->getPropertyName(), $valueStr);
8181
}
8282

8383
return $str;
@@ -93,7 +93,7 @@ private function dumpMethods(string $className, ObjectDefinition $definition) :
9393
foreach ($definition->getMethodInjections() as $methodInjection) {
9494
$parameters = $this->dumpMethodParameters($className, $methodInjection);
9595

96-
$str .= sprintf(\PHP_EOL . ' %s(' . \PHP_EOL . ' %s' . \PHP_EOL . ' )', $methodInjection->getMethodName(), $parameters);
96+
$str .= sprintf("\n" . ' %s(' . "\n" . ' %s' . "\n" . ' )', $methodInjection->getMethodName(), $parameters);
9797
}
9898

9999
return $str;
@@ -139,6 +139,6 @@ private function dumpMethodParameters(string $className, MethodInjection $method
139139
$args[] = sprintf('$%s = #UNDEFINED#', $parameter->getName());
140140
}
141141

142-
return implode(\PHP_EOL . ' ', $args);
142+
return implode("\n" . ' ', $args);
143143
}
144144
}

src/Definition/EnvironmentVariableDefinition.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,20 @@ public function replaceNestedDefinitions(callable $replacer) : void
6868

6969
public function __toString() : string
7070
{
71-
$str = ' variable = ' . $this->variableName . \PHP_EOL
71+
$str = ' variable = ' . $this->variableName . "\n"
7272
. ' optional = ' . ($this->isOptional ? 'yes' : 'no');
7373

7474
if ($this->isOptional) {
7575
if ($this->defaultValue instanceof Definition) {
7676
$nestedDefinition = (string) $this->defaultValue;
77-
$defaultValueStr = str_replace(\PHP_EOL, \PHP_EOL . ' ', $nestedDefinition);
77+
$defaultValueStr = str_replace("\n", "\n" . ' ', $nestedDefinition);
7878
} else {
7979
$defaultValueStr = var_export($this->defaultValue, true);
8080
}
8181

82-
$str .= \PHP_EOL . ' default = ' . $defaultValueStr;
82+
$str .= "\n" . ' default = ' . $defaultValueStr;
8383
}
8484

85-
return sprintf('Environment variable (' . \PHP_EOL . '%s' . \PHP_EOL . ')', $str);
85+
return sprintf('Environment variable (' . "\n" . '%s' . "\n" . ')', $str);
8686
}
8787
}

src/Definition/Exception/InvalidDefinition.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class InvalidDefinition extends \Exception implements ContainerExceptionInterfac
1717
public static function create(Definition $definition, string $message, \Exception $previous = null) : self
1818
{
1919
return new self(sprintf(
20-
'%s' . \PHP_EOL . 'Full definition:' . \PHP_EOL . '%s',
20+
'%s' . "\n" . 'Full definition:' . "\n" . '%s',
2121
$message,
2222
(string) $definition
2323
), 0, $previous);

0 commit comments

Comments
 (0)