Skip to content

Commit

Permalink
Rename underscore methods to make stickler happy
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Dec 23, 2020
1 parent 86cb4d8 commit fb74ebd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(array $profile, $convert = true)
}

if (!empty($profile['profile']) && $convert) {
$this->_process();
$this->process();
}
}

Expand All @@ -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) {
Expand Down Expand Up @@ -575,7 +575,7 @@ public function getCallgraph($metric = 'wt', $threshold = 0.01)
}

$this->visited = $this->nodes = $this->links = [];
$this->_callgraphData(self::NO_PARENT, $main, $metric, $threshold);
$this->callgraphData(self::NO_PARENT, $main, $metric, $threshold);
$out = [
'metric' => $metric,
'total' => $main,
Expand All @@ -587,7 +587,7 @@ public function getCallgraph($metric = 'wt', $threshold = 0.01)
return $out;
}

protected function _callgraphData($parentName, $main, $metric, $threshold, $parentIndex = null): void
private function callgraphData($parentName, $main, $metric, $threshold, $parentIndex = null): void
{
// Leaves don't have children, and don't have links/nodes to add.
if (!isset($this->indexed[$parentName])) {
Expand Down Expand Up @@ -629,7 +629,7 @@ protected function _callgraphData($parentName, $main, $metric, $threshold, $pare
// If the current function has more children,
// walk that call subgraph.
if (isset($this->indexed[$childName]) && !$revisit) {
$this->_callgraphData($childName, $main, $metric, $threshold, $index);
$this->callgraphData($childName, $main, $metric, $threshold, $index);
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/ServiceContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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'];
Expand Down Expand Up @@ -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']);
Expand Down

0 comments on commit fb74ebd

Please sign in to comment.