Skip to content

Commit

Permalink
Add visibility to all constants
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 1584c9a commit 28f8eb5
Show file tree
Hide file tree
Showing 228 changed files with 774 additions and 774 deletions.
2 changes: 1 addition & 1 deletion apps/comments/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
use OCP\Util;

class Application extends App {
const APP_ID = 'comments';
public const APP_ID = 'comments';

public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams);
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
use Symfony\Component\EventDispatcher\GenericEvent;

class Application extends App {
const APP_ID = 'dav';
public const APP_ID = 'dav';

/**
* Application constructor.
Expand Down
18 changes: 9 additions & 9 deletions apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
use OCP\L10N\IFactory;

class Calendar extends Base {
const SUBJECT_ADD = 'calendar_add';
const SUBJECT_UPDATE = 'calendar_update';
const SUBJECT_DELETE = 'calendar_delete';
const SUBJECT_PUBLISH = 'calendar_publish';
const SUBJECT_UNPUBLISH = 'calendar_unpublish';
const SUBJECT_SHARE_USER = 'calendar_user_share';
const SUBJECT_SHARE_GROUP = 'calendar_group_share';
const SUBJECT_UNSHARE_USER = 'calendar_user_unshare';
const SUBJECT_UNSHARE_GROUP = 'calendar_group_unshare';
public const SUBJECT_ADD = 'calendar_add';
public const SUBJECT_UPDATE = 'calendar_update';
public const SUBJECT_DELETE = 'calendar_delete';
public const SUBJECT_PUBLISH = 'calendar_publish';
public const SUBJECT_UNPUBLISH = 'calendar_unpublish';
public const SUBJECT_SHARE_USER = 'calendar_user_share';
public const SUBJECT_SHARE_GROUP = 'calendar_group_share';
public const SUBJECT_UNSHARE_USER = 'calendar_user_unshare';
public const SUBJECT_UNSHARE_GROUP = 'calendar_group_unshare';

/** @var IFactory */
protected $languageFactory;
Expand Down
6 changes: 3 additions & 3 deletions apps/dav/lib/CalDAV/Activity/Provider/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
use OCP\L10N\IFactory;

class Event extends Base {
const SUBJECT_OBJECT_ADD = 'object_add';
const SUBJECT_OBJECT_UPDATE = 'object_update';
const SUBJECT_OBJECT_DELETE = 'object_delete';
public const SUBJECT_OBJECT_ADD = 'object_add';
public const SUBJECT_OBJECT_UPDATE = 'object_update';
public const SUBJECT_OBJECT_DELETE = 'object_delete';

/** @var IFactory */
protected $languageFactory;
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* @package OCA\DAV\CalDAV\BirthdayCalendar
*/
class EnablePlugin extends ServerPlugin {
const NS_Nextcloud = 'http://nextcloud.com/ns';
public const NS_Nextcloud = 'http://nextcloud.com/ns';

/**
* @var IConfig
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/BirthdayService.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* @package OCA\DAV\CalDAV
*/
class BirthdayService {
const BIRTHDAY_CALENDAR_URI = 'contact_birthdays';
public const BIRTHDAY_CALENDAR_URI = 'contact_birthdays';

/** @var GroupPrincipalBackend */
private $principalBackend;
Expand Down
22 changes: 11 additions & 11 deletions apps/dav/lib/CalDAV/CalDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@
* @package OCA\DAV\CalDAV
*/
class CalDavBackend extends AbstractBackend implements SyncSupport, SubscriptionSupport, SchedulingSupport {
const CALENDAR_TYPE_CALENDAR = 0;
const CALENDAR_TYPE_SUBSCRIPTION = 1;
public const CALENDAR_TYPE_CALENDAR = 0;
public const CALENDAR_TYPE_SUBSCRIPTION = 1;

const PERSONAL_CALENDAR_URI = 'personal';
const PERSONAL_CALENDAR_NAME = 'Personal';
public const PERSONAL_CALENDAR_URI = 'personal';
public const PERSONAL_CALENDAR_NAME = 'Personal';

const RESOURCE_BOOKING_CALENDAR_URI = 'calendar';
const RESOURCE_BOOKING_CALENDAR_NAME = 'Calendar';
public const RESOURCE_BOOKING_CALENDAR_URI = 'calendar';
public const RESOURCE_BOOKING_CALENDAR_NAME = 'Calendar';

/**
* We need to specify a max date, because we need to stop *somewhere*
Expand All @@ -94,12 +94,12 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* in 2038-01-19 to avoid problems when the date is converted
* to a unix timestamp.
*/
const MAX_DATE = '2038-01-01';
public const MAX_DATE = '2038-01-01';

const ACCESS_PUBLIC = 4;
const CLASSIFICATION_PUBLIC = 0;
const CLASSIFICATION_PRIVATE = 1;
const CLASSIFICATION_CONFIDENTIAL = 2;
public const ACCESS_PUBLIC = 4;
public const CLASSIFICATION_PUBLIC = 0;
public const CLASSIFICATION_PRIVATE = 1;
public const CLASSIFICATION_CONFIDENTIAL = 2;

/**
* List of CalDAV properties, and how they map to database field names
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
namespace OCA\DAV\CalDAV;

class Plugin extends \Sabre\CalDAV\Plugin {
const SYSTEM_CALENDAR_ROOT = 'system-calendars';
public const SYSTEM_CALENDAR_ROOT = 'system-calendars';

/**
* Returns the path to a principal's calendar home.
Expand Down
4 changes: 2 additions & 2 deletions apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
* @package OCA\DAV\CalDAV\Proxy
*/
class ProxyMapper extends QBMapper {
const PERMISSION_READ = 1;
const PERMISSION_WRITE = 2;
public const PERMISSION_READ = 1;
public const PERMISSION_WRITE = 2;

/**
* ProxyMapper constructor.
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
use Sabre\HTTP\ResponseInterface;

class PublishPlugin extends ServerPlugin {
const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';
public const NS_CALENDARSERVER = 'http://calendarserver.org/ns/';

/**
* Reference to SabreDAV server object.
Expand Down
8 changes: 4 additions & 4 deletions apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ class IMipPlugin extends SabreIMipPlugin {
/** @var IUserManager */
private $userManager;

const MAX_DATE = '2038-01-01';
public const MAX_DATE = '2038-01-01';

const METHOD_REQUEST = 'request';
const METHOD_REPLY = 'reply';
const METHOD_CANCEL = 'cancel';
public const METHOD_REQUEST = 'request';
public const METHOD_REPLY = 'reply';
public const METHOD_CANCEL = 'cancel';

/**
* @param IConfig $config
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/Search/SearchPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use Sabre\DAV\ServerPlugin;

class SearchPlugin extends ServerPlugin {
const NS_Nextcloud = 'http://nextcloud.com/ns';
public const NS_Nextcloud = 'http://nextcloud.com/ns';

/**
* Reference to SabreDAV server object.
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Plugin extends ServerPlugin {
*
* @var string[]
*/
const ENABLE_FOR_CLIENTS = [];
public const ENABLE_FOR_CLIENTS = [];

/**
* @var bool
Expand Down
4 changes: 2 additions & 2 deletions apps/dav/lib/CardDAV/CardDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
use Symfony\Component\EventDispatcher\GenericEvent;

class CardDavBackend implements BackendInterface, SyncSupport {
const PERSONAL_ADDRESSBOOK_URI = 'contacts';
const PERSONAL_ADDRESSBOOK_NAME = 'Contacts';
public const PERSONAL_ADDRESSBOOK_URI = 'contacts';
public const PERSONAL_ADDRESSBOOK_NAME = 'Contacts';

/** @var Principal */
private $principalBackend;
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/CardDAV/Xml/Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use Sabre\Xml\XmlSerializable;

class Groups implements XmlSerializable {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';

/** @var string[] of TYPE:CHECKSUM */
private $groups;
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Command/MoveCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MoveCalendar extends Command {
/** @var CalDavBackend */
private $calDav;

const URI_USERS = 'principals/users/';
public const URI_USERS = 'principals/users/';

/**
* @param IUserManager $userManager
Expand Down
18 changes: 9 additions & 9 deletions apps/dav/lib/Comments/CommentNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
use Sabre\DAV\PropPatch;

class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';

const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}isUnread';
const PROPERTY_NAME_MESSAGE = '{http://owncloud.org/ns}message';
const PROPERTY_NAME_ACTOR_DISPLAYNAME = '{http://owncloud.org/ns}actorDisplayName';
const PROPERTY_NAME_MENTIONS = '{http://owncloud.org/ns}mentions';
const PROPERTY_NAME_MENTION = '{http://owncloud.org/ns}mention';
const PROPERTY_NAME_MENTION_TYPE = '{http://owncloud.org/ns}mentionType';
const PROPERTY_NAME_MENTION_ID = '{http://owncloud.org/ns}mentionId';
const PROPERTY_NAME_MENTION_DISPLAYNAME = '{http://owncloud.org/ns}mentionDisplayName';
public const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}isUnread';
public const PROPERTY_NAME_MESSAGE = '{http://owncloud.org/ns}message';
public const PROPERTY_NAME_ACTOR_DISPLAYNAME = '{http://owncloud.org/ns}actorDisplayName';
public const PROPERTY_NAME_MENTIONS = '{http://owncloud.org/ns}mentions';
public const PROPERTY_NAME_MENTION = '{http://owncloud.org/ns}mention';
public const PROPERTY_NAME_MENTION_TYPE = '{http://owncloud.org/ns}mentionType';
public const PROPERTY_NAME_MENTION_ID = '{http://owncloud.org/ns}mentionId';
public const PROPERTY_NAME_MENTION_DISPLAYNAME = '{http://owncloud.org/ns}mentionDisplayName';

/** @var IComment */
public $comment;
Expand Down
10 changes: 5 additions & 5 deletions apps/dav/lib/Comments/CommentsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
*/
class CommentsPlugin extends ServerPlugin {
// namespace
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';

const REPORT_NAME = '{http://owncloud.org/ns}filter-comments';
const REPORT_PARAM_LIMIT = '{http://owncloud.org/ns}limit';
const REPORT_PARAM_OFFSET = '{http://owncloud.org/ns}offset';
const REPORT_PARAM_TIMESTAMP = '{http://owncloud.org/ns}datetime';
public const REPORT_NAME = '{http://owncloud.org/ns}filter-comments';
public const REPORT_PARAM_LIMIT = '{http://owncloud.org/ns}limit';
public const REPORT_PARAM_OFFSET = '{http://owncloud.org/ns}offset';
public const REPORT_PARAM_TIMESTAMP = '{http://owncloud.org/ns}datetime';

/** @var ICommentsManager */
protected $commentsManager;
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Comments/EntityCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* @package OCA\DAV\Comments
*/
class EntityCollection extends RootCollection implements IProperties {
const PROPERTY_NAME_READ_MARKER = '{http://owncloud.org/ns}readMarker';
public const PROPERTY_NAME_READ_MARKER = '{http://owncloud.org/ns}readMarker';

/** @var string */
protected $id;
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
use Sabre\HTTP\ResponseInterface;

class Auth extends AbstractBasic {
const DAV_AUTHENTICATED = 'AUTHENTICATED_TO_DAV_BACKEND';
public const DAV_AUTHENTICATED = 'AUTHENTICATED_TO_DAV_BACKEND';

/** @var ISession */
private $session;
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/ChecksumList.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* checksum name.
*/
class ChecksumList implements XmlSerializable {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';

/** @var string[] of TYPE:CHECKSUM */
private $checksums;
Expand Down
6 changes: 3 additions & 3 deletions apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
use Sabre\DAV\ServerPlugin;

class CommentPropertiesPlugin extends ServerPlugin {
const PROPERTY_NAME_HREF = '{http://owncloud.org/ns}comments-href';
const PROPERTY_NAME_COUNT = '{http://owncloud.org/ns}comments-count';
const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}comments-unread';
public const PROPERTY_NAME_HREF = '{http://owncloud.org/ns}comments-href';
public const PROPERTY_NAME_COUNT = '{http://owncloud.org/ns}comments-count';
public const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}comments-unread';

/** @var \Sabre\DAV\Server */
protected $server;
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/Exception/Forbidden.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace OCA\DAV\Connector\Sabre\Exception;

class Forbidden extends \Sabre\DAV\Exception\Forbidden {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';

/**
* @var bool
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use Sabre\DAV\Exception;

class InvalidPath extends Exception {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';

/**
* @var bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use Sabre\DAV\Server;

class PasswordLoginForbidden extends NotAuthenticated {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';

public function getHTTPCode() {
return 401;
Expand Down
44 changes: 22 additions & 22 deletions apps/dav/lib/Connector/Sabre/FilesPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,28 @@
class FilesPlugin extends ServerPlugin {

// namespace
const NS_OWNCLOUD = 'http://owncloud.org/ns';
const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
const FILEID_PROPERTYNAME = '{http://owncloud.org/ns}id';
const INTERNAL_FILEID_PROPERTYNAME = '{http://owncloud.org/ns}fileid';
const PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}permissions';
const SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-collaboration-services.org/ns}share-permissions';
const OCM_SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-cloud-mesh.org/ns}share-permissions';
const DOWNLOADURL_PROPERTYNAME = '{http://owncloud.org/ns}downloadURL';
const SIZE_PROPERTYNAME = '{http://owncloud.org/ns}size';
const GETETAG_PROPERTYNAME = '{DAV:}getetag';
const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified';
const OWNER_ID_PROPERTYNAME = '{http://owncloud.org/ns}owner-id';
const OWNER_DISPLAY_NAME_PROPERTYNAME = '{http://owncloud.org/ns}owner-display-name';
const CHECKSUMS_PROPERTYNAME = '{http://owncloud.org/ns}checksums';
const DATA_FINGERPRINT_PROPERTYNAME = '{http://owncloud.org/ns}data-fingerprint';
const HAS_PREVIEW_PROPERTYNAME = '{http://nextcloud.org/ns}has-preview';
const MOUNT_TYPE_PROPERTYNAME = '{http://nextcloud.org/ns}mount-type';
const IS_ENCRYPTED_PROPERTYNAME = '{http://nextcloud.org/ns}is-encrypted';
const METADATA_ETAG_PROPERTYNAME = '{http://nextcloud.org/ns}metadata_etag';
const UPLOAD_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}upload_time';
const CREATION_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}creation_time';
const SHARE_NOTE = '{http://nextcloud.org/ns}note';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
public const FILEID_PROPERTYNAME = '{http://owncloud.org/ns}id';
public const INTERNAL_FILEID_PROPERTYNAME = '{http://owncloud.org/ns}fileid';
public const PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}permissions';
public const SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-collaboration-services.org/ns}share-permissions';
public const OCM_SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-cloud-mesh.org/ns}share-permissions';
public const DOWNLOADURL_PROPERTYNAME = '{http://owncloud.org/ns}downloadURL';
public const SIZE_PROPERTYNAME = '{http://owncloud.org/ns}size';
public const GETETAG_PROPERTYNAME = '{DAV:}getetag';
public const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified';
public const OWNER_ID_PROPERTYNAME = '{http://owncloud.org/ns}owner-id';
public const OWNER_DISPLAY_NAME_PROPERTYNAME = '{http://owncloud.org/ns}owner-display-name';
public const CHECKSUMS_PROPERTYNAME = '{http://owncloud.org/ns}checksums';
public const DATA_FINGERPRINT_PROPERTYNAME = '{http://owncloud.org/ns}data-fingerprint';
public const HAS_PREVIEW_PROPERTYNAME = '{http://nextcloud.org/ns}has-preview';
public const MOUNT_TYPE_PROPERTYNAME = '{http://nextcloud.org/ns}mount-type';
public const IS_ENCRYPTED_PROPERTYNAME = '{http://nextcloud.org/ns}is-encrypted';
public const METADATA_ETAG_PROPERTYNAME = '{http://nextcloud.org/ns}metadata_etag';
public const UPLOAD_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}upload_time';
public const CREATION_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}creation_time';
public const SHARE_NOTE = '{http://nextcloud.org/ns}note';

/**
* Reference to main server object
Expand Down
8 changes: 4 additions & 4 deletions apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
class FilesReportPlugin extends ServerPlugin {

// namespace
const NS_OWNCLOUD = 'http://owncloud.org/ns';
const REPORT_NAME = '{http://owncloud.org/ns}filter-files';
const SYSTEMTAG_PROPERTYNAME = '{http://owncloud.org/ns}systemtag';
const CIRCLE_PROPERTYNAME = '{http://owncloud.org/ns}circle';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const REPORT_NAME = '{http://owncloud.org/ns}filter-files';
public const SYSTEMTAG_PROPERTYNAME = '{http://owncloud.org/ns}systemtag';
public const CIRCLE_PROPERTYNAME = '{http://owncloud.org/ns}circle';

/**
* Reference to main server object
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/ShareTypeList.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* This property contains multiple "share-type" elements, each containing a share type.
*/
class ShareTypeList implements Element {
const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_OWNCLOUD = 'http://owncloud.org/ns';

/**
* Share types
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/ShareeList.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* This property contains multiple "sharee" elements, each containing a share sharee
*/
class ShareeList implements XmlSerializable {
const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
public const NS_NEXTCLOUD = 'http://nextcloud.org/ns';

/** @var IShare[] */
private $shares;
Expand Down
Loading

0 comments on commit 28f8eb5

Please sign in to comment.