Skip to content

Commit 33ce7bb

Browse files
committed
remove path hint
1 parent 0207d73 commit 33ce7bb

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/Illuminate/View/Compilers/BladeCompiler.php

-4
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ public function compile($path = null)
122122
$this->files->get($this->getPath())
123123
);
124124

125-
if (! empty($this->getPath())) {
126-
$contents .= "\n<?php /* {$this->getPath()} */ ?>";
127-
}
128-
129125
$this->files->put(
130126
$this->getCompiledPath($this->getPath()), $contents
131127
);

tests/View/ViewBladeCompilerTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ public function testCompileCompilesFileAndReturnsContents()
4949
{
5050
$compiler = new BladeCompiler($files = $this->getFiles(), __DIR__);
5151
$files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World');
52-
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World\n<?php /* foo */ ?>");
52+
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World");
5353
$compiler->compile('foo');
5454
}
5555

5656
public function testCompileCompilesAndGetThePath()
5757
{
5858
$compiler = new BladeCompiler($files = $this->getFiles(), __DIR__);
5959
$files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World');
60-
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World\n<?php /* foo */ ?>");
60+
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World");
6161
$compiler->compile('foo');
6262
$this->assertEquals('foo', $compiler->getPath());
6363
}
@@ -73,7 +73,7 @@ public function testCompileWithPathSetBefore()
7373
{
7474
$compiler = new BladeCompiler($files = $this->getFiles(), __DIR__);
7575
$files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World');
76-
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World\n<?php /* foo */ ?>");
76+
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World");
7777
// set path before compilation
7878
$compiler->setPath('foo');
7979
// trigger compilation with null $path
@@ -97,7 +97,7 @@ public function testIncludePathToTemplate()
9797
{
9898
$compiler = new BladeCompiler($files = $this->getFiles(), __DIR__);
9999
$files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World');
100-
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World\n<?php /* foo */ ?>");
100+
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World");
101101
$compiler->compile('foo');
102102
}
103103

0 commit comments

Comments
 (0)