@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function find($file) |
20 | 20 | { |
21 | - if (! file_exists($file)) { |
|
21 | + if (!file_exists($file)) { |
|
22 | 22 | return []; |
23 | 23 | } |
24 | 24 |
@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | */ |
10 | 10 | public function it_can_find_an_environment_varaible_in_a_dot_env_file() |
11 | 11 | { |
12 | - file_put_contents("{$this->path}/.env", 'FOOBAR=BAZ'); |
|
13 | - $result = $this->envFinder->getFromFile("{$this->path}/.env"); |
|
14 | - $this->assertCount(1, $result); |
|
15 | - $this->assertEquals('FOOBAR', $result[0]); |
|
12 | + file_put_contents("{$this->path}/.env", 'FOOBAR=BAZ'); |
|
13 | + $result = $this->envFinder->getFromFile("{$this->path}/.env"); |
|
14 | + $this->assertCount(1, $result); |
|
15 | + $this->assertEquals('FOOBAR', $result[0]); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | /** |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function it_can_find_multiple_environment_varaibles_in_a_dot_env_file() |
22 | 22 | { |
23 | - file_put_contents("{$this->path}/.env", "FOOBAR=BAZ\nBAZBAR=FOO"); |
|
24 | - $result = $this->envFinder->getFromFile("{$this->path}/.env"); |
|
25 | - $this->assertCount(2, $result); |
|
26 | - $this->assertEquals('FOOBAR', $result[0]); |
|
27 | - $this->assertEquals('BAZBAR', $result[1]); |
|
23 | + file_put_contents("{$this->path}/.env", "FOOBAR=BAZ\nBAZBAR=FOO"); |
|
24 | + $result = $this->envFinder->getFromFile("{$this->path}/.env"); |
|
25 | + $this->assertCount(2, $result); |
|
26 | + $this->assertEquals('FOOBAR', $result[0]); |
|
27 | + $this->assertEquals('BAZBAR', $result[1]); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function it_can_find_zero_environment_varaibles_in_a_dot_env_file() |
34 | 34 | { |
35 | - file_put_contents("{$this->path}/.env", ""); |
|
36 | - $result = $this->envFinder->getFromFile("{$this->path}/.env"); |
|
37 | - $this->assertCount(0, $result); |
|
35 | + file_put_contents("{$this->path}/.env", ""); |
|
36 | + $result = $this->envFinder->getFromFile("{$this->path}/.env"); |
|
37 | + $this->assertCount(0, $result); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function it_can_find_an_environment_varaible_in_a_dot_env_example_file() |
44 | 44 | { |
45 | - file_put_contents("{$this->path}/.env.example", 'FOOBAR=BAZ'); |
|
46 | - $result = $this->envFinder->getFromFile("{$this->path}/.env.example"); |
|
47 | - $this->assertCount(1, $result); |
|
48 | - $this->assertEquals('FOOBAR', $result[0]); |
|
45 | + file_put_contents("{$this->path}/.env.example", 'FOOBAR=BAZ'); |
|
46 | + $result = $this->envFinder->getFromFile("{$this->path}/.env.example"); |
|
47 | + $this->assertCount(1, $result); |
|
48 | + $this->assertEquals('FOOBAR', $result[0]); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -53,11 +53,11 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function it_can_find_multiple_environment_varaibles_in_a_dot_env_example_file() |
55 | 55 | { |
56 | - file_put_contents("{$this->path}/.env.example", "FOOBAR=BAZ\nBAZBAR=FOO"); |
|
57 | - $result = $this->envFinder->getFromFile("{$this->path}/.env.example"); |
|
58 | - $this->assertCount(2, $result); |
|
59 | - $this->assertEquals('FOOBAR', $result[0]); |
|
60 | - $this->assertEquals('BAZBAR', $result[1]); |
|
56 | + file_put_contents("{$this->path}/.env.example", "FOOBAR=BAZ\nBAZBAR=FOO"); |
|
57 | + $result = $this->envFinder->getFromFile("{$this->path}/.env.example"); |
|
58 | + $this->assertCount(2, $result); |
|
59 | + $this->assertEquals('FOOBAR', $result[0]); |
|
60 | + $this->assertEquals('BAZBAR', $result[1]); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function it_can_find_zero_environment_varaibles_in_a_dot_env_example_file() |
67 | 67 | { |
68 | - file_put_contents("{$this->path}/.env.example", ""); |
|
69 | - $result = $this->envFinder->getFromFile("{$this->path}/.env.example"); |
|
70 | - $this->assertCount(0, $result); |
|
68 | + file_put_contents("{$this->path}/.env.example", ""); |
|
69 | + $result = $this->envFinder->getFromFile("{$this->path}/.env.example"); |
|
70 | + $this->assertCount(0, $result); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function it_can_find_an_environment_varaible_in_a_php_file() |
77 | 77 | { |
78 | - file_put_contents("{$this->path}/foobar.php", "env('FOOBAR');"); |
|
79 | - $result = $this->envFinder->getFromFile("{$this->path}/foobar.php"); |
|
80 | - $this->assertCount(1, $result); |
|
81 | - $this->assertEquals('FOOBAR', $result[0]); |
|
78 | + file_put_contents("{$this->path}/foobar.php", "env('FOOBAR');"); |
|
79 | + $result = $this->envFinder->getFromFile("{$this->path}/foobar.php"); |
|
80 | + $this->assertCount(1, $result); |
|
81 | + $this->assertEquals('FOOBAR', $result[0]); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -86,11 +86,11 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function it_can_find_multiple_environment_varaibles_in_a_php_file() |
88 | 88 | { |
89 | - file_put_contents("{$this->path}/foobar.php", "env('FOOBAR'); env('BARBAZ');"); |
|
90 | - $result = $this->envFinder->getFromFile("{$this->path}/foobar.php"); |
|
91 | - $this->assertCount(2, $result); |
|
92 | - $this->assertEquals('FOOBAR', $result[0]); |
|
93 | - $this->assertEquals('BARBAZ', $result[1]); |
|
89 | + file_put_contents("{$this->path}/foobar.php", "env('FOOBAR'); env('BARBAZ');"); |
|
90 | + $result = $this->envFinder->getFromFile("{$this->path}/foobar.php"); |
|
91 | + $this->assertCount(2, $result); |
|
92 | + $this->assertEquals('FOOBAR', $result[0]); |
|
93 | + $this->assertEquals('BARBAZ', $result[1]); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -98,9 +98,9 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function it_can_find_zero_environment_varaibles_in_a_php_file() |
100 | 100 | { |
101 | - file_put_contents("{$this->path}/foobar.php", ""); |
|
102 | - $result = $this->envFinder->getFromFile("{$this->path}/foobar.php"); |
|
103 | - $this->assertCount(0, $result); |
|
101 | + file_put_contents("{$this->path}/foobar.php", ""); |
|
102 | + $result = $this->envFinder->getFromFile("{$this->path}/foobar.php"); |
|
103 | + $this->assertCount(0, $result); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function if_the_php_file_doesnt_exist_then_no_results_are_found() |
110 | 110 | { |
111 | - $result = $this->envFinder->getFromFile("{$this->path}/foobar.php"); |
|
112 | - $this->assertCount(0, $result); |
|
111 | + $result = $this->envFinder->getFromFile("{$this->path}/foobar.php"); |
|
112 | + $this->assertCount(0, $result); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function if_the_dot_env_file_doesnt_exist_then_no_results_are_found() |
119 | 119 | { |
120 | - $result = $this->envFinder->getFromFile("{$this->path}/.env"); |
|
121 | - $this->assertCount(0, $result); |
|
120 | + $result = $this->envFinder->getFromFile("{$this->path}/.env"); |
|
121 | + $this->assertCount(0, $result); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -126,8 +126,8 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function if_the_dont_env_example_file_doesnt_exist_then_no_results_are_found() |
128 | 128 | { |
129 | - $result = $this->envFinder->getFromFile("{$this->path}/.env.example"); |
|
130 | - $this->assertCount(0, $result); |
|
129 | + $result = $this->envFinder->getFromFile("{$this->path}/.env.example"); |
|
130 | + $this->assertCount(0, $result); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | public function setup() |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function find($file) |
20 | 20 | { |
21 | - if (! file_exists($file)) { |
|
21 | + if (!file_exists($file)) { |
|
22 | 22 | return []; |
23 | 23 | } |
24 | 24 |