aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Activity/Manager.php2
-rw-r--r--lib/private/AllConfig.php2
-rw-r--r--lib/private/App/DependencyAnalyzer.php9
-rw-r--r--lib/private/App/InfoParser.php2
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php14
-rw-r--r--lib/private/Archive/Archive.php32
-rw-r--r--lib/private/Archive/TAR.php30
-rw-r--r--lib/private/Archive/ZIP.php30
-rw-r--r--lib/private/Authentication/Token/DefaultTokenMapper.php3
-rw-r--r--lib/private/Command/AsyncBus.php2
-rw-r--r--lib/private/Files/ObjectStore/S3.php8
-rw-r--r--lib/private/Mail/Mailer.php4
-rw-r--r--lib/private/Mail/Message.php2
-rw-r--r--lib/private/Memcache/Memcached.php12
-rw-r--r--lib/private/Memcache/XCache.php12
-rw-r--r--lib/private/Notification/Manager.php2
-rw-r--r--lib/private/Preview/Bitmap.php2
-rw-r--r--lib/private/Preview/Office.php2
-rw-r--r--lib/private/Preview/SVG.php2
-rw-r--r--lib/private/Repair/CleanTags.php2
-rw-r--r--lib/private/Search/Provider/File.php2
-rw-r--r--lib/private/Security/Crypto.php4
-rw-r--r--lib/private/Security/Hasher.php4
-rw-r--r--lib/private/Security/TrustedDomainHelper.php4
-rw-r--r--lib/private/Share20/DefaultShareProvider.php2
-rw-r--r--lib/private/SystemTag/SystemTagManager.php2
-rw-r--r--lib/private/SystemTag/SystemTagObjectMapper.php2
-rw-r--r--lib/private/TempManager.php2
-rw-r--r--lib/private/legacy/app.php2
29 files changed, 99 insertions, 99 deletions
diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php
index bbb6f694156..7640a367e74 100644
--- a/lib/private/Activity/Manager.php
+++ b/lib/private/Activity/Manager.php
@@ -588,7 +588,7 @@ class Manager implements IManager {
$users = $this->config->getUsersForUserValue('activity', 'rsstoken', $token);
- if (sizeof($users) !== 1) {
+ if (count($users) !== 1) {
// No unique user found
throw new \UnexpectedValueException('The token is invalid');
}
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php
index 1f59e677a54..52b0679bb20 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -409,7 +409,7 @@ class AllConfig implements \OCP\IConfig {
array_unshift($queryParams, $key);
array_unshift($queryParams, $appName);
- $placeholders = (sizeof($chunk) == 50) ? $placeholders50 : implode(',', array_fill(0, sizeof($chunk), '?'));
+ $placeholders = (count($chunk) === 50) ? $placeholders50 : implode(',', array_fill(0, count($chunk), '?'));
$query = 'SELECT `userid`, `configvalue` ' .
'FROM `*PREFIX*preferences` ' .
diff --git a/lib/private/App/DependencyAnalyzer.php b/lib/private/App/DependencyAnalyzer.php
index 84d87efa3d3..1ec028b9728 100644
--- a/lib/private/App/DependencyAnalyzer.php
+++ b/lib/private/App/DependencyAnalyzer.php
@@ -43,7 +43,7 @@ class DependencyAnalyzer {
* @param Platform $platform
* @param \OCP\IL10N $l
*/
- function __construct(Platform $platform, IL10N $l) {
+ public function __construct(Platform $platform, IL10N $l) {
$this->platform = $platform;
$this->l = $l;
}
@@ -179,7 +179,7 @@ class DependencyAnalyzer {
}, $supportedDatabases);
$currentDatabase = $this->platform->getDatabase();
if (!in_array($currentDatabase, $supportedDatabases)) {
- $missing[] = (string)$this->l->t('Following databases are supported: %s', join(', ', $supportedDatabases));
+ $missing[] = (string)$this->l->t('Following databases are supported: %s', implode(', ', $supportedDatabases));
}
return $missing;
}
@@ -282,7 +282,7 @@ class DependencyAnalyzer {
}
$currentOS = $this->platform->getOS();
if (!in_array($currentOS, $oss)) {
- $missing[] = (string)$this->l->t('Following platforms are supported: %s', join(', ', $oss));
+ $missing[] = (string)$this->l->t('Following platforms are supported: %s', implode(', ', $oss));
}
return $missing;
}
@@ -349,8 +349,9 @@ class DependencyAnalyzer {
* @return mixed
*/
private function getValue($element) {
- if (isset($element['@value']))
+ if (isset($element['@value'])) {
return $element['@value'];
+ }
return (string)$element;
}
}
diff --git a/lib/private/App/InfoParser.php b/lib/private/App/InfoParser.php
index 47ce28e6e98..fef8ab7a1e8 100644
--- a/lib/private/App/InfoParser.php
+++ b/lib/private/App/InfoParser.php
@@ -176,7 +176,7 @@ class InfoParser {
* @param \SimpleXMLElement $xml
* @return array
*/
- function xmlToArray($xml) {
+ public function xmlToArray($xml) {
if (!$xml->children()) {
return (string)$xml;
}
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 86d14a2f330..b233f3ca9b6 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -315,7 +315,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
* @deprecated implements only deprecated methods
* @return IApi
*/
- function getCoreApi()
+ public function getCoreApi()
{
return $this->query('API');
}
@@ -323,7 +323,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
/**
* @return \OCP\IServerContainer
*/
- function getServer()
+ public function getServer()
{
return $this->server;
}
@@ -332,7 +332,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
* @param string $middleWare
* @return boolean|null
*/
- function registerMiddleWare($middleWare) {
+ public function registerMiddleWare($middleWare) {
array_push($this->middleWares, $middleWare);
}
@@ -340,7 +340,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
* used to return the appname of the set application
* @return string the name of your application
*/
- function getAppName() {
+ public function getAppName() {
return $this->query('AppName');
}
@@ -348,7 +348,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
* @deprecated use IUserSession->isLoggedIn()
* @return boolean
*/
- function isLoggedIn() {
+ public function isLoggedIn() {
return \OC::$server->getUserSession()->isLoggedIn();
}
@@ -356,7 +356,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
* @deprecated use IGroupManager->isAdmin($userId)
* @return boolean
*/
- function isAdminUser() {
+ public function isAdminUser() {
$uid = $this->getUserId();
return \OC_User::isAdminUser($uid);
}
@@ -371,7 +371,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
* @param string $level
* @return mixed
*/
- function log($message, $level) {
+ public function log($message, $level) {
switch($level){
case 'debug':
$level = \OCP\Util::DEBUG;
diff --git a/lib/private/Archive/Archive.php b/lib/private/Archive/Archive.php
index fadc12d2a24..15ec3e1fe56 100644
--- a/lib/private/Archive/Archive.php
+++ b/lib/private/Archive/Archive.php
@@ -36,100 +36,100 @@ abstract class Archive {
/**
* @param $source
*/
- abstract function __construct($source);
+ public abstract function __construct($source);
/**
* add an empty folder to the archive
* @param string $path
* @return bool
*/
- abstract function addFolder($path);
+ public abstract function addFolder($path);
/**
* add a file to the archive
* @param string $path
* @param string $source either a local file or string data
* @return bool
*/
- abstract function addFile($path, $source='');
+ public abstract function addFile($path, $source='');
/**
* rename a file or folder in the archive
* @param string $source
* @param string $dest
* @return bool
*/
- abstract function rename($source, $dest);
+ public abstract function rename($source, $dest);
/**
* get the uncompressed size of a file in the archive
* @param string $path
* @return int
*/
- abstract function filesize($path);
+ public abstract function filesize($path);
/**
* get the last modified time of a file in the archive
* @param string $path
* @return int
*/
- abstract function mtime($path);
+ public abstract function mtime($path);
/**
* get the files in a folder
* @param string $path
* @return array
*/
- abstract function getFolder($path);
+ public abstract function getFolder($path);
/**
* get all files in the archive
* @return array
*/
- abstract function getFiles();
+ public abstract function getFiles();
/**
* get the content of a file
* @param string $path
* @return string
*/
- abstract function getFile($path);
+ public abstract function getFile($path);
/**
* extract a single file from the archive
* @param string $path
* @param string $dest
* @return bool
*/
- abstract function extractFile($path, $dest);
+ public abstract function extractFile($path, $dest);
/**
* extract the archive
* @param string $dest
* @return bool
*/
- abstract function extract($dest);
+ public abstract function extract($dest);
/**
* check if a file or folder exists in the archive
* @param string $path
* @return bool
*/
- abstract function fileExists($path);
+ public abstract function fileExists($path);
/**
* remove a file or folder from the archive
* @param string $path
* @return bool
*/
- abstract function remove($path);
+ public abstract function remove($path);
/**
* get a file handler
* @param string $path
* @param string $mode
* @return resource
*/
- abstract function getStream($path, $mode);
+ public abstract function getStream($path, $mode);
/**
* add a folder and all its content
* @param string $path
* @param string $source
* @return boolean|null
*/
- function addRecursive($path, $source) {
+ public function addRecursive($path, $source) {
$dh = opendir($source);
if(is_resource($dh)) {
$this->addFolder($path);
while (($file = readdir($dh)) !== false) {
- if($file=='.' or $file=='..') {
+ if($file === '.' || $file === '..') {
continue;
}
if(is_dir($source.'/'.$file)) {
diff --git a/lib/private/Archive/TAR.php b/lib/private/Archive/TAR.php
index 07ccd09f399..e6f7ad2b998 100644
--- a/lib/private/Archive/TAR.php
+++ b/lib/private/Archive/TAR.php
@@ -52,7 +52,7 @@ class TAR extends Archive {
/**
* @param string $source
*/
- function __construct($source) {
+ public function __construct($source) {
$types = array(null, 'gz', 'bz2');
$this->path = $source;
$this->tar = new \Archive_Tar($source, $types[self::getTarType($source)]);
@@ -90,7 +90,7 @@ class TAR extends Archive {
* @param string $path
* @return bool
*/
- function addFolder($path) {
+ public function addFolder($path) {
$tmpBase = \OC::$server->getTempManager()->getTemporaryFolder();
if (substr($path, -1, 1) != '/') {
$path .= '/';
@@ -120,7 +120,7 @@ class TAR extends Archive {
* @param string $source either a local file or string data
* @return bool
*/
- function addFile($path, $source = '') {
+ public function addFile($path, $source = '') {
if ($this->fileExists($path)) {
$this->remove($path);
}
@@ -140,7 +140,7 @@ class TAR extends Archive {
* @param string $dest
* @return bool
*/
- function rename($source, $dest) {
+ public function rename($source, $dest) {
//no proper way to delete, rename entire archive, rename file and remake archive
$tmp = \OCP\Files::tmpFolder();
$this->tar->extract($tmp);
@@ -180,7 +180,7 @@ class TAR extends Archive {
* @param string $path
* @return int
*/
- function filesize($path) {
+ public function filesize($path) {
$stat = $this->getHeader($path);
return $stat['size'];
}
@@ -191,7 +191,7 @@ class TAR extends Archive {
* @param string $path
* @return int
*/
- function mtime($path) {
+ public function mtime($path) {
$stat = $this->getHeader($path);
return $stat['mtime'];
}
@@ -202,7 +202,7 @@ class TAR extends Archive {
* @param string $path
* @return array
*/
- function getFolder($path) {
+ public function getFolder($path) {
$files = $this->getFiles();
$folderContent = array();
$pathLength = strlen($path);
@@ -228,7 +228,7 @@ class TAR extends Archive {
*
* @return array
*/
- function getFiles() {
+ public function getFiles() {
if ($this->fileList) {
return $this->fileList;
}
@@ -249,7 +249,7 @@ class TAR extends Archive {
* @param string $path
* @return string
*/
- function getFile($path) {
+ public function getFile($path) {
return $this->tar->extractInString($path);
}
@@ -260,7 +260,7 @@ class TAR extends Archive {
* @param string $dest
* @return bool
*/
- function extractFile($path, $dest) {
+ public function extractFile($path, $dest) {
$tmp = \OCP\Files::tmpFolder();
if (!$this->fileExists($path)) {
return false;
@@ -283,7 +283,7 @@ class TAR extends Archive {
* @param string $dest
* @return bool
*/
- function extract($dest) {
+ public function extract($dest) {
return $this->tar->extract($dest);
}
@@ -293,7 +293,7 @@ class TAR extends Archive {
* @param string $path
* @return bool
*/
- function fileExists($path) {
+ public function fileExists($path) {
$files = $this->getFiles();
if ((array_search($path, $files) !== false) or (array_search($path . '/', $files) !== false)) {
return true;
@@ -322,7 +322,7 @@ class TAR extends Archive {
* @param string $path
* @return bool
*/
- function remove($path) {
+ public function remove($path) {
if (!$this->fileExists($path)) {
return false;
}
@@ -346,7 +346,7 @@ class TAR extends Archive {
* @param string $mode
* @return resource
*/
- function getStream($path, $mode) {
+ public function getStream($path, $mode) {
if (strrpos($path, '.') !== false) {
$ext = substr($path, strrpos($path, '.'));
} else {
@@ -371,7 +371,7 @@ class TAR extends Archive {
/**
* write back temporary files
*/
- function writeBack($tmpFile, $path) {
+ public function writeBack($tmpFile, $path) {
$this->addFile($path, $tmpFile);
unlink($tmpFile);
}
diff --git a/lib/private/Archive/ZIP.php b/lib/private/Archive/ZIP.php
index 0ed0f48acc4..8d616a7ef9a 100644
--- a/lib/private/Archive/ZIP.php
+++ b/lib/private/Archive/ZIP.php
@@ -43,7 +43,7 @@ class ZIP extends Archive{
/**
* @param string $source
*/
- function __construct($source) {
+ public function __construct($source) {
$this->path=$source;
$this->zip=new \ZipArchive();
if($this->zip->open($source, \ZipArchive::CREATE)) {
@@ -56,7 +56,7 @@ class ZIP extends Archive{
* @param string $path
* @return bool
*/
- function addFolder($path) {
+ public function addFolder($path) {
return $this->zip->addEmptyDir($path);
}
/**
@@ -65,7 +65,7 @@ class ZIP extends Archive{
* @param string $source either a local file or string data
* @return bool
*/
- function addFile($path, $source='') {
+ public function addFile($path, $source='') {
if($source and $source[0]=='/' and file_exists($source)) {
$result=$this->zip->addFile($source, $path);
}else{
@@ -83,7 +83,7 @@ class ZIP extends Archive{
* @param string $dest
* @return boolean|null
*/
- function rename($source, $dest) {
+ public function rename($source, $dest) {
$source=$this->stripPath($source);
$dest=$this->stripPath($dest);
$this->zip->renameName($source, $dest);
@@ -93,7 +93,7 @@ class ZIP extends Archive{
* @param string $path
* @return int
*/
- function filesize($path) {
+ public function filesize($path) {
$stat=$this->zip->statName($path);
return $stat['size'];
}
@@ -102,7 +102,7 @@ class ZIP extends Archive{
* @param string $path
* @return int
*/
- function mtime($path) {
+ public function mtime($path) {
return filemtime($this->path);
}
/**
@@ -110,7 +110,7 @@ class ZIP extends Archive{
* @param string $path
* @return array
*/
- function getFolder($path) {
+ public function getFolder($path) {
$files=$this->getFiles();
$folderContent=array();
$pathLength=strlen($path);
@@ -127,7 +127,7 @@ class ZIP extends Archive{
* get all files in the archive
* @return array
*/
- function getFiles() {
+ public function getFiles() {
$fileCount=$this->zip->numFiles;
$files=array();
for($i=0;$i<$fileCount;$i++) {
@@ -140,7 +140,7 @@ class ZIP extends Archive{
* @param string $path
* @return string
*/
- function getFile($path) {
+ public function getFile($path) {
return $this->zip->getFromName($path);
}
/**
@@ -149,7 +149,7 @@ class ZIP extends Archive{
* @param string $dest
* @return boolean|null
*/
- function extractFile($path, $dest) {
+ public function extractFile($path, $dest) {
$fp = $this->zip->getStream($path);
file_put_contents($dest, $fp);
}
@@ -158,7 +158,7 @@ class ZIP extends Archive{
* @param string $dest
* @return bool
*/
- function extract($dest) {
+ public function extract($dest) {
return $this->zip->extractTo($dest);
}
/**
@@ -166,7 +166,7 @@ class ZIP extends Archive{
* @param string $path
* @return bool
*/
- function fileExists($path) {
+ public function fileExists($path) {
return ($this->zip->locateName($path)!==false) or ($this->zip->locateName($path.'/')!==false);
}
/**
@@ -174,7 +174,7 @@ class ZIP extends Archive{
* @param string $path
* @return bool
*/
- function remove($path) {
+ public function remove($path) {
if($this->fileExists($path.'/')) {
return $this->zip->deleteName($path.'/');
}else{
@@ -187,7 +187,7 @@ class ZIP extends Archive{
* @param string $mode
* @return resource
*/
- function getStream($path, $mode) {
+ public function getStream($path, $mode) {
if($mode=='r' or $mode=='rb') {
return $this->zip->getStream($path);
} else {
@@ -213,7 +213,7 @@ class ZIP extends Archive{
/**
* write back temporary files
*/
- function writeBack($tmpFile, $path) {
+ public function writeBack($tmpFile, $path) {
$this->addFile($path, $tmpFile);
unlink($tmpFile);
}
diff --git a/lib/private/Authentication/Token/DefaultTokenMapper.php b/lib/private/Authentication/Token/DefaultTokenMapper.php
index ff31628ffb0..a23be624542 100644
--- a/lib/private/Authentication/Token/DefaultTokenMapper.php
+++ b/lib/private/Authentication/Token/DefaultTokenMapper.php
@@ -82,7 +82,6 @@ class DefaultTokenMapper extends Mapper {
if ($data === false) {
throw new DoesNotExistException('token does not exist');
}
-;
return DefaultToken::fromRow($data);
}
@@ -105,7 +104,7 @@ class DefaultTokenMapper extends Mapper {
$result->closeCursor();
if ($data === false) {
throw new DoesNotExistException('token does not exist');
- };
+ }
return DefaultToken::fromRow($data);
}
diff --git a/lib/private/Command/AsyncBus.php b/lib/private/Command/AsyncBus.php
index 3c1f67da0cb..fb3cbee7240 100644
--- a/lib/private/Command/AsyncBus.php
+++ b/lib/private/Command/AsyncBus.php
@@ -45,7 +45,7 @@ class AsyncBus implements IBus {
/**
* @param \OCP\BackgroundJob\IJobList $jobList
*/
- function __construct($jobList) {
+ public function __construct($jobList) {
$this->jobList = $jobList;
}
diff --git a/lib/private/Files/ObjectStore/S3.php b/lib/private/Files/ObjectStore/S3.php
index 5251b473bdf..6f37492271c 100644
--- a/lib/private/Files/ObjectStore/S3.php
+++ b/lib/private/Files/ObjectStore/S3.php
@@ -39,7 +39,7 @@ class S3 implements IObjectStore {
* @return string the container or bucket name where objects are stored
* @since 7.0.0
*/
- function getStorageId() {
+ public function getStorageId() {
return $this->id;
}
@@ -49,7 +49,7 @@ class S3 implements IObjectStore {
* @throws \Exception when something goes wrong, message will be logged
* @since 7.0.0
*/
- function readObject($urn) {
+ public function readObject($urn) {
// Create the command and serialize the request
$request = $this->getConnection()->getCommand('GetObject', [
'Bucket' => $this->bucket,
@@ -83,7 +83,7 @@ class S3 implements IObjectStore {
* @throws \Exception when something goes wrong, message will be logged
* @since 7.0.0
*/
- function writeObject($urn, $stream) {
+ public function writeObject($urn, $stream) {
$this->getConnection()->putObject([
'Bucket' => $this->bucket,
'Key' => $urn,
@@ -97,7 +97,7 @@ class S3 implements IObjectStore {
* @throws \Exception when something goes wrong, message will be logged
* @since 7.0.0
*/
- function deleteObject($urn) {
+ public function deleteObject($urn) {
$this->getConnection()->deleteObject([
'Bucket' => $this->bucket,
'Key' => $urn
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index b24f72316ba..e438f75d2ce 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -120,7 +120,7 @@ class Mailer implements IMailer {
public function send(Message $message) {
$debugMode = $this->config->getSystemValue('mail_smtpdebug', false);
- if (sizeof($message->getFrom()) === 0) {
+ if (empty($message->getFrom())) {
$message->setFrom([\OCP\Util::getDefaultEmailAddress($this->defaults->getName()) => $this->defaults->getName()]);
}
@@ -186,7 +186,7 @@ class Mailer implements IMailer {
switch ($this->config->getSystemValue('mail_smtpmode', 'php')) {
case 'smtp':
- $this->instance = $this->getSMTPInstance();
+ $this->instance = $this->getSmtpInstance();
break;
case 'sendmail':
// FIXME: Move into the return statement but requires proper testing
diff --git a/lib/private/Mail/Message.php b/lib/private/Mail/Message.php
index 3184f26848b..5ffc050360a 100644
--- a/lib/private/Mail/Message.php
+++ b/lib/private/Mail/Message.php
@@ -37,7 +37,7 @@ class Message {
/**
* @param Swift_Message $swiftMessage
*/
- function __construct(Swift_Message $swiftMessage) {
+ public function __construct(Swift_Message $swiftMessage) {
$this->swiftMessage = $swiftMessage;
}
diff --git a/lib/private/Memcache/Memcached.php b/lib/private/Memcache/Memcached.php
index bf07fd0e6e7..4347fc99e54 100644
--- a/lib/private/Memcache/Memcached.php
+++ b/lib/private/Memcache/Memcached.php
@@ -97,7 +97,7 @@ class Memcached extends Cache implements IMemcache {
}
public function get($key) {
- $result = self::$cache->get($this->getNamespace() . $key);
+ $result = self::$cache->get($this->getNameSpace() . $key);
if ($result === false and self::$cache->getResultCode() == \Memcached::RES_NOTFOUND) {
return null;
} else {
@@ -107,9 +107,9 @@ class Memcached extends Cache implements IMemcache {
public function set($key, $value, $ttl = 0) {
if ($ttl > 0) {
- $result = self::$cache->set($this->getNamespace() . $key, $value, $ttl);
+ $result = self::$cache->set($this->getNameSpace() . $key, $value, $ttl);
} else {
- $result = self::$cache->set($this->getNamespace() . $key, $value);
+ $result = self::$cache->set($this->getNameSpace() . $key, $value);
}
if ($result !== true) {
$this->verifyReturnCode();
@@ -118,12 +118,12 @@ class Memcached extends Cache implements IMemcache {
}
public function hasKey($key) {
- self::$cache->get($this->getNamespace() . $key);
+ self::$cache->get($this->getNameSpace() . $key);
return self::$cache->getResultCode() === \Memcached::RES_SUCCESS;
}
public function remove($key) {
- $result= self::$cache->delete($this->getNamespace() . $key);
+ $result= self::$cache->delete($this->getNameSpace() . $key);
if (self::$cache->getResultCode() !== \Memcached::RES_NOTFOUND) {
$this->verifyReturnCode();
}
@@ -131,7 +131,7 @@ class Memcached extends Cache implements IMemcache {
}
public function clear($prefix = '') {
- $prefix = $this->getNamespace() . $prefix;
+ $prefix = $this->getNameSpace() . $prefix;
$allKeys = self::$cache->getAllKeys();
if ($allKeys === false) {
// newer Memcached doesn't like getAllKeys(), flush everything
diff --git a/lib/private/Memcache/XCache.php b/lib/private/Memcache/XCache.php
index 7eb7a138d1f..549896e6c6b 100644
--- a/lib/private/Memcache/XCache.php
+++ b/lib/private/Memcache/XCache.php
@@ -47,28 +47,28 @@ class XCache extends Cache implements IMemcache {
}
public function get($key) {
- return xcache_get($this->getNamespace() . $key);
+ return xcache_get($this->getNameSpace() . $key);
}
public function set($key, $value, $ttl = 0) {
if ($ttl > 0) {
- return xcache_set($this->getNamespace() . $key, $value, $ttl);
+ return xcache_set($this->getNameSpace() . $key, $value, $ttl);
} else {
- return xcache_set($this->getNamespace() . $key, $value);
+ return xcache_set($this->getNameSpace() . $key, $value);
}
}
public function hasKey($key) {
- return xcache_isset($this->getNamespace() . $key);
+ return xcache_isset($this->getNameSpace() . $key);
}
public function remove($key) {
- return xcache_unset($this->getNamespace() . $key);
+ return xcache_unset($this->getNameSpace() . $key);
}
public function clear($prefix = '') {
if (function_exists('xcache_unset_by_prefix')) {
- return xcache_unset_by_prefix($this->getNamespace() . $prefix);
+ return xcache_unset_by_prefix($this->getNameSpace() . $prefix);
} else {
// Since we can not clear by prefix, we just clear the whole cache.
xcache_clear_cache(\XC_TYPE_VAR, 0);
diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php
index c5cad7f2db3..1d139167552 100644
--- a/lib/private/Notification/Manager.php
+++ b/lib/private/Notification/Manager.php
@@ -142,7 +142,7 @@ class Manager implements IManager {
$this->notifiersInfo = [];
foreach ($this->notifiersInfoClosures as $closure) {
$notifier = $closure();
- if (!is_array($notifier) || sizeof($notifier) !== 2 || !isset($notifier['id']) || !isset($notifier['name'])) {
+ if (!is_array($notifier) || count($notifier) !== 2 || !isset($notifier['id']) || !isset($notifier['name'])) {
throw new \InvalidArgumentException('The given notifier information is invalid');
}
if (isset($this->notifiersInfo[$notifier['id']])) {
diff --git a/lib/private/Preview/Bitmap.php b/lib/private/Preview/Bitmap.php
index d3f75b4a205..e9fd6cc7c03 100644
--- a/lib/private/Preview/Bitmap.php
+++ b/lib/private/Preview/Bitmap.php
@@ -48,7 +48,7 @@ abstract class Bitmap extends Provider {
try {
$bp = $this->getResizedPreview($tmpPath, $maxX, $maxY);
} catch (\Exception $e) {
- \OCP\Util::writeLog('core', 'ImageMagick says: ' . $e->getmessage(), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('core', 'ImageMagick says: ' . $e->getMessage(), \OCP\Util::ERROR);
return false;
}
diff --git a/lib/private/Preview/Office.php b/lib/private/Preview/Office.php
index 9b445a2bbee..a05ffef9e9a 100644
--- a/lib/private/Preview/Office.php
+++ b/lib/private/Preview/Office.php
@@ -59,7 +59,7 @@ abstract class Office extends Provider {
} catch (\Exception $e) {
unlink($absPath);
unlink($pdfPreview);
- \OCP\Util::writeLog('core', $e->getmessage(), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('core', $e->getMessage(), \OCP\Util::ERROR);
return false;
}
diff --git a/lib/private/Preview/SVG.php b/lib/private/Preview/SVG.php
index 4ad274c893b..fb06faf9c23 100644
--- a/lib/private/Preview/SVG.php
+++ b/lib/private/Preview/SVG.php
@@ -53,7 +53,7 @@ class SVG extends Provider {
$svg->readImageBlob($content);
$svg->setImageFormat('png32');
} catch (\Exception $e) {
- \OCP\Util::writeLog('core', $e->getmessage(), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('core', $e->getMessage(), \OCP\Util::ERROR);
return false;
}
diff --git a/lib/private/Repair/CleanTags.php b/lib/private/Repair/CleanTags.php
index d3bea0f9957..de46d039229 100644
--- a/lib/private/Repair/CleanTags.php
+++ b/lib/private/Repair/CleanTags.php
@@ -202,7 +202,7 @@ class CleanTags implements IRepairStep {
}
if ($repairInfo) {
- $output->info(sprintf($repairInfo, sizeof($orphanItems)));
+ $output->info(sprintf($repairInfo, count($orphanItems)));
}
}
}
diff --git a/lib/private/Search/Provider/File.php b/lib/private/Search/Provider/File.php
index ddb05c759ea..787725ab87b 100644
--- a/lib/private/Search/Provider/File.php
+++ b/lib/private/Search/Provider/File.php
@@ -37,7 +37,7 @@ class File extends \OCP\Search\Provider {
* @param string $query
* @return \OCP\Search\Result
*/
- function search($query) {
+ public function search($query) {
$files = Filesystem::search($query);
$results = array();
// edit results
diff --git a/lib/private/Security/Crypto.php b/lib/private/Security/Crypto.php
index 176faf68e2d..1dd680ea13f 100644
--- a/lib/private/Security/Crypto.php
+++ b/lib/private/Security/Crypto.php
@@ -56,7 +56,7 @@ class Crypto implements ICrypto {
* @param IConfig $config
* @param ISecureRandom $random
*/
- function __construct(IConfig $config, ISecureRandom $random) {
+ public function __construct(IConfig $config, ISecureRandom $random) {
$this->cipher = new AES();
$this->config = $config;
$this->random = $random;
@@ -115,7 +115,7 @@ class Crypto implements ICrypto {
$this->cipher->setPassword($password);
$parts = explode('|', $authenticatedCiphertext);
- if(sizeof($parts) !== 3) {
+ if(count($parts) !== 3) {
throw new \Exception('Authenticated ciphertext could not be decoded.');
}
diff --git a/lib/private/Security/Hasher.php b/lib/private/Security/Hasher.php
index 3bc546fa0a2..ddba82fec43 100644
--- a/lib/private/Security/Hasher.php
+++ b/lib/private/Security/Hasher.php
@@ -58,7 +58,7 @@ class Hasher implements IHasher {
/**
* @param IConfig $config
*/
- function __construct(IConfig $config) {
+ public function __construct(IConfig $config) {
$this->config = $config;
$hashingCost = $this->config->getSystemValue('hashingCost', null);
@@ -86,7 +86,7 @@ class Hasher implements IHasher {
*/
protected function splitHash($prefixedHash) {
$explodedString = explode('|', $prefixedHash, 2);
- if(sizeof($explodedString) === 2) {
+ if(count($explodedString) === 2) {
if((int)$explodedString[0] > 0) {
return array('version' => (int)$explodedString[0], 'hash' => $explodedString[1]);
}
diff --git a/lib/private/Security/TrustedDomainHelper.php b/lib/private/Security/TrustedDomainHelper.php
index a8cbdb6ee6c..221d21fb6a4 100644
--- a/lib/private/Security/TrustedDomainHelper.php
+++ b/lib/private/Security/TrustedDomainHelper.php
@@ -38,7 +38,7 @@ class TrustedDomainHelper {
/**
* @param IConfig $config
*/
- function __construct(IConfig $config) {
+ public function __construct(IConfig $config) {
$this->config = $config;
}
@@ -89,7 +89,7 @@ class TrustedDomainHelper {
if (gettype($trusted) !== 'string') {
break;
}
- $regex = '/^' . join('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))) . '$/';
+ $regex = '/^' . implode('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))) . '$/';
if (preg_match($regex, $domain) || preg_match($regex, $domainWithPort)) {
return true;
}
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 6f3741f5ae7..6503e67a8f9 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -860,7 +860,7 @@ class DefaultShareProvider implements IShareProvider {
if (isset($data['f_permissions'])) {
$entryData = $data;
$entryData['permissions'] = $entryData['f_permissions'];
- $entryData['parent'] = $entryData['f_parent'];;
+ $entryData['parent'] = $entryData['f_parent'];
$share->setNodeCacheEntry(Cache::cacheEntryFromData($entryData,
\OC::$server->getMimeTypeLoader()));
}
diff --git a/lib/private/SystemTag/SystemTagManager.php b/lib/private/SystemTag/SystemTagManager.php
index ab0deba0360..08f9b6bc4af 100644
--- a/lib/private/SystemTag/SystemTagManager.php
+++ b/lib/private/SystemTag/SystemTagManager.php
@@ -408,7 +408,7 @@ class SystemTagManager implements ISystemTagManager {
$this->connection->commit();
} catch (\Exception $e) {
- $this->connection->rollback();
+ $this->connection->rollBack();
throw $e;
}
}
diff --git a/lib/private/SystemTag/SystemTagObjectMapper.php b/lib/private/SystemTag/SystemTagObjectMapper.php
index e562a2dfd4b..4a6ffdeddfb 100644
--- a/lib/private/SystemTag/SystemTagObjectMapper.php
+++ b/lib/private/SystemTag/SystemTagObjectMapper.php
@@ -112,7 +112,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper {
->andWhere($query->expr()->eq('objecttype', $query->createNamedParameter($objectType)));
if ($limit) {
- if (sizeof($tagIds) !== 1) {
+ if (count($tagIds) !== 1) {
throw new \InvalidArgumentException('Limit is only allowed with a single tag');
}
diff --git a/lib/private/TempManager.php b/lib/private/TempManager.php
index 4dfcbe7f523..dc6dad15d3c 100644
--- a/lib/private/TempManager.php
+++ b/lib/private/TempManager.php
@@ -256,7 +256,7 @@ class TempManager implements ITempManager {
// suppress any possible errors caused by is_writable
// checks missing or invalid path or characters, wrong permissions etc
try {
- if (is_writeable($directory)) {
+ if (is_writable($directory)) {
return true;
}
} catch (\Exception $e) {
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index 463e13da915..9f6932b3a89 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -1244,7 +1244,7 @@ class OC_App {
$dependencyAnalyzer = new DependencyAnalyzer(new Platform($config), $l);
$missing = $dependencyAnalyzer->analyze($info);
if (!empty($missing)) {
- $missingMsg = join(PHP_EOL, $missing);
+ $missingMsg = implode(PHP_EOL, $missing);
throw new \Exception(
$l->t('App "%s" cannot be installed because the following dependencies are not fulfilled: %s',
[$info['name'], $missingMsg]