From d715413233531f7c45a29cb268fb751bac7e6337 Mon Sep 17 00:00:00 2001 From: Rougin Royce Gutib Date: Thu, 14 Jan 2016 12:24:49 +0800 Subject: [PATCH] Fixed issues raised by Scrutinizer --- src/Commands/RemoveWildfireCommand.php | 3 +- src/Common/File.php | 2 +- src/Common/Tools.php | 44 +++++++++++++------------- src/Validator/Validator.php | 8 ++--- 4 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/Commands/RemoveWildfireCommand.php b/src/Commands/RemoveWildfireCommand.php index 0377660..0d9e378 100644 --- a/src/Commands/RemoveWildfireCommand.php +++ b/src/Commands/RemoveWildfireCommand.php @@ -38,8 +38,7 @@ public function isEnabled() */ protected function configure() { - $this - ->setName('remove:wildfire') + $this->setName('remove:wildfire') ->setDescription('Removes Wildfire'); } diff --git a/src/Common/File.php b/src/Common/File.php index 369af2d..921bde1 100644 --- a/src/Common/File.php +++ b/src/Common/File.php @@ -13,7 +13,7 @@ class File { /** - * @var File pointer + * @var resource */ protected $file; diff --git a/src/Common/Tools.php b/src/Common/Tools.php index 29bdb37..02d6db3 100644 --- a/src/Common/Tools.php +++ b/src/Common/Tools.php @@ -14,6 +14,17 @@ */ class Tools { + /** + * Checks whether the header and footer file exists. + * + * @return bool + */ + public static function hasLayout() + { + return file_exists(APPPATH.'views/layout/header.php') + && file_exists(APPPATH.'views/layout/footer.php'); + } + /** * "Ignites" the post installation process. * @@ -162,17 +173,6 @@ public static function isDoctrineEnabled() return file_exists(APPPATH.'libraries/Doctrine.php'); } - /** - * Checks whether the header and footer file exists. - * - * @return bool - */ - public static function hasLayout() - { - return file_exists(APPPATH.'views/layout/header.php') - && file_exists(APPPATH.'views/layout/footer.php'); - } - /** * Checks if Wildfire exists. * @@ -196,17 +196,6 @@ public static function stripTableSchema($table) : $table; } - /** - * Strips the table schema from the table name. - * - * @param string $table - * @return string - */ - public static function strip_table_schema($table) - { - return self::stripTableSchema($table); - } - /** * Removes the specified library in the application. * @@ -257,4 +246,15 @@ public function removeLibrary($type) ? 'Wildfire is now successfully removed!' : 'Doctrine ORM is now successfully removed!'; } + + /** + * Strips the table schema from the table name. + * + * @param string $table + * @return string + */ + public static function strip_table_schema($table) + { + return self::stripTableSchema($table); + } } diff --git a/src/Validator/Validator.php b/src/Validator/Validator.php index d546900..a243a2d 100644 --- a/src/Validator/Validator.php +++ b/src/Validator/Validator.php @@ -46,10 +46,10 @@ class Validator implements ValidatorInterface protected $message = ''; /** - * @param string $isDoctrine - * @param string $isWildfire - * @param string $isCamel - * @param array $file + * @param boolean $isDoctrine + * @param boolean $isWildfire + * @param boolean $isCamel + * @param array $file */ public function __construct($isDoctrine, $isWildfire, $isCamel, $file) {