Skip to content

Commit ae5946e

Browse files
authored
Merge pull request mghoneimy#16 from actionm/win-tests
Modifying the package to adapt to non-linux operating systems - Replacing "\n" character with PHP_EOL
2 parents c8a6642 + 3a3bc4e commit ae5946e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/FieldTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ public function setSelectionSet(array $selectionSet)
4040
*/
4141
protected function constructSelectionSet(): string
4242
{
43-
$attributesString = " {\n";
43+
$attributesString = " {" . PHP_EOL;
4444
$first = true;
4545
foreach ($this->selectionSet as $attribute) {
4646

4747
// Append empty line at the beginning if it's not the first item on the list
4848
if ($first) {
4949
$first = false;
5050
} else {
51-
$attributesString .= "\n";
51+
$attributesString .= PHP_EOL;
5252
}
5353

5454
// If query is included in attributes set as a nested query
@@ -59,7 +59,7 @@ protected function constructSelectionSet(): string
5959
// Append attribute to returned attributes list
6060
$attributesString .= $attribute;
6161
}
62-
$attributesString .= "\n}";
62+
$attributesString .= PHP_EOL . "}";
6363

6464
return $attributesString;
6565
}

src/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function __toString()
211211
{
212212
$queryFormat = static::QUERY_FORMAT;
213213
if (!$this->isNested && $this->fieldName !== static::OPERATION_TYPE) {
214-
$queryFormat = $this->generateSignature() . " {\n" . static::QUERY_FORMAT . "\n}";
214+
$queryFormat = $this->generateSignature() . " {" . PHP_EOL . static::QUERY_FORMAT . PHP_EOL . "}";
215215
}
216216
$argumentsString = $this->constructArguments();
217217
$selectionSetString = $this->constructSelectionSet();

0 commit comments

Comments
 (0)