diff --git a/lib/abstractpimcollection.php b/lib/abstractpimcollection.php index b8dbe6c4..35ceb7cc 100644 --- a/lib/abstractpimcollection.php +++ b/lib/abstractpimcollection.php @@ -38,7 +38,7 @@ abstract class AbstractPIMCollection extends AbstractPIMObject implements \Itera * This is a collection so return null. * @return null */ - function getParent() { + public function getParent() { null; } @@ -49,14 +49,14 @@ abstract class AbstractPIMCollection extends AbstractPIMObject implements \Itera * @param string $id * @return IPIMObject */ - abstract function getChild($id); + public abstract function getChild($id); /** * Returns an array with all the child nodes * * @return IPIMObject[] */ - abstract function getChildren($limit = null, $offset = null); + public abstract function getChildren($limit = null, $offset = null); /** * Checks if a child-node with the specified id exists @@ -64,7 +64,7 @@ abstract class AbstractPIMCollection extends AbstractPIMObject implements \Itera * @param string $id * @return bool */ - abstract function childExists($id); + public abstract function childExists($id); /** * Add a child to the collection @@ -74,7 +74,7 @@ abstract class AbstractPIMCollection extends AbstractPIMObject implements \Itera * @param mixed $data * @return string ID of the newly added child */ - abstract public function addChild($data); + public abstract function addChild($data); /** * Delete a child from the collection @@ -82,7 +82,7 @@ abstract class AbstractPIMCollection extends AbstractPIMObject implements \Itera * @param string $id * @return bool */ - abstract public function deleteChild($id); + public abstract public function deleteChild($id); // Iterator methods diff --git a/lib/abstractpimobject.php b/lib/abstractpimobject.php index 909a7536..7acbe8bc 100644 --- a/lib/abstractpimobject.php +++ b/lib/abstractpimobject.php @@ -84,7 +84,7 @@ abstract class AbstractPIMObject implements IPIMObject { * to the parent object, otherwise return null. * @return IPIMObject|null */ - function getParent() { + public function getParent() { return $this->parent; } @@ -100,14 +100,14 @@ abstract class AbstractPIMObject implements IPIMObject { * * @return integer */ - function getPermissions() { + public function getPermissions() { return $this->permissions; } /** * @return AbstractBackend */ - function getBackend() { + public function getBackend() { return $this->backend; } @@ -115,7 +115,7 @@ abstract class AbstractPIMObject implements IPIMObject { * @param integer $permission * @return boolean */ - function hasPermission($permission) { + public function hasPermission($permission) { return $this->getPermissions() & $permission; } diff --git a/lib/addressbook.php b/lib/addressbook.php index 8ea6c448..8396faa7 100644 --- a/lib/addressbook.php +++ b/lib/addressbook.php @@ -129,7 +129,7 @@ class Addressbook extends AbstractPIMCollection { * @param string $id * @return Contact|null */ - function getChild($id) { + public function getChild($id) { //\OCP\Util::writeLog('contacts', __METHOD__.' id: '.$id, \OCP\Util::DEBUG); if(!$this->hasPermission(\OCP\PERMISSION_READ)) { throw new \Exception(self::$l10n->t('You do not have permissions to see this contacts'), 403); @@ -153,7 +153,7 @@ class Addressbook extends AbstractPIMCollection { * @param string $id * @return bool */ - function childExists($id) { + public function childExists($id) { return ($this->getChild($id) !== null); } @@ -162,7 +162,7 @@ class Addressbook extends AbstractPIMCollection { * * @return Contact[] */ - function getChildren($limit = null, $offset = null, $omitdata = false) { + public function getChildren($limit = null, $offset = null, $omitdata = false) { if(!$this->hasPermission(\OCP\PERMISSION_READ)) { throw new \Exception(self::$l10n->t('You do not have permissions to see these contacts'), 403); } diff --git a/lib/contact.php b/lib/contact.php index e39f348a..6cc47745 100644 --- a/lib/contact.php +++ b/lib/contact.php @@ -184,11 +184,11 @@ class Contact extends VObject\VCard implements IPIMObject { * to the parent object, otherwise return null. * @return IPIMObject|null */ - function getParent() { + public function getParent() { return $this->props['parent']; } - function getBackend() { + public function getBackend() { return $this->props['backend']; } @@ -196,7 +196,7 @@ class Contact extends VObject\VCard implements IPIMObject { * * @return integer */ - function getPermissions() { + public function getPermissions() { return $this->props['parent']->getPermissions(); } @@ -204,7 +204,7 @@ class Contact extends VObject\VCard implements IPIMObject { * @param integer $permission * @return bool */ - function hasPermission($permission) { + public function hasPermission($permission) { return $this->getPermissions() & $permission; } diff --git a/lib/ipimobject.php b/lib/ipimobject.php index 92ed5c78..e0bca415 100644 --- a/lib/ipimobject.php +++ b/lib/ipimobject.php @@ -69,20 +69,20 @@ interface IPIMObject { /** * @return string|null */ - function getDisplayName(); + public function getDisplayName(); /** * Get the owner of the object. * @return string|null */ - function getOwner(); + public function getOwner(); /** * If this object is part of a collection return a reference * to the parent object, otherwise return null. * @return IPIMObject|null */ - function getParent(); + public function getParent(); /** CRUDS permissions (Create, Read, Update, Delete, Share) using a bitmask of @@ -97,18 +97,18 @@ interface IPIMObject { * * @return integer */ - function getPermissions(); + public function getPermissions(); /** * @return AbstractBackend */ - function getBackend(); + public function getBackend(); /** * @param integer $permission * @return boolean */ - function hasPermission($permission); + public function hasPermission($permission); /** * @brief Get the last modification time for the object.