Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 32f03d2

Browse files
committed
:octocat: LF only, no more PHP_EOL
1 parent d265a67 commit 32f03d2

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

examples/create-docblocks.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
use function chillerlan\OAuth\Providers\getProviders;
1717
use function file_get_contents, file_put_contents, implode, str_replace, strpos, substr;
1818

19-
use const PHP_EOL;
20-
21-
$ENVVAR = '';
22-
2319
require_once __DIR__.'/provider-example-common.php';
2420

2521
/**
@@ -69,4 +65,4 @@
6965
$start = strpos($readme, '<!--A-->') + 8;
7066
$end = strpos($readme, '<!--O-->');
7167

72-
file_put_contents($file, str_replace(substr($readme, $start, $end - $start), PHP_EOL.implode(PHP_EOL, $table).PHP_EOL, $readme));
68+
file_put_contents($file, str_replace(substr($readme, $start, $end - $start), "\n".implode("\n", $table)."\n", $readme));

tests/EndpointDocblock.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use function count, dirname, file_get_contents, file_put_contents, implode, in_array, is_array, ksort, str_replace;
1818

19-
use const JSON_PRETTY_PRINT, PHP_EOL;
19+
use const JSON_PRETTY_PRINT;
2020

2121
final class EndpointDocblock{
2222

@@ -41,7 +41,7 @@ public function __construct(OAuthInterface $provider, EndpointMapInterface $endp
4141
* @return string
4242
*/
4343
public function create(string $returntype):string{
44-
$n = PHP_EOL;
44+
$n = "\n";
4545
$str = '/**'.$n;
4646
$ep = $this->endpointMap->toArray();
4747

@@ -98,7 +98,7 @@ public function create(string $returntype):string{
9898
public function createInterface(string $name, string $returntype, string $namespace = null):bool{
9999
$reflection = new ReflectionClass($this->provider);
100100
$interfaceName = $name.'Interface';
101-
$n = PHP_EOL;
101+
$n = "\n";
102102
$ep = $this->endpointMap->toArray();
103103

104104
$str = '<?php'.$n.$n

0 commit comments

Comments
 (0)