Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/apporder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Haertl <jus@bitgrid.net>2016-09-04 20:57:30 +0300
committerJulius Haertl <jus@bitgrid.net>2016-09-04 21:19:34 +0300
commit064cb4ae7a3bae3bea9be7b36171817ba4fa4e68 (patch)
tree7f8593ef15dfe1573b2a20fdf25456fafed7adbf
parent1f8666706c1eed584f44a70912eba3015f5b6894 (diff)
Update .scrutinizer.yml
-rw-r--r--.scrutinizer.yml6
-rw-r--r--lib/Controller/AppController.php5
-rw-r--r--lib/Util.php20
3 files changed, 19 insertions, 12 deletions
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index 1d9bf98..27e2311 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -2,20 +2,18 @@ filter:
excluded_paths:
- 'templates/*'
- 'css/*'
+ - 'tests/*'
imports:
- php
- javascript
tools:
external_code_coverage:
- timeout: 300
+ timeout: 3600
checks:
php:
- # not helpful because there is no setting to tweek the threshold
- duplication: false
# this is not working properly with core exceptions
catch_class_exists: false
- avoid_tab_indentation: true
line_length:
max_length: '80'
diff --git a/lib/Controller/AppController.php b/lib/Controller/AppController.php
index 99b3815..426a028 100644
--- a/lib/Controller/AppController.php
+++ b/lib/Controller/AppController.php
@@ -36,7 +36,10 @@ class AppController extends Controller {
private $urlGenerator;
private $util;
- public function __construct($appName, IRequest $request, IURLGenerator $urlGenerator, Util $util, $userId) {
+ public function __construct($appName,
+ IRequest $request,
+ IURLGenerator $urlGenerator,
+ Util $util, $userId) {
parent::__construct($appName, $request);
$this->userId = $userId;
$this->urlGenerator = $urlGenerator;
diff --git a/lib/Util.php b/lib/Util.php
index f1934d1..1d6cd69 100644
--- a/lib/Util.php
+++ b/lib/Util.php
@@ -38,24 +38,30 @@ class Util {
public function getAppOrder() {
$order_user = $this->appConfig->getUserValue('order', $this->userId);
$order_default = $this->appConfig->getAppValue('order');
- if ($order_user !== null && $order_user !== "")
+ if ($order_user !== null && $order_user !== "") {
$order = $order_user;
- else
+ } else {
$order = $order_default;
+ }
return $order;
}
public function matchOrder($nav, $order) {
$nav_tmp = array();
$result = array();
- foreach ($nav as $app)
+ foreach ($nav as $app) {
$nav_tmp[$app['href']] = $app;
- foreach ($order as $app)
- if(array_key_exists($app, $nav_tmp))
+ }
+ foreach ($order as $app) {
+ if (array_key_exists($app, $nav_tmp)) {
$result[$app] = $nav_tmp[$app];
- foreach ($nav as $app)
- if (!array_key_exists($app['href'], $result))
+ }
+ }
+ foreach ($nav as $app) {
+ if (!array_key_exists($app['href'], $result)) {
$result[$app['href']] = $app;
+ }
+ }
return $result;
}