forked from deblan/side_menu
PSR 2 compliance
This commit is contained in:
parent
64da45e676
commit
13f7e63514
|
@ -189,7 +189,8 @@ class NavController extends Controller
|
||||||
foreach ($categoriesLabels as $key => $value) {
|
foreach ($categoriesLabels as $key => $value) {
|
||||||
if ($a['categoryId'] === $key) {
|
if ($a['categoryId'] === $key) {
|
||||||
return -1;
|
return -1;
|
||||||
} elseif ($b['categoryId'] === $key) {
|
}
|
||||||
|
if ($b['categoryId'] === $key) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
|
|
||||||
namespace OCA\SideMenu\Controller;
|
namespace OCA\SideMenu\Controller;
|
||||||
|
|
||||||
|
use OCA\SideMenu\AppInfo\Application;
|
||||||
|
use OCA\SideMenu\Service\ConfigProxy;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
use OCP\AppFramework\Http\Response;
|
use OCP\AppFramework\Http\Response;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
use OCP\IUserSession;
|
use OCP\IUserSession;
|
||||||
use OCA\SideMenu\AppInfo\Application;
|
|
||||||
use OCA\SideMenu\Service\ConfigProxy;
|
|
||||||
|
|
||||||
class PersonalSettingController extends Controller
|
class PersonalSettingController extends Controller
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
namespace OCA\SideMenu\Service;
|
namespace OCA\SideMenu\Service;
|
||||||
|
|
||||||
use OC\App\AppStore\Fetcher\CategoryFetcher;
|
use OC\App\AppStore\Fetcher\CategoryFetcher;
|
||||||
|
use OCA\SideMenu\AppInfo\Application;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\L10N\IFactory;
|
use OCP\L10N\IFactory;
|
||||||
use OCA\SideMenu\Service\ConfigProxy;
|
|
||||||
use OCA\SideMenu\AppInfo\Application;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class CategoryRepository.
|
* class CategoryRepository.
|
||||||
|
@ -36,12 +35,11 @@ class CategoryRepository
|
||||||
protected $iConfig;
|
protected $iConfig;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
CategoryFetcher $categoryFetcher,
|
CategoryFetcher $categoryFetcher,
|
||||||
ConfigProxy $config,
|
ConfigProxy $config,
|
||||||
IConfig $iConfig,
|
IConfig $iConfig,
|
||||||
IFactory $l10nFactory
|
IFactory $l10nFactory
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
$this->categoryFetcher = $categoryFetcher;
|
$this->categoryFetcher = $categoryFetcher;
|
||||||
$this->l10nFactory = $l10nFactory;
|
$this->l10nFactory = $l10nFactory;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
|
|
||||||
namespace OCA\SideMenu\Settings;
|
namespace OCA\SideMenu\Settings;
|
||||||
|
|
||||||
|
use OCA\SideMenu\AppInfo\Application;
|
||||||
use OCP\IL10N;
|
use OCP\IL10N;
|
||||||
use OCP\IURLGenerator;
|
use OCP\IURLGenerator;
|
||||||
use OCP\Settings\IIconSection;
|
use OCP\Settings\IIconSection;
|
||||||
use OCA\SideMenu\AppInfo\Application;
|
|
||||||
|
|
||||||
class AdminSection implements IIconSection
|
class AdminSection implements IIconSection
|
||||||
{
|
{
|
||||||
|
@ -35,10 +35,6 @@ class AdminSection implements IIconSection
|
||||||
*/
|
*/
|
||||||
private $url;
|
private $url;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param IURLGenerator $url
|
|
||||||
* @param IL10N $l
|
|
||||||
*/
|
|
||||||
public function __construct(IURLGenerator $url, IL10N $l)
|
public function __construct(IURLGenerator $url, IL10N $l)
|
||||||
{
|
{
|
||||||
$this->url = $url;
|
$this->url = $url;
|
||||||
|
@ -47,7 +43,7 @@ class AdminSection implements IIconSection
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the ID of the section. It is supposed to be a lower case string,
|
* returns the ID of the section. It is supposed to be a lower case string,
|
||||||
* e.g. 'ldap'
|
* e.g. 'ldap'.
|
||||||
*
|
*
|
||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
|
@ -69,8 +65,8 @@ class AdminSection implements IIconSection
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int whether the form should be rather on the top or bottom of
|
* @return int whether the form should be rather on the top or bottom of
|
||||||
* the settings navigation. The sections are arranged in ascending order of
|
* the settings navigation. The sections are arranged in ascending order of
|
||||||
* the priority values. It is required to return a value between 0 and 99.
|
* the priority values. It is required to return a value between 0 and 99.
|
||||||
*
|
*
|
||||||
* E.g.: 70
|
* E.g.: 70
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
|
|
||||||
namespace OCA\SideMenu\Settings;
|
namespace OCA\SideMenu\Settings;
|
||||||
|
|
||||||
|
use OCA\SideMenu\AppInfo\Application;
|
||||||
use OCP\IL10N;
|
use OCP\IL10N;
|
||||||
use OCP\IURLGenerator;
|
use OCP\IURLGenerator;
|
||||||
use OCP\Settings\IIconSection;
|
use OCP\Settings\IIconSection;
|
||||||
use OCA\SideMenu\AppInfo\Application;
|
|
||||||
|
|
||||||
class PersonalSection implements IIconSection
|
class PersonalSection implements IIconSection
|
||||||
{
|
{
|
||||||
|
@ -35,10 +35,6 @@ class PersonalSection implements IIconSection
|
||||||
*/
|
*/
|
||||||
private $url;
|
private $url;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param IURLGenerator $url
|
|
||||||
* @param IL10N $l
|
|
||||||
*/
|
|
||||||
public function __construct(IURLGenerator $url, IL10N $l)
|
public function __construct(IURLGenerator $url, IL10N $l)
|
||||||
{
|
{
|
||||||
$this->url = $url;
|
$this->url = $url;
|
||||||
|
@ -47,7 +43,7 @@ class PersonalSection implements IIconSection
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the ID of the section. It is supposed to be a lower case string,
|
* returns the ID of the section. It is supposed to be a lower case string,
|
||||||
* e.g. 'ldap'
|
* e.g. 'ldap'.
|
||||||
*
|
*
|
||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
|
@ -69,8 +65,8 @@ class PersonalSection implements IIconSection
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int whether the form should be rather on the top or bottom of
|
* @return int whether the form should be rather on the top or bottom of
|
||||||
* the settings navigation. The sections are arranged in ascending order of
|
* the settings navigation. The sections are arranged in ascending order of
|
||||||
* the priority values. It is required to return a value between 0 and 99.
|
* the priority values. It is required to return a value between 0 and 99.
|
||||||
*
|
*
|
||||||
* E.g.: 70
|
* E.g.: 70
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue