Fix trait usage

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2017-05-31 12:44:52 +02:00 committed by Arthur Schiwon
parent 28fd18de43
commit e8f5c21db9
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
3 changed files with 4 additions and 8 deletions

View File

@ -74,8 +74,7 @@ class AdminSettingsController extends Controller {
* @param string $section
* @return array
*/
private function getSettings($section) {
// PhpStorm shows this as unused, but is required by CommonSettingsTrait
protected function getSettings($section) {
$settings = $this->settingsManager->getAdminSettings($section);
$formatted = $this->formatSettings($settings);
if($section === 'additional') {

View File

@ -119,5 +119,5 @@ trait CommonSettingsTrait {
return new TemplateResponse('settings', 'settings/frame', $templateParams);
}
abstract public function getSettings($section);
abstract protected function getSettings($section);
}

View File

@ -31,9 +31,7 @@ use OCP\Settings\IManager as ISettingsManager;
use OCP\Template;
class PersonalSettingsController extends Controller {
use CommonSettingsTrait {
getSettings as private;
}
use CommonSettingsTrait;
/** @var INavigationManager */
private $navigationManager;
@ -66,8 +64,7 @@ class PersonalSettingsController extends Controller {
* @param string $section
* @return array
*/
private function getSettings($section) {
// PhpStorm shows this as unused, but is required by CommonSettingsTrait
protected function getSettings($section) {
$settings = $this->settingsManager->getPersonalSettings($section);
$formatted = $this->formatSettings($settings);
if($section === 'additional') {