Merge pull request #8337 from nextcloud/use-non-alias-method

Use non aliased method instead
This commit is contained in:
Joas Schilling 2018-02-14 10:09:09 +01:00 committed by GitHub
commit c32a94b78d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 11 deletions

View File

@ -83,7 +83,7 @@ class RequestRemoteAddress implements ICheck {
} }
$decodedValue = explode('/', $value); $decodedValue = explode('/', $value);
if (sizeof($decodedValue) !== 2) { if (count($decodedValue) !== 2) {
throw new \UnexpectedValueException($this->l->t('The given IP range is invalid'), 2); throw new \UnexpectedValueException($this->l->t('The given IP range is invalid'), 2);
} }

View File

@ -64,7 +64,7 @@ class DeleteConfig extends Base {
$configNames = $input->getArgument('name'); $configNames = $input->getArgument('name');
$configName = $configNames[0]; $configName = $configNames[0];
if (sizeof($configNames) > 1) { if (count($configNames) > 1) {
if ($input->hasParameterOption('--error-if-not-exists') && !in_array($configName, $this->systemConfig->getKeys())) { if ($input->hasParameterOption('--error-if-not-exists') && !in_array($configName, $this->systemConfig->getKeys())) {
$output->writeln('<error>System config ' . implode(' => ', $configNames) . ' could not be deleted because it did not exist</error>'); $output->writeln('<error>System config ' . implode(' => ', $configNames) . ' could not be deleted because it did not exist</error>');
return 1; return 1;

View File

@ -81,7 +81,7 @@ class SetConfig extends Base {
$configValue = $this->castValue($input->getOption('value'), $input->getOption('type')); $configValue = $this->castValue($input->getOption('value'), $input->getOption('type'));
$updateOnly = $input->getOption('update-only'); $updateOnly = $input->getOption('update-only');
if (sizeof($configNames) > 1) { if (count($configNames) > 1) {
$existingValue = $this->systemConfig->getValue($configName); $existingValue = $this->systemConfig->getValue($configName);
$newValue = $this->mergeArrayValue( $newValue = $this->mergeArrayValue(

View File

@ -105,11 +105,11 @@ class CreateJs extends Command implements CompletionAwareInterface {
$jsTrans = array(); $jsTrans = array();
foreach ($translations as $id => $val) { foreach ($translations as $id => $val) {
if (is_array($val)) { if (is_array($val)) {
$val = '[ ' . join(',', $val) . ']'; $val = '[ ' . implode(',', $val) . ']';
} }
$jsTrans[] = "\"$id\" : \"$val\""; $jsTrans[] = "\"$id\" : \"$val\"";
} }
$content .= join(",\n ", $jsTrans); $content .= implode(",\n ", $jsTrans);
$content .= "\n},\n\"$plurals\");\n"; $content .= "\n},\n\"$plurals\");\n";
file_put_contents($jsFile, $content); file_put_contents($jsFile, $content);

View File

@ -61,7 +61,7 @@ class Platform {
*/ */
public function getOcVersion() { public function getOcVersion() {
$v = \OCP\Util::getVersion(); $v = \OCP\Util::getVersion();
return join('.', $v); return implode('.', $v);
} }
/** /**

View File

@ -59,7 +59,7 @@ class GroupPlugin implements ISearchPlugin {
$groups = $this->groupManager->search($search, $limit, $offset); $groups = $this->groupManager->search($search, $limit, $offset);
$groupIds = array_map(function (IGroup $group) { return $group->getGID(); }, $groups); $groupIds = array_map(function (IGroup $group) { return $group->getGID(); }, $groups);
if (!$this->shareeEnumeration || sizeof($groups) < $limit) { if (!$this->shareeEnumeration || count($groups) < $limit) {
$hasMoreResults = true; $hasMoreResults = true;
} }

View File

@ -85,7 +85,7 @@ class UserPlugin implements ISearchPlugin {
$this->takeOutCurrentUser($users); $this->takeOutCurrentUser($users);
if (!$this->shareeEnumeration || sizeof($users) < $limit) { if (!$this->shareeEnumeration || count($users) < $limit) {
$hasMoreResults = true; $hasMoreResults = true;
} }

View File

@ -1038,7 +1038,7 @@ class Share extends Constants {
} else { } else {
$itemTypes = $collectionTypes; $itemTypes = $collectionTypes;
} }
$placeholders = join(',', array_fill(0, count($itemTypes), '?')); $placeholders = implode(',', array_fill(0, count($itemTypes), '?'));
$where = ' WHERE `item_type` IN ('.$placeholders.'))'; $where = ' WHERE `item_type` IN ('.$placeholders.'))';
$queryArgs = $itemTypes; $queryArgs = $itemTypes;
} else { } else {
@ -1064,7 +1064,7 @@ class Share extends Constants {
$groups = \OC::$server->getGroupManager()->getUserGroupIds($user); $groups = \OC::$server->getGroupManager()->getUserGroupIds($user);
} }
if (!empty($groups)) { if (!empty($groups)) {
$placeholders = join(',', array_fill(0, count($groups), '?')); $placeholders = implode(',', array_fill(0, count($groups), '?'));
$where .= ' OR (`share_type` = ? AND `share_with` IN ('.$placeholders.')) '; $where .= ' OR (`share_type` = ? AND `share_with` IN ('.$placeholders.')) ';
$queryArgs[] = self::SHARE_TYPE_GROUP; $queryArgs[] = self::SHARE_TYPE_GROUP;
$queryArgs = array_merge($queryArgs, $groups); $queryArgs = array_merge($queryArgs, $groups);
@ -1129,7 +1129,7 @@ class Share extends Constants {
} }
$queryArgs[] = $item; $queryArgs[] = $item;
if ($includeCollections && $collectionTypes && !in_array('folder', $collectionTypes)) { if ($includeCollections && $collectionTypes && !in_array('folder', $collectionTypes)) {
$placeholders = join(',', array_fill(0, count($collectionTypes), '?')); $placeholders = implode(',', array_fill(0, count($collectionTypes), '?'));
$where .= ' OR `item_type` IN ('.$placeholders.'))'; $where .= ' OR `item_type` IN ('.$placeholders.'))';
$queryArgs = array_merge($queryArgs, $collectionTypes); $queryArgs = array_merge($queryArgs, $collectionTypes);
} }