Skip to content

Commit f976fd9

Browse files
authored
Merge pull request #191 from pdsinterop/fix/php-codesniffer
Fix/php codesniffer
2 parents 8d4f04d + 2439b1c commit f976fd9

5 files changed

Lines changed: 12 additions & 15 deletions

File tree

solid/appinfo/routes.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
<?php
2-
3-
use OC\AllConfig;
4-
use OC\AppConfig;
5-
use OCA\Solid\AppInfo\Application;
6-
use OCP\IConfig;
7-
use OCP\IRequest;
8-
92
/**
103
* Create your routes in here. The name is the lowercase name of the controller
114
* without the controller part, the stuff after the hash is the method.
@@ -15,6 +8,12 @@
158
* it's instantiated in there
169
*/
1710

11+
use OC\AllConfig;
12+
use OC\AppConfig;
13+
use OCA\Solid\AppInfo\Application;
14+
use OCP\IConfig;
15+
use OCP\IRequest;
16+
1817
$routes = [
1918
['name' => 'page#approval', 'url' => '/sharing/{clientId}', 'verb' => 'GET'],
2019
['name' => 'page#handleRevoke', 'url' => '/revoke/{clientId}', 'verb' => 'DELETE'],

solid/lib/BaseServerConfig.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use OCP\IConfig;
66

77
class BaseServerConfig {
8-
98
////////////////////////////// CLASS PROPERTIES \\\\\\\\\\\\\\\\\\\\\\\\\\\\
109

1110
public const ERROR_INVALID_ARGUMENT = 'Invalid %s for %s: %s. Must be one of %s.';

solid/lib/Controller/AppController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ class AppController extends Controller {
2323
private $userId;
2424
private $userManager;
2525

26-
public function __construct($AppName, IRequest $request, IConfig $config, IUserManager $userManager, IManager $contactsManager, IURLGenerator $urlGenerator, $userId
27-
){
26+
public function __construct($AppName, IRequest $request, IConfig $config, IUserManager $userManager, IManager $contactsManager, IURLGenerator $urlGenerator, $userId) {
2827
parent::__construct($AppName, $request);
2928
$this->userId = $userId;
3029
$this->userManager = $userManager;

solid/lib/Controller/GetStorageUrlTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function getStorageUrl($userId) {
5050
}
5151

5252
$url['host'] = $userId . '.' . $url['host']; // $storageUrl = $userId . '.' . $storageUrl;
53-
$storageUrl = $this->build_url($url);
53+
$storageUrl = $this->buildUrl($url);
5454
}
5555

5656
return $storageUrl;
@@ -79,7 +79,7 @@ public function validateUrl(RequestInterface $request): bool {
7979

8080
////////////////////////////// UTILITY METHODS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\
8181

82-
private function build_url(array $parts) {
82+
private function buildUrl(array $parts) {
8383
// @FIXME: Replace with existing more robust URL builder
8484
return (isset($parts['scheme']) ? "{$parts['scheme']}:" : '') .
8585
(isset($parts['host']) ? "//{$parts['host']}" : '') .

solid/tests/Unit/Controller/GetStorageUrlTraitTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class GetStorageUrlTraitTest extends TestCase
2020
{
2121
////////////////////////////////// FIXTURES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
2222

23-
const MOCK_URL = 'mock url';
24-
const MOCK_USER_ID = 'mock user id';
23+
private const MOCK_URL = 'mock url';
24+
private const MOCK_USER_ID = 'mock user id';
2525

2626
private $trait;
2727

@@ -83,7 +83,7 @@ public function testGetStorageUrlWithUserSubDomainsDisabled($url, $userId, $expe
8383
/**
8484
* @testdox GetStorageUrlTrait should return a string when called with a UrlGenerator and Configuration
8585
* @covers ::getStorageUrl
86-
* @covers ::build_url
86+
* @covers ::buildUrl
8787
*
8888
* @dataProvider provideSubDomainsEnabledUrls
8989
*/

0 commit comments

Comments
 (0)