* @param int $offset
* @return \OC\Group\Group[]
*/
- public function search($search, $limit = null, $offset = null) {
+ public function search(string $search, int $limit = -1, int $offset = 0) {
$groups = [];
foreach ($this->backends as $backend) {
$groupIds = $backend->getGroups($search, $limit, $offset);
$this->logger->debug('Group "' . $groupId . '" was returned by search but not found through direct access', ['app' => 'core']);
}
}
- if (!is_null($limit) and $limit <= 0) {
+ if ($limit === 0) {
return array_values($groups);
}
}
* @return \OCP\IGroup[]
* @since 8.0.0
*/
- public function search($search, $limit = null, $offset = null);
+ public function search(string $search, int $limit = -1, int $offset = 0);
/**
* @param \OCP\IUser|null $user