PSR 2 compliance

This commit is contained in:
Simon Vieille 2021-02-03 10:15:59 +01:00
parent 64da45e676
commit 13f7e63514
Signed by: deblan
GPG Key ID: 03383D15A1D31745
5 changed files with 16 additions and 25 deletions

View File

@ -189,7 +189,8 @@ class NavController extends Controller
foreach ($categoriesLabels as $key => $value) {
if ($a['categoryId'] === $key) {
return -1;
} elseif ($b['categoryId'] === $key) {
}
if ($b['categoryId'] === $key) {
return 1;
}
}

View File

@ -18,13 +18,13 @@
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;
use OCA\SideMenu\AppInfo\Application;
use OCA\SideMenu\Service\ConfigProxy;
class PersonalSettingController extends Controller
{

View File

@ -3,10 +3,9 @@
namespace OCA\SideMenu\Service;
use OC\App\AppStore\Fetcher\CategoryFetcher;
use OCA\SideMenu\AppInfo\Application;
use OCP\IConfig;
use OCP\L10N\IFactory;
use OCA\SideMenu\Service\ConfigProxy;
use OCA\SideMenu\AppInfo\Application;
/**
* class CategoryRepository.
@ -36,12 +35,11 @@ class CategoryRepository
protected $iConfig;
public function __construct(
CategoryFetcher $categoryFetcher,
ConfigProxy $config,
CategoryFetcher $categoryFetcher,
ConfigProxy $config,
IConfig $iConfig,
IFactory $l10nFactory
)
{
) {
$this->categoryFetcher = $categoryFetcher;
$this->l10nFactory = $l10nFactory;
$this->config = $config;

View File

@ -18,10 +18,10 @@
namespace OCA\SideMenu\Settings;
use OCA\SideMenu\AppInfo\Application;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\Settings\IIconSection;
use OCA\SideMenu\AppInfo\Application;
class AdminSection implements IIconSection
{
@ -35,10 +35,6 @@ class AdminSection implements IIconSection
*/
private $url;
/**
* @param IURLGenerator $url
* @param IL10N $l
*/
public function __construct(IURLGenerator $url, IL10N $l)
{
$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,
* e.g. 'ldap'
* e.g. 'ldap'.
*
* @returns string
*/
@ -69,8 +65,8 @@ class AdminSection implements IIconSection
/**
* @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 priority values. It is required to return a value between 0 and 99.
* 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.
*
* E.g.: 70
*/

View File

@ -18,10 +18,10 @@
namespace OCA\SideMenu\Settings;
use OCA\SideMenu\AppInfo\Application;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\Settings\IIconSection;
use OCA\SideMenu\AppInfo\Application;
class PersonalSection implements IIconSection
{
@ -35,10 +35,6 @@ class PersonalSection implements IIconSection
*/
private $url;
/**
* @param IURLGenerator $url
* @param IL10N $l
*/
public function __construct(IURLGenerator $url, IL10N $l)
{
$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,
* e.g. 'ldap'
* e.g. 'ldap'.
*
* @returns string
*/
@ -69,8 +65,8 @@ class PersonalSection implements IIconSection
/**
* @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 priority values. It is required to return a value between 0 and 99.
* 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.
*
* E.g.: 70
*/