From 31c8feed507c2e66dd3f7d83594828190e28af2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 23 Dec 2020 17:27:16 +0200 Subject: [PATCH] Rename underscore methods to make stickler happy --- src/Profile.php | 4 ++-- src/ServiceContainer.php | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Profile.php b/src/Profile.php index fe73b79d1..43c41b9a1 100644 --- a/src/Profile.php +++ b/src/Profile.php @@ -40,7 +40,7 @@ public function __construct(array $profile, $convert = true) } if (!empty($profile['profile']) && $convert) { - $this->_process(); + $this->process(); } } @@ -51,7 +51,7 @@ public function __construct(array $profile, $convert = true) * method are aggregated. We are not able to maintain a full tree structure * in any case, as xhprof only keeps one level of detail. */ - protected function _process(): void + private function process(): void { $result = []; foreach ($this->data['profile'] as $name => $values) { diff --git a/src/ServiceContainer.php b/src/ServiceContainer.php index df4019036..ace3f7adb 100644 --- a/src/ServiceContainer.php +++ b/src/ServiceContainer.php @@ -43,11 +43,11 @@ public function __construct() parent::__construct(); $this->setupPaths($this); $this->register(new ConfigProvider()); - $this->_slimApp(); - $this->_services(); + $this->slimApp(); + $this->services(); $this->storageDriverPdo($this); $this->storageDriverMongoDb($this); - $this->_controllers(); + $this->controllers(); } public function boot(): void @@ -66,7 +66,7 @@ private function setupPaths(self $app): void } // Create the Slim app. - protected function _slimApp(): void + private function slimApp(): void { $this['view'] = static function ($c) { // Configure Twig view for slim @@ -111,7 +111,7 @@ protected function _slimApp(): void /** * Add common service objects to the container. */ - protected function _services(): void + private function services(): void { $this['searcher'] = static function ($c) { $saver = $c['config']['save.handler']; @@ -221,7 +221,7 @@ private function storageDriverMongoDb(Container $app): void /** * Add controllers to the DI container. */ - protected function _controllers(): void + private function controllers(): void { $this['watchController'] = $this->factory(static function ($c) { return new Controller\WatchController($c['app'], $c['searcher']);