Skip to content

Commit

Permalink
Fixed a small error on previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
runz0rd committed May 7, 2017
1 parent 29398f8 commit 530bf1d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Common/Util/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ public static function write($filePath, $filename, $data) {
* @param Closure $processContent
* @return string
*/
public static function read($filename, $processContent) {
public static function read($filename, $processContent = null) {
$content = file_get_contents($filename);
return processContent(file_get_contents($filename));
if($processContent instanceof \Closure) {
$content = $processContent($content);
}
return $content;
}
}

0 comments on commit 530bf1d

Please sign in to comment.