From 21f5c113ba18f1372431c90691b78bb797139346 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Thu, 28 Feb 2019 15:35:33 -0500 Subject: [PATCH] Fix whitespace and Code styles --- tests/ChecksLaravelVersionTrait.php | 54 ++++++++++++++--------------- tests/Stubs/Application58Stub.php | 39 ++++++++++----------- 2 files changed, 46 insertions(+), 47 deletions(-) diff --git a/tests/ChecksLaravelVersionTrait.php b/tests/ChecksLaravelVersionTrait.php index 46f2bb95a..caeeaa44e 100644 --- a/tests/ChecksLaravelVersionTrait.php +++ b/tests/ChecksLaravelVersionTrait.php @@ -8,34 +8,34 @@ trait ChecksLaravelVersionTrait { - public $installed_file_path = __DIR__ . '/../vendor/composer/installed.json'; - public $current_release = '5.8'; + public $installed_file_path = __DIR__ . '/../vendor/composer/installed.json'; + public $current_release = '5.8'; - function getFrameworkVersion() - { - $contents = file_get_contents($this->installed_file_path); - $parsed_data = json_decode($contents, true); - $just_laravel = array_filter($parsed_data, function ($val) { - if ("laravel/framework" === $val['name'] || "laravel/lumen-framework" === $val['name']) { - return true; - } - }); - $laravelVersion = array_map(function($val) { - return $val['version']; - }, array_values($just_laravel))[0]; - return $laravelVersion; - } - - function getApplicationStub() - { - $version = $this->getFrameworkVersion(); - if ('dev-master' === $version) { - $version = $this->current_release; + private function getFrameworkVersion() + { + $contents = file_get_contents($this->installed_file_path); + $parsed_data = json_decode($contents, true); + $just_laravel = array_filter($parsed_data, function ($val) { + if ("laravel/framework" === $val['name'] || "laravel/lumen-framework" === $val['name']) { + return true; + } + }); + $laravelVersion = array_map(function ($val) { + return $val['version']; + }, array_values($just_laravel))[0]; + return $laravelVersion; } - $compared_versions = version_compare('5.8', $version); - if ( $compared_versions === -1 || $compared_versions === 0 ) { - return new Application58Stub; + + private function getApplicationStub() + { + $version = $this->getFrameworkVersion(); + if ('dev-master' === $version) { + $version = $this->current_release; + } + $compared_versions = version_compare('5.8', $version); + if ($compared_versions === -1 || $compared_versions === 0) { + return new Application58Stub; + } + return new ApplicationStub; } - return new ApplicationStub; - } } diff --git a/tests/Stubs/Application58Stub.php b/tests/Stubs/Application58Stub.php index 8023fc97f..cd170f5e7 100644 --- a/tests/Stubs/Application58Stub.php +++ b/tests/Stubs/Application58Stub.php @@ -59,7 +59,7 @@ public function runningInConsole() public function runningUnitTests() { - // TODO: Implement runningUnitTests() method. + // TODO: Implement runningUnitTests() method. } public function isDownForMaintenance() @@ -84,7 +84,7 @@ public function registerDeferredProvider($provider, $service = null) public function resolveProvider($provider) { - // + // } public function boot() @@ -104,32 +104,32 @@ public function booted($callback) public function bootstrapWith(array $bootstrappers) { - // + // } public function configurationIsCached() { - // + // } public function detectEnvironment(\Closure $callback) { - // + // } public function environmentFile() { - // + // } public function environmentFilePath() { - // + // } public function getCachedConfigPath() { - // + // } public function getCachedServicesPath() @@ -144,57 +144,56 @@ public function getCachedPackagesPath() public function getCachedRoutesPath() { - // + // } public function getLocale() { - // + // } public function getNamespace() { - // + // } public function getProviders($provider) { - // + // } public function hasBeenBootstrapped() { - // + // } public function loadDeferredProviders() { - // + // } public function loadEnvironmentFrom($file) { - // + // } public function routesAreCached() { - // + // } public function setLocale($locale) { - // + // } public function shouldSkipMiddleware() { - // + // } public function terminate() { - // + // } - }