Skip to content

Commit a9010ba

Browse files
committed
formatting
1 parent 52fbf5c commit a9010ba

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

src/Illuminate/View/Engines/CompilerEngine.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ class CompilerEngine extends PhpEngine
2626
/**
2727
* Create a new compiler engine instance.
2828
*
29-
* @param \Illuminate\Filesystem\Filesystem $filesystem
3029
* @param \Illuminate\View\Compilers\CompilerInterface $compiler
30+
* @param \Illuminate\Filesystem\Filesystem $files
3131
* @return void
3232
*/
33-
public function __construct(Filesystem $filesystem, CompilerInterface $compiler)
33+
public function __construct(CompilerInterface $compiler, Filesystem $files)
3434
{
35-
parent::__construct($filesystem);
35+
parent::__construct($files);
36+
3637
$this->compiler = $compiler;
3738
}
3839

src/Illuminate/View/Engines/FileEngine.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ class FileEngine implements Engine
1212
*
1313
* @var \Illuminate\Filesystem\Filesystem
1414
*/
15-
protected $filesystem;
15+
protected $files;
1616

1717
/**
1818
* Create a new file engine instance.
1919
*
20-
* @param \Illuminate\Filesystem\Filesystem $filesystem
20+
* @param \Illuminate\Filesystem\Filesystem $files
2121
* @return void
2222
*/
23-
public function __construct(Filesystem $filesystem)
23+
public function __construct(Filesystem $files)
2424
{
25-
$this->filesystem = $filesystem;
25+
$this->files = $files;
2626
}
2727

2828
/**
@@ -34,6 +34,6 @@ public function __construct(Filesystem $filesystem)
3434
*/
3535
public function get($path, array $data = [])
3636
{
37-
return $this->filesystem->get($path);
37+
return $this->files->get($path);
3838
}
3939
}

src/Illuminate/View/Engines/PhpEngine.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ class PhpEngine implements Engine
1313
*
1414
* @var \Illuminate\Filesystem\Filesystem
1515
*/
16-
protected $filesystem;
16+
protected $files;
1717

1818
/**
1919
* Create a new file engine instance.
2020
*
21-
* @param \Illuminate\Filesystem\Filesystem $filesystem
21+
* @param \Illuminate\Filesystem\Filesystem $files
2222
* @return void
2323
*/
24-
public function __construct(Filesystem $filesystem)
24+
public function __construct(Filesystem $files)
2525
{
26-
$this->filesystem = $filesystem;
26+
$this->files = $files;
2727
}
2828

2929
/**
@@ -55,7 +55,7 @@ protected function evaluatePath($path, $data)
5555
// flush out any stray output that might get out before an error occurs or
5656
// an exception is thrown. This prevents any partial views from leaking.
5757
try {
58-
$this->filesystem->getRequire($path, $data);
58+
$this->files->getRequire($path, $data);
5959
} catch (Throwable $e) {
6060
$this->handleViewException($e, $obLevel);
6161
}

src/Illuminate/View/ViewServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function registerPhpEngine($resolver)
147147
public function registerBladeEngine($resolver)
148148
{
149149
$resolver->register('blade', function () {
150-
return new CompilerEngine($this->app['files'], $this->app['blade.compiler']);
150+
return new CompilerEngine($this->app['blade.compiler'], $this->app['files']);
151151
});
152152
}
153153
}

tests/View/ViewCompilerEngineTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ public function testViewsAreNotRecompiledIfTheyAreNotExpired()
4141

4242
protected function getEngine()
4343
{
44-
return new CompilerEngine(new Filesystem, m::mock(CompilerInterface::class));
44+
return new CompilerEngine(m::mock(CompilerInterface::class), new Filesystem);
4545
}
4646
}

tests/View/ViewFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ public function testExceptionsInSectionsAreThrown()
489489
$this->expectException(ErrorException::class);
490490
$this->expectExceptionMessage('section exception message');
491491

492-
$engine = new CompilerEngine(new Filesystem, m::mock(CompilerInterface::class));
492+
$engine = new CompilerEngine(m::mock(CompilerInterface::class), new Filesystem);
493493
$engine->getCompiler()->shouldReceive('getCompiledPath')->andReturnUsing(function ($path) {
494494
return $path;
495495
});

0 commit comments

Comments
 (0)