From 74fbae0b65fa133c9da122ac578dddc0d3aba6e8 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Thu, 4 Oct 2018 09:08:41 +0200 Subject: [PATCH] Consistent use of private instead of protected See discussion in https://github.com/flarum/core/commit/fe07d4064be08b8e001f184f4b74692daf487da6#r30752077. --- .../core/src/Foundation/InstalledSite.php | 18 +++++++++--------- .../core/src/Foundation/UninstalledSite.php | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/framework/core/src/Foundation/InstalledSite.php b/framework/core/src/Foundation/InstalledSite.php index 2362fa11f..679b65e05 100644 --- a/framework/core/src/Foundation/InstalledSite.php +++ b/framework/core/src/Foundation/InstalledSite.php @@ -52,27 +52,27 @@ class InstalledSite implements SiteInterface /** * @var string */ - protected $basePath; + private $basePath; /** * @var string */ - protected $publicPath; + private $publicPath; /** * @var string */ - protected $storagePath; + private $storagePath; /** * @var array */ - protected $config; + private $config; /** * @var \Flarum\Extend\ExtenderInterface[] */ - protected $extenders = []; + private $extenders = []; public function __construct($basePath, $publicPath, array $config) { @@ -116,7 +116,7 @@ class InstalledSite implements SiteInterface return $this; } - protected function bootLaravel(): Application + private function bootLaravel(): Application { $laravel = new Application($this->basePath, $this->publicPath); @@ -183,7 +183,7 @@ class InstalledSite implements SiteInterface * @param Application $app * @return ConfigRepository */ - protected function getIlluminateConfig(Application $app) + private function getIlluminateConfig(Application $app) { return new ConfigRepository([ 'view' => [ @@ -216,7 +216,7 @@ class InstalledSite implements SiteInterface ]); } - protected function registerLogger(Application $app) + private function registerLogger(Application $app) { $logPath = $app->storagePath().'/logs/flarum.log'; $handler = new StreamHandler($logPath, Logger::INFO); @@ -226,7 +226,7 @@ class InstalledSite implements SiteInterface $app->alias('log', LoggerInterface::class); } - protected function registerCache(Application $app) + private function registerCache(Application $app) { $app->singleton('cache.store', function ($app) { return new CacheRepository($app->make('cache.filestore')); diff --git a/framework/core/src/Foundation/UninstalledSite.php b/framework/core/src/Foundation/UninstalledSite.php index 9519d25f2..25776c9be 100644 --- a/framework/core/src/Foundation/UninstalledSite.php +++ b/framework/core/src/Foundation/UninstalledSite.php @@ -34,17 +34,17 @@ class UninstalledSite implements SiteInterface /** * @var string */ - protected $basePath; + private $basePath; /** * @var string */ - protected $publicPath; + private $publicPath; /** * @var string */ - protected $storagePath; + private $storagePath; public function __construct($basePath, $publicPath) { @@ -112,7 +112,7 @@ class UninstalledSite implements SiteInterface * @param Application $app * @return ConfigRepository */ - protected function getIlluminateConfig(Application $app) + private function getIlluminateConfig(Application $app) { return new ConfigRepository([ 'session' => [ @@ -123,7 +123,7 @@ class UninstalledSite implements SiteInterface ]); } - protected function registerLogger(Application $app) + private function registerLogger(Application $app) { $logPath = $app->storagePath().'/logs/flarum-installer.log'; $handler = new StreamHandler($logPath, Logger::DEBUG);