Skip to content

Commit

Permalink
clean up return and param values
Browse files Browse the repository at this point in the history
  • Loading branch information
summersab committed Aug 25, 2023
1 parent 613cd16 commit f8c8093
Show file tree
Hide file tree
Showing 23 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/CalDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -2602,7 +2602,7 @@ public function deleteSubscription($subscriptionId) {
*
* @param string $principalUri
* @param string $objectUri
* @return array
* @return array|null
*/
public function getSchedulingObject($principalUri, $objectUri) {
$query = $this->db->getQueryBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function getPrincipalsByPrefix($prefixPath): array {
*
* @param string $prefixPath
*
* @return array
* @return array|null
*/
public function getPrincipalByPath($path) {
if (strpos($path, $this->principalPrefix) !== 0) {
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/CardDAV/CardDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ public function getCards($addressbookId) {
*
* @param mixed $addressBookId
* @param string $cardUri
* @return array
* @return array|false
*/
public function getCard($addressBookId, $cardUri) {
$query = $this->db->getQueryBuilder();
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public function getSupportedReportSet($uri) {
public function onReport($reportName, $report, $uri) {
$reportTargetNode = $this->server->tree->getNodeForPath($uri);
if (!$reportTargetNode instanceof Directory || $reportName !== self::REPORT_NAME) {
return;
return false;
}

$ns = '{' . $this::NS_OWNCLOUD . '}';
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/Principal.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function getPrincipalsByPrefix($prefixPath) {
* getPrincipalsByPrefix.
*
* @param string $path
* @return array
* @return array|null
*/
public function getPrincipalByPath($path) {
[$prefix, $name] = \Sabre\Uri\split($path);
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/TagsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private function getTagsAndFav($fileId) {
* Returns tags for the given file id
*
* @param integer $fileId file id
* @return array list of tags for that file
* @return array|null list of tags for that file
*/
private function getTags($fileId) {
if (isset($this->cachedTags[$fileId])) {
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/DAV/GroupPrincipalBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function getPrincipalsByPrefix($prefixPath) {
* getPrincipalsByPrefix.
*
* @param string $path
* @return array
* @return array|null
*/
public function getPrincipalByPath($path) {
$elements = explode('/', $path, 3);
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/DAV/SystemPrincipalBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function getPrincipalsByPrefix($prefixPath) {
* getPrincipalsByPrefix.
*
* @param string $path
* @return array
* @return array|null
*/
public function getPrincipalByPath($path) {
if ($path === 'principals/system/system') {
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Config/ListConfigs.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected function getSystemConfigs($noSensitiveValues) {
*/
protected function getAppConfigs($app, $noSensitiveValues) {
if ($noSensitiveValues) {
return $this->appConfig->getFilteredValues($app, false);
return $this->appConfig->getFilteredValues($app);
} else {
return $this->appConfig->getValues($app, false);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/private/App/AppStore/Fetcher/Fetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function get($allowUnstable = false) {

// Refresh the file content
try {
$responseJson = $this->fetch($ETag, $content, $allowUnstable);
$responseJson = $this->fetch($ETag, $content);

if (empty($responseJson)) {
return [];
Expand Down
2 changes: 1 addition & 1 deletion lib/private/App/InfoParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ private function isNavigationItem($data): bool {

/**
* @param \SimpleXMLElement $xml
* @return array
* @return array|string
*/
public function xmlToArray($xml) {
if (!$xml->children()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Comments/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ public function searchForObjects(string $search, string $objectType, array $obje
* @param \DateTime $notOlderThan optional, timestamp of the oldest comments
* that may be returned
* @param string $verb Limit the verb of the comment - Added in 14.0.0
* @return Int
* @return int
* @since 9.0.0
*/
public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null, $verb = '') {
Expand Down
6 changes: 3 additions & 3 deletions lib/private/ContactsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function search($pattern, $searchProperties = [], $options = []) {
*
* @param int $id the unique identifier to a contact
* @param string $address_book_key identifier of the address book in which the contact shall be deleted
* @return bool successful or not
* @return bool|null successful or not
*/
public function delete($id, $address_book_key) {
$addressBook = $this->getAddressBook($address_book_key);
Expand All @@ -113,7 +113,7 @@ public function delete($id, $address_book_key) {
*
* @param array $properties this array if key-value-pairs defines a contact
* @param string $address_book_key identifier of the address book in which the contact shall be created or updated
* @return array representing the contact just created or updated
* @return array|null representing the contact just created or updated
*/
public function createOrUpdate($properties, $address_book_key) {
$addressBook = $this->getAddressBook($address_book_key);
Expand Down Expand Up @@ -194,7 +194,7 @@ public function register(\Closure $callable) {
* Get (and load when needed) the address book for $key
*
* @param string $addressBookKey
* @return IAddressBook
* @return IAddressBook|null
*/
protected function getAddressBook($addressBookKey) {
$this->loadAddressBooks();
Expand Down
2 changes: 1 addition & 1 deletion lib/private/DB/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ protected function logQueryToFile(string $sql): void {
*
* @param string $seqName Name of the sequence object from which the ID should be returned.
*
* @return string the last inserted ID.
* @return int the last inserted ID.
* @throws Exception
*/
public function lastInsertId($seqName = null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ public function getPathById($id) {
* instead does a global search in the cache table
*
* @param int $id
* @return array first element holding the storage id, second the path
* @return array|null first element holding the storage id, second the path
* @deprecated use getPathById() instead
*/
public static function getById($id) {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Mount/ObjectHomeMountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(IConfig $config) {
*
* @param IUser $user
* @param IStorageFactory $loader
* @return \OCP\Files\Mount\IMountPoint
* @return \OCP\Files\Mount\IMountPoint|null
*/
public function getHomeMountForUser(IUser $user, IStorageFactory $loader) {
$config = $this->getMultiBucketObjectStoreConfig($user);
Expand Down
8 changes: 4 additions & 4 deletions lib/private/Share20/ProviderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected function defaultShareProvider() {
/**
* Create the federated share provider
*
* @return FederatedShareProvider
* @return FederatedShareProvider|null
*/
protected function federatedShareProvider() {
if ($this->federatedProvider === null) {
Expand Down Expand Up @@ -171,7 +171,7 @@ protected function federatedShareProvider() {
/**
* Create the federated share provider
*
* @return ShareByMailProvider
* @return ShareByMailProvider|null
*/
protected function getShareByMailProvider() {
if ($this->shareByMailProvider === null) {
Expand Down Expand Up @@ -211,7 +211,7 @@ protected function getShareByMailProvider() {
/**
* Create the circle share provider
*
* @return FederatedShareProvider
* @return FederatedShareProvider|null
*
* @suppress PhanUndeclaredClassMethod
*/
Expand Down Expand Up @@ -245,7 +245,7 @@ protected function getShareByCircleProvider() {
/**
* Create the room share provider
*
* @return RoomShareProvider
* @return RoomShareProvider|null
*/
protected function getRoomShareProvider() {
if ($this->roomShareProvider === null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/TagManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct(TagMapper $mapper, IUserSession $userSession, IDBCon
* @param boolean $includeShared Whether to include tags for items shared with this user by others.
* @param string $userId user for which to retrieve the tags, defaults to the currently
* logged in user
* @return \OCP\ITags
* @return \OCP\ITags|null
*
* since 20.0.0 $includeShared isn't used anymore
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/private/User/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public function searchKnownUsersByDisplayName(string $searcher, string $pattern,
*
* @param string $loginName The loginname
* @param string $password The password
* @return string
* @return string|false
*
* Check if the password is correct without logging in the user
* returns the user id or false
Expand Down
2 changes: 1 addition & 1 deletion lib/private/legacy/OC_API.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected static function isV2(\OCP\IRequest $request) {

/**
* @param integer $sc
* @return int
* @return int|null
*/
public static function mapStatusCodes($sc) {
switch ($sc) {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/legacy/OC_App.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public function enable(string $appId,
/**
* Get the path where to install apps
*
* @return string|false
* @return string|false|null
*/
public static function getInstallPath() {
foreach (OC::$APPSROOTS as $dir) {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/legacy/OC_Defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function getEntity() {
*/
public function getSlogan(?string $lang = null) {
if ($this->themeExist('getSlogan')) {
return $this->theme->getSlogan($lang);
return $this->theme->getSlogan();
} else {
if ($this->defaultSlogan === null) {
$l10n = \OC::$server->getL10N('lib', $lang);
Expand Down
2 changes: 1 addition & 1 deletion lib/public/Comments/ICommentsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public function searchForObjects(string $search, string $objectType, array $obje
* @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments
* that may be returned
* @param string $verb Limit the verb of the comment - Added in 14.0.0
* @return Int
* @return int
* @since 9.0.0
*/
public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null, $verb = '');
Expand Down

0 comments on commit f8c8093

Please sign in to comment.