Skip to content

Commit

Permalink
Use implementations instead of interfaces for accessing private methods
Browse files Browse the repository at this point in the history
Signed-off-by: jld3103 <jld3103yt@gmail.com>
  • Loading branch information
provokateurin committed Mar 29, 2023
1 parent 8ee52d3 commit 140c409
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
5 changes: 2 additions & 3 deletions apps/dav/lib/CalDAV/CachedSubscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
namespace OCA\DAV\CalDAV;

use OCA\DAV\Exception\UnsupportedLimitOnInitialSyncException;
use Sabre\CalDAV\Backend\BackendInterface;
use Sabre\DAV\Exception\MethodNotAllowed;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\INode;
Expand All @@ -38,7 +37,7 @@
* Class CachedSubscription
*
* @package OCA\DAV\CalDAV
* @property BackendInterface|CalDavBackend $caldavBackend
* @property CalDavBackend $caldavBackend
*/
class CachedSubscription extends \Sabre\CalDAV\Calendar {

Expand Down Expand Up @@ -112,7 +111,7 @@ public function getOwner() {
return parent::getOwner();
}


public function delete() {
$this->caldavBackend->deleteSubscription($this->calendarInfo['id']);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/CardDAV/AddressBook.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* Class AddressBook
*
* @package OCA\DAV\CardDAV
* @property BackendInterface|CardDavBackend $carddavBackend
* @property CardDavBackend $carddavBackend
*/
class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {

Expand Down
2 changes: 1 addition & 1 deletion apps/provisioning_api/lib/Controller/AUserData.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ abstract class AUserData extends OCSController {
protected $userManager;
/** @var IConfig */
protected $config;
/** @var IGroupManager|Manager */ // FIXME Requires a method that is not on the interface
/** @var Manager */
protected $groupManager;
/** @var IUserSession */
protected $userSession;
Expand Down
2 changes: 1 addition & 1 deletion core/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class LoginController extends Controller {
private IUserManager $userManager;
private IConfig $config;
private ISession $session;
/** @var IUserSession|Session */
/** @var Session */
private $userSession;
private IURLGenerator $urlGenerator;
private Defaults $defaults;
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Collaboration/Resources/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
use OCP\IUser;

class Collection implements ICollection {
/** @var IManager|Manager */
/** @var Manager */
protected $manager;

/** @var IDBConnection */
Expand Down
2 changes: 1 addition & 1 deletion lib/private/NavigationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class NavigationManager implements INavigationManager {
private $l10nFac;
/** @var IUserSession */
private $userSession;
/** @var IGroupManager|Manager */
/** @var Manager */
private $groupManager;
/** @var IConfig */
private $config;
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Repair/NC16/ClearCollectionsAccessCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ClearCollectionsAccessCache implements IRepairStep {
/** @var IConfig */
private $config;

/** @var IManager|Manager */
/** @var Manager */
private $manager;

public function __construct(IConfig $config, IManager $manager) {
Expand Down
3 changes: 1 addition & 2 deletions lib/private/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
*/
namespace OC;

use OCP\App\IAppManager;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\HintException;
Expand Down Expand Up @@ -274,7 +273,7 @@ private function doUpgrade(string $currentVersion, string $installedVersion): vo
// Update the appfetchers version so it downloads the correct list from the appstore
\OC::$server->getAppFetcher()->setVersion($currentVersion);

/** @var IAppManager|AppManager $appManager */
/** @var AppManager $appManager */
$appManager = \OC::$server->getAppManager();

// upgrade appstore apps
Expand Down

0 comments on commit 140c409

Please sign in to comment.