Skip to content

Commit b3bea36

Browse files
committed
formatting
1 parent 154fef3 commit b3bea36

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/Illuminate/Filesystem/Filesystem.php

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -86,33 +86,6 @@ public function sharedGet($path)
8686
return $contents;
8787
}
8888

89-
/**
90-
* Get the contents of a file, one line at a time.
91-
*
92-
* @param string $path
93-
* @return \Illuminate\Support\LazyCollection
94-
*
95-
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
96-
*/
97-
public function lines($path)
98-
{
99-
if (! $this->isFile($path)) {
100-
throw new FileNotFoundException(
101-
"File does not exist at path {$path}."
102-
);
103-
}
104-
105-
return LazyCollection::make(function () use ($path) {
106-
$file = new SplFileObject($path);
107-
108-
$file->setFlags(SplFileObject::DROP_NEW_LINE);
109-
110-
while (! $file->eof()) {
111-
yield $file->fgets();
112-
}
113-
});
114-
}
115-
11689
/**
11790
* Get the returned value of a file.
11891
*
@@ -161,6 +134,33 @@ public function requireOnce($path, array $data = [])
161134
throw new FileNotFoundException("File does not exist at path {$path}.");
162135
}
163136

137+
/**
138+
* Get the contents of a file one line at a time.
139+
*
140+
* @param string $path
141+
* @return \Illuminate\Support\LazyCollection
142+
*
143+
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
144+
*/
145+
public function lines($path)
146+
{
147+
if (! $this->isFile($path)) {
148+
throw new FileNotFoundException(
149+
"File does not exist at path {$path}."
150+
);
151+
}
152+
153+
return LazyCollection::make(function () use ($path) {
154+
$file = new SplFileObject($path);
155+
156+
$file->setFlags(SplFileObject::DROP_NEW_LINE);
157+
158+
while (! $file->eof()) {
159+
yield $file->fgets();
160+
}
161+
});
162+
}
163+
164164
/**
165165
* Get the MD5 hash of the file at the given path.
166166
*

0 commit comments

Comments
 (0)