Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-10-26 01:45:07 +0300
committerLukas Reschke <lukas@owncloud.com>2015-10-26 01:47:53 +0300
commitff1271c7f348b615998489c770741cec277b6684 (patch)
tree22e81cdfea133cb950ec806d3d2647c39862156c /lib/autoloader.php
parent172bcf2d51d9a10520129a7a794d397457d91d96 (diff)
Remove dead code
Those variables are never written to. Thus this is dead code which should be removed.
Diffstat (limited to 'lib/autoloader.php')
-rw-r--r--lib/autoloader.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/autoloader.php b/lib/autoloader.php
index f60f5a358ca..b94ac6c5ee4 100644
--- a/lib/autoloader.php
+++ b/lib/autoloader.php
@@ -31,12 +31,9 @@ namespace OC;
use \OCP\AutoloadNotAllowedException;
class Autoloader {
+ /** @var bool */
private $useGlobalClassPath = true;
-
- private $prefixPaths = array();
-
- private $classPaths = array();
-
+ /** @var array */
private $validRoots = [];
/**
@@ -91,9 +88,7 @@ class Autoloader {
$class = trim($class, '\\');
$paths = array();
- if (array_key_exists($class, $this->classPaths)) {
- $paths[] = $this->classPaths[$class];
- } else if ($this->useGlobalClassPath and array_key_exists($class, \OC::$CLASSPATH)) {
+ if ($this->useGlobalClassPath && array_key_exists($class, \OC::$CLASSPATH)) {
$paths[] = \OC::$CLASSPATH[$class];
/**
* @TODO: Remove this when necessary
@@ -129,6 +124,10 @@ class Autoloader {
return $paths;
}
+ /**
+ * @param string $fullPath
+ * @return bool
+ */
protected function isValidPath($fullPath) {
foreach ($this->validRoots as $root => $true) {
if (substr($fullPath, 0, strlen($root) + 1) === $root . '/') {