From c7c54d8ef283647034173be7a5f89797539ece36 Mon Sep 17 00:00:00 2001 From: Mohamed Said Date: Mon, 21 Mar 2016 08:51:28 +0000 Subject: [PATCH 1/2] fix a bug that makes dealing with blade and php files the same --- src/FileHandlers/BaseHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FileHandlers/BaseHandler.php b/src/FileHandlers/BaseHandler.php index 383a548..b1e3c0a 100644 --- a/src/FileHandlers/BaseHandler.php +++ b/src/FileHandlers/BaseHandler.php @@ -67,7 +67,7 @@ public function handle(SplFileInfo $file) sprintf( '%s/%s', $this->prepareAndGetDirectory(), - in_array($file->getExtension(), ['php', 'md']) ? 'index.html' : $file->getFilename() + ends_with($file->getExtension(), ['.blade.php', 'md']) ? 'index.html' : $file->getFilename() ), $content ); From decdd2422085bed5c5ee732a804a3bce06ac6198 Mon Sep 17 00:00:00 2001 From: Mohamed Said Date: Mon, 21 Mar 2016 08:59:34 +0000 Subject: [PATCH 2/2] fix getting the file name instead of extension --- src/FileHandlers/BaseHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FileHandlers/BaseHandler.php b/src/FileHandlers/BaseHandler.php index b1e3c0a..36cf59d 100644 --- a/src/FileHandlers/BaseHandler.php +++ b/src/FileHandlers/BaseHandler.php @@ -67,7 +67,7 @@ public function handle(SplFileInfo $file) sprintf( '%s/%s', $this->prepareAndGetDirectory(), - ends_with($file->getExtension(), ['.blade.php', 'md']) ? 'index.html' : $file->getFilename() + ends_with($file->getFilename(), ['.blade.php', 'md']) ? 'index.html' : $file->getFilename() ), $content );