add PSR 2 compliance
This commit is contained in:
@@ -22,9 +22,6 @@ class AppRepository
|
||||
*/
|
||||
protected $l10nFactory;
|
||||
|
||||
/**
|
||||
* @param OC_App $ocApp
|
||||
*/
|
||||
public function __construct(OC_App $ocApp, IFactory $l10nFactory)
|
||||
{
|
||||
$this->ocApp = $ocApp;
|
||||
@@ -38,8 +35,8 @@ class AppRepository
|
||||
*/
|
||||
public function getVisibleApps()
|
||||
{
|
||||
$navigation = $this->ocApp->getNavigation();
|
||||
$apps = $this->ocApp->listAllApps();
|
||||
$navigation = $this->ocApp->getNavigation();
|
||||
$apps = $this->ocApp->listAllApps();
|
||||
$visibleApps = [];
|
||||
|
||||
foreach ($apps as $app) {
|
||||
@@ -53,7 +50,7 @@ class AppRepository
|
||||
}
|
||||
|
||||
foreach ($navigation as $app) {
|
||||
if (substr($app['id'], 0, 14) === 'external_index') {
|
||||
if ('external_index' === substr($app['id'], 0, 14)) {
|
||||
$visibleApps[$app['id']] = [
|
||||
'id' => $app['id'],
|
||||
'name' => $this->l10nFactory->get($app['id'])->t($app['name']),
|
||||
@@ -63,7 +60,7 @@ class AppRepository
|
||||
'external_links',
|
||||
],
|
||||
];
|
||||
} elseif ($app['id'] === 'files') {
|
||||
} elseif ('files' === $app['id']) {
|
||||
$visibleApps[$app['id']] = [
|
||||
'id' => $app['id'],
|
||||
'name' => $this->l10nFactory->get($app['id'])->t($app['name']),
|
||||
@@ -74,7 +71,7 @@ class AppRepository
|
||||
}
|
||||
}
|
||||
|
||||
usort($visibleApps, function($a, $b) {
|
||||
usort($visibleApps, function ($a, $b) {
|
||||
return ($a['name'] < $b['name']) ? -1 : 1;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user