mirror of
https://github.com/flarum/framework.git
synced 2025-01-23 05:56:15 +08:00
Consistent use of private instead of protected
See discussion in fe07d4064b (r30752077)
.
This commit is contained in:
parent
3a45c7812a
commit
74fbae0b65
|
@ -52,27 +52,27 @@ class InstalledSite implements SiteInterface
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $basePath;
|
private $basePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $publicPath;
|
private $publicPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $storagePath;
|
private $storagePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $config;
|
private $config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Flarum\Extend\ExtenderInterface[]
|
* @var \Flarum\Extend\ExtenderInterface[]
|
||||||
*/
|
*/
|
||||||
protected $extenders = [];
|
private $extenders = [];
|
||||||
|
|
||||||
public function __construct($basePath, $publicPath, array $config)
|
public function __construct($basePath, $publicPath, array $config)
|
||||||
{
|
{
|
||||||
|
@ -116,7 +116,7 @@ class InstalledSite implements SiteInterface
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function bootLaravel(): Application
|
private function bootLaravel(): Application
|
||||||
{
|
{
|
||||||
$laravel = new Application($this->basePath, $this->publicPath);
|
$laravel = new Application($this->basePath, $this->publicPath);
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ class InstalledSite implements SiteInterface
|
||||||
* @param Application $app
|
* @param Application $app
|
||||||
* @return ConfigRepository
|
* @return ConfigRepository
|
||||||
*/
|
*/
|
||||||
protected function getIlluminateConfig(Application $app)
|
private function getIlluminateConfig(Application $app)
|
||||||
{
|
{
|
||||||
return new ConfigRepository([
|
return new ConfigRepository([
|
||||||
'view' => [
|
'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';
|
$logPath = $app->storagePath().'/logs/flarum.log';
|
||||||
$handler = new StreamHandler($logPath, Logger::INFO);
|
$handler = new StreamHandler($logPath, Logger::INFO);
|
||||||
|
@ -226,7 +226,7 @@ class InstalledSite implements SiteInterface
|
||||||
$app->alias('log', LoggerInterface::class);
|
$app->alias('log', LoggerInterface::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function registerCache(Application $app)
|
private function registerCache(Application $app)
|
||||||
{
|
{
|
||||||
$app->singleton('cache.store', function ($app) {
|
$app->singleton('cache.store', function ($app) {
|
||||||
return new CacheRepository($app->make('cache.filestore'));
|
return new CacheRepository($app->make('cache.filestore'));
|
||||||
|
|
|
@ -34,17 +34,17 @@ class UninstalledSite implements SiteInterface
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $basePath;
|
private $basePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $publicPath;
|
private $publicPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $storagePath;
|
private $storagePath;
|
||||||
|
|
||||||
public function __construct($basePath, $publicPath)
|
public function __construct($basePath, $publicPath)
|
||||||
{
|
{
|
||||||
|
@ -112,7 +112,7 @@ class UninstalledSite implements SiteInterface
|
||||||
* @param Application $app
|
* @param Application $app
|
||||||
* @return ConfigRepository
|
* @return ConfigRepository
|
||||||
*/
|
*/
|
||||||
protected function getIlluminateConfig(Application $app)
|
private function getIlluminateConfig(Application $app)
|
||||||
{
|
{
|
||||||
return new ConfigRepository([
|
return new ConfigRepository([
|
||||||
'session' => [
|
'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';
|
$logPath = $app->storagePath().'/logs/flarum-installer.log';
|
||||||
$handler = new StreamHandler($logPath, Logger::DEBUG);
|
$handler = new StreamHandler($logPath, Logger::DEBUG);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user