Skip to content

Commit

Permalink
Add visibility to all properties and move static keyword
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Apr 10, 2020
1 parent 1762a40 commit a7c8d26
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 34 deletions.
2 changes: 1 addition & 1 deletion apps/settings/lib/Controller/AuthSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class AuthSettingsController extends Controller {
private $session;

/** IUserSession */
private $userSession;
private $userSession;

/** @var string */
private $uid;
Expand Down
4 changes: 2 additions & 2 deletions apps/user_ldap/lib/Jobs/UpdateGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
use OCP\ILogger;

class UpdateGroups extends \OC\BackgroundJob\TimedJob {
static private $groupsFromDB;
private static $groupsFromDB;

static private $groupBE;
private static $groupBE;

public function __construct() {
$this->interval = self::getRefreshInterval();
Expand Down
2 changes: 1 addition & 1 deletion apps/user_ldap/lib/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
use OCA\User_LDAP\User\Manager;

abstract class Proxy {
static private $accesses = [];
private static $accesses = [];
private $ldap = null;

/** @var \OCP\ICache|null */
Expand Down
2 changes: 1 addition & 1 deletion apps/user_ldap/lib/Wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

class Wizard extends LDAPUtility {
/** @var \OCP\IL10N */
static protected $l;
protected static $l;
protected $access;
protected $cr;
protected $configuration;
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Files/Cache/QuerySearchHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* Tools for transforming search queries into database queries
*/
class QuerySearchHelper {
static protected $searchOperatorMap = [
protected static $searchOperatorMap = [
ISearchComparison::COMPARE_LIKE => 'iLike',
ISearchComparison::COMPARE_EQUAL => 'eq',
ISearchComparison::COMPARE_GREATER_THAN => 'gt',
Expand All @@ -45,7 +45,7 @@ class QuerySearchHelper {
ISearchComparison::COMPARE_LESS_THAN_EQUAL => 'lte'
];

static protected $searchOperatorNegativeMap = [
protected static $searchOperatorNegativeMap = [
ISearchComparison::COMPARE_LIKE => 'notLike',
ISearchComparison::COMPARE_EQUAL => 'neq',
ISearchComparison::COMPARE_GREATER_THAN => 'lte',
Expand Down
8 changes: 4 additions & 4 deletions lib/private/Files/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ class Filesystem {
/**
* @var \OC\Files\View $defaultInstance
*/
static private $defaultInstance;
private static $defaultInstance;

static private $usersSetup = [];
private static $usersSetup = [];

static private $normalizedPathCache = null;
private static $normalizedPathCache = null;

static private $listeningForProviders = false;
private static $listeningForProviders = false;

/**
* classname which used for hooks handling
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Search/Result/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function __construct(FileInfo $data) {
/**
* @var Folder $userFolderCache
*/
static protected $userFolderCache = null;
protected static $userFolderCache = null;

/**
* converts a path relative to the users files folder
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function __construct(
$this->installer = $installer;
}

static protected $dbSetupClasses = [
protected static $dbSetupClasses = [
'mysql' => \OC\Setup\MySQL::class,
'pgsql' => \OC\Setup\PostgreSQL::class,
'oci' => \OC\Setup\OCI::class,
Expand Down
12 changes: 6 additions & 6 deletions lib/private/legacy/OC_App.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@
* upgrading and removing apps.
*/
class OC_App {
static private $adminForms = [];
static private $personalForms = [];
static private $appTypes = [];
static private $loadedApps = [];
static private $altLogin = [];
static private $alreadyRegistered = [];
private static $adminForms = [];
private static $personalForms = [];
private static $appTypes = [];
private static $loadedApps = [];
private static $altLogin = [];
private static $alreadyRegistered = [];
const supportedApp = 300;
const officialApp = 200;

Expand Down
2 changes: 1 addition & 1 deletion lib/private/legacy/OC_Hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
class OC_Hook {
public static $thrownExceptions = [];

static private $registered = [];
private static $registered = [];

/**
* connects a function to a hook
Expand Down
1 change: 0 additions & 1 deletion lib/private/legacy/OC_Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,6 @@ public function resizeCopy(int $maxSize): IImage {
* @return bool
*/
public function copyResize($maxSize): IImage {

}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/App/AppStore/Fetcher/AppFetcherTest.php

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions tests/lib/DateTimeFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
class DateTimeFormatterTest extends TestCase {
/** @var \OC\DateTimeFormatter */
protected $formatter;
static protected $oneMinute = 60;
static protected $oneHour = 3600;
static protected $oneDay;
static protected $oneYear;
protected static $oneMinute = 60;
protected static $oneHour = 3600;
protected static $oneDay;
protected static $oneYear;

static protected $defaultTimeZone;
protected static $defaultTimeZone;

public static function setUpBeforeClass(): void {
parent::setUpBeforeClass();
Expand Down
6 changes: 3 additions & 3 deletions tests/lib/Preview/GeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,13 @@ private function getMockImage($width, $height, $data = null) {
$image->method('dataMimeType')->willReturn('image/png');
$image->method('data')->willReturn($data);

$image->method('resizeCopy')->willReturnCallback(function($size) use ($data) {
$image->method('resizeCopy')->willReturnCallback(function ($size) use ($data) {
return $this->getMockImage($size, $size, $data);
});
$image->method('preciseResizeCopy')->willReturnCallback(function($width, $height) use ($data) {
$image->method('preciseResizeCopy')->willReturnCallback(function ($width, $height) use ($data) {
return $this->getMockImage($width, $height, $data);
});
$image->method('cropCopy')->willReturnCallback(function($x, $y, $width, $height) use ($data) {
$image->method('cropCopy')->willReturnCallback(function ($x, $y, $width, $height) use ($data) {
return $this->getMockImage($width, $height, $data);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Share/ShareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public static function groupItemsTest($items) {
}

class DummyHookListener {
static $shareType = null;
public static $shareType = null;

public static function listen($params) {
self::$shareType = $params['shareType'];
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
private $commandBus;

/** @var IDBConnection */
static protected $realDatabase = null;
protected static $realDatabase = null;

/** @var bool */
static private $wasDatabaseAllowed = false;
private static $wasDatabaseAllowed = false;

/** @var array */
protected $services = [];
Expand Down

0 comments on commit a7c8d26

Please sign in to comment.