Skip to content

Commit

Permalink
Use collect function
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Apr 9, 2019
1 parent 4920cb8 commit 656259e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Illuminate/View/Compilers/BladeCompiler.php
Expand Up @@ -5,7 +5,6 @@
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use InvalidArgumentException;
use Illuminate\Support\Collection;

class BladeCompiler extends Compiler implements CompilerInterface
{
Expand Down Expand Up @@ -151,7 +150,7 @@ public function compile($path = null)
*/
protected function getOpenAndClosingPHPTokens($contents)
{
return Collection::make(token_get_all($contents))
return collect(token_get_all($contents))
->pluck($tokenNumber = 0)
->filter(function ($token) {
return in_array($token, [T_OPEN_TAG, T_OPEN_TAG_WITH_ECHO, T_CLOSE_TAG]);
Expand Down

0 comments on commit 656259e

Please sign in to comment.