Skip to content

Commit a776c4d

Browse files
authored
Merge pull request #37 from zarianec/php72
Add compatibility with PHP 7.2
2 parents a7539ed + 7c8963c commit a776c4d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Flynsarmy/DbBladeCompiler/DbBladeCompiler.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ public function __construct($filesystem, $cache_path, Repository $config)
3131
* @param Model $path
3232
* @return void
3333
*/
34-
public function compile($path)
34+
public function compile($path = null)
3535
{
36+
if (is_null($path)) {
37+
return;
38+
}
39+
3640
// Defaults to '__db_blade_compiler_content_field' property
3741
$property = $this->config->get('db-blade-compiler.model_property');
3842
// Defaults to 'contents' column

src/Flynsarmy/DbBladeCompiler/DbView.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ public function field($content_field)
6262
/**
6363
* Get the string contents of the view.
6464
*
65-
* @param \Closure $callback
65+
* @param callable $callback
6666
* @return string
6767
*/
68-
public function render(Closure $callback = null)
68+
public function render(callable $callback = null)
6969
{
7070
$contents = $this->renderContents();
7171

0 commit comments

Comments
 (0)