forked from deblan/side_menu
add constructor property promotion
add return type of methods
This commit is contained in:
parent
05c35b9a63
commit
7c5654f3bc
14 changed files with 77 additions and 387 deletions
|
|
@ -21,40 +21,20 @@ namespace OCA\SideMenu\Controller;
|
|||
use OCA\SideMenu\AppInfo\Application;
|
||||
use OCA\SideMenu\Service\ConfigProxy;
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http\Response;
|
||||
use OCP\IConfig;
|
||||
use OCP\IRequest;
|
||||
use OCP\IUserSession;
|
||||
|
||||
class PersonalSettingController extends Controller
|
||||
{
|
||||
/**
|
||||
* @var IConfig
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var ConfigProxy
|
||||
*/
|
||||
protected $configProxy;
|
||||
|
||||
/**
|
||||
* @var IUserSession
|
||||
*/
|
||||
protected $userSession;
|
||||
|
||||
public function __construct(
|
||||
$appName,
|
||||
IRequest $request,
|
||||
IConfig $config,
|
||||
ConfigProxy $configProxy,
|
||||
IUserSession $userSession
|
||||
protected IConfig $config,
|
||||
protected ConfigProxy $configProxy,
|
||||
protected IUserSession $userSession
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
|
||||
$this->config = $config;
|
||||
$this->configProxy = $configProxy;
|
||||
$this->userSession = $userSession;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -63,10 +43,8 @@ class PersonalSettingController extends Controller
|
|||
*
|
||||
* @param mixed $name
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function valueSet($name, $value)
|
||||
public function valueSet($name, $value): array
|
||||
{
|
||||
$doSave = false;
|
||||
$user = $this->userSession->getUser();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue