Skip to content

Commit 1c802ea

Browse files
author
Lucas Araujo
committed
refactor: rename methods and variables to follow camelCase convention
1 parent e3b578c commit 1c802ea

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Audiobookshelf/Audiobookshelf.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ class Audiobookshelf extends \App\SupportedApps implements \App\EnhancedApps
77
public $config;
88

99
public function __construct() {
10-
1110
}
1211

1312
public function test()
@@ -26,7 +25,7 @@ public function livestats()
2625
$status = 'active';
2726
$data = [
2827
'totalTime' => $this->secondsToHoursMinutes($details->totalTime),
29-
'bookCount' => $this->get_book_count()
28+
'bookCount' => $this->getBookCount()
3029
];
3130
}
3231

@@ -39,20 +38,20 @@ public function url($endpoint)
3938
return $api_url;
4039
}
4140

42-
private function get_book_count()
41+
private function getBookCount()
4342
{
4443
$res = parent::execute($this->url('api/libraries'), $this->getAttrs());
4544
$libraries = json_decode($res->getBody())->libraries;
4645

47-
$book_count = 0;
46+
$bookCount = 0;
4847
foreach ($libraries as $library) {
4948
$lib_id = $library->id;
5049
$res = parent::execute($this->url('api/libraries/' . $lib_id . '/items'), $this->getAttrs());
5150
$library_details = json_decode($res->getBody());
52-
$book_count += $library_details->total;
51+
$bookCount += $library_details->total;
5352
}
5453

55-
return $book_count;
54+
return $bookCount;
5655
}
5756

5857
private function getAttrs()

0 commit comments

Comments
 (0)