summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.drone.yml25
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php4
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php4
-rw-r--r--build/.phan/config.php226
-rw-r--r--build/.phan/plugin-checker.php44
-rw-r--r--build/.phan/plugins/SqlInjectionCheckerPlugin.php136
-rw-r--r--build/.phan/stubs/APCIterator.php82
-rw-r--r--build/.phan/stubs/APCUIterator.php82
-rw-r--r--build/.phan/stubs/apc.php318
-rw-r--r--build/.phan/stubs/apcu.php235
-rw-r--r--build/.phan/stubs/memcached.php1257
-rw-r--r--build/.phan/stubs/xcache.php217
-rw-r--r--build/.phan/tests/SqlInjectionCheckerTest.php72
-rw-r--r--composer.json2
14 files changed, 1 insertions, 2703 deletions
diff --git a/.drone.yml b/.drone.yml
index 17486d85642..99e47e18e81 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -43,31 +43,6 @@ trigger:
- pull_request
- push
-#---
-#kind: pipeline
-#name: syntax-and-phan
-#
-#steps:
-#- name: submodules
-# image: docker:git
-# commands:
-# - git submodule update --init
-#- name: phan
-# image: nextcloudci/php7.2:php7.2-13
-# commands:
-# - composer install
-# - composer require --dev "phan/phan:0.11.1"
-# - ./lib/composer/phan/phan/phan -k build/.phan/config.php
-# - php ./build/.phan/plugin-checker.php
-#
-#trigger:
-# branch:
-# - master
-# - stable*
-# event:
-# - pull_request
-# - push
-
---
kind: pipeline
name: litmus
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
index d997e486c91..ef824821e31 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
@@ -381,9 +381,7 @@ class EmailProvider extends AbstractProvider {
$diff = $dtstartDt->diff($dtendDt);
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
$dtstartDt = new \DateTime($dtstartDt->format(\DateTime::ATOM));
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
$dtendDt = new \DateTime($dtendDt->format(\DateTime::ATOM));
if ($isAllDay) {
@@ -400,9 +398,7 @@ class EmailProvider extends AbstractProvider {
$startTimezone = $endTimezone = null;
if (!$vevent->DTSTART->isFloating()) {
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
$startTimezone = $vevent->DTSTART->getDateTime()->getTimezone()->getName();
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
$endTimezone = $this->getDTEndFromEvent($vevent)->getDateTime()->getTimezone()->getName();
}
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
index 688e5c3b106..769f9927e47 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
@@ -138,15 +138,11 @@ class PushProvider extends AbstractProvider {
? ((string) $vevent->LOCATION)
: null,
'all_day' => $start instanceof Property\ICalendar\Date,
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
'start_atom' => $start->getDateTime()->format(\DateTime::ATOM),
'start_is_floating' => $start->isFloating(),
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
'start_timezone' => $start->getDateTime()->getTimezone()->getName(),
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
'end_atom' => $end->getDateTime()->format(\DateTime::ATOM),
'end_is_floating' => $end->isFloating(),
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
'end_timezone' => $end->getDateTime()->getTimezone()->getName(),
];
}
diff --git a/build/.phan/config.php b/build/.phan/config.php
deleted file mode 100644
index 04722d5b06d..00000000000
--- a/build/.phan/config.php
+++ /dev/null
@@ -1,226 +0,0 @@
-<?php
-/**
- * This configuration will be read and overlaid on top of the
- * default configuration. Command line arguments will be applied
- * after this file is read.
- *
- * @see src/Phan/Config.php
- * See Config for all configurable options.
- */
-return [
- // A list of directories that should be parsed for class and
- // method information. After excluding the directories
- // defined in exclude_analysis_directory_list, the remaining
- // files will be statically analyzed for errors.
- //
- // Thus, both first-party and third-party code being used by
- // your application should be included in this list.
- 'directory_list' => [
- '3rdparty',
- 'apps/',
- 'build/.phan/stubs',
- 'core/',
- 'lib/',
- 'lib/composer',
- 'ocs-provider/',
- 'ocs/',
- 'tests/lib/Util/User',
- 'themes',
- ],
- 'file_list' => [
- 'index.php',
- 'public.php',
- 'remote.php',
- 'status.php',
- 'version.php',
- ],
-
- // A directory list that defines files that will be excluded
- // from static analysis, but whose class and method
- // information should be included.
- //
- // Generally, you'll want to include the directories for
- // third-party code (such as "vendor/") in this list.
- //
- // n.b.: If you'd like to parse but not analyze 3rd
- // party code, directories containing that code
- // should be added to the `directory_list` as
- // to `exclude_analysis_directory_list`.
- 'exclude_analysis_directory_list' => [
- '3rdparty',
- 'apps/accessibility/composer',
- 'apps/admin_audit/composer',
- 'apps/admin_audit/tests',
- 'apps/cloud_federation_api/composer',
- 'apps/comments/composer',
- 'apps/comments/tests',
- 'apps/dav/composer',
- 'apps/dav/tests',
- 'apps/encryption/composer',
- 'apps/encryption/tests',
- 'apps/federatedfilesharing/composer',
- 'apps/federatedfilesharing/tests',
- 'apps/federation/composer',
- 'apps/federation/tests',
- 'apps/files/composer',
- 'apps/files/tests',
- 'apps/files_external/3rdparty',
- 'apps/files_external/composer',
- 'apps/files_external/tests',
- 'apps/files_sharing/composer',
- 'apps/files_sharing/tests',
- 'apps/files_trashbin/composer',
- 'apps/files_trashbin/tests',
- 'apps/files_versions/composer',
- 'apps/files_versions/tests',
- 'apps/lookup_server_connector/composer',
- 'apps/lookup_server_connector/tests',
- 'apps/oauth2/composer',
- 'apps/oauth2/tests',
- 'apps/provisioning_api/composer',
- 'apps/provisioning_api/tests',
- 'apps/settings/composer',
- 'apps/settings/tests',
- 'apps/sharebymail/composer',
- 'apps/sharebymail/tests',
- 'apps/systemtags/composer',
- 'apps/systemtags/tests',
- 'apps/testing/composer',
- 'apps/testing/tests',
- 'apps/theming/composer',
- 'apps/theming/tests',
- 'apps/twofactor_backupcodes/composer',
- 'apps/twofactor_backupcodes/tests',
- 'apps/updatenotification/composer',
- 'apps/updatenotification/tests',
- 'apps/user_ldap/composer',
- 'apps/user_ldap/tests',
- 'apps/workflowengine/composer',
- 'apps/workflowengine/tests',
- 'build/.phan/',
- 'lib/composer',
- ],
-
- // A file list that defines files that will be excluded
- // from parsing and analysis and will not be read at all.
- //
- // This is useful for excluding hopelessly unanalyzable
- // files that can't be removed for whatever reason.
- 'exclude_file_list' => [
- 'apps/encryption/appinfo/routes.php',
- 'apps/federation/appinfo/routes.php',
- 'apps/files/appinfo/routes.php',
- 'apps/files_external/appinfo/routes.php',
- 'apps/files_trashbin/appinfo/routes.php',
- 'apps/files_versions/appinfo/routes.php',
- 'apps/testing/appinfo/routes.php',
- 'apps/user_ldap/appinfo/routes.php',
- 'settings/routes.php',
- 'settings/ajax/updateapp.php',
- 'settings/ajax/uninstallapp.php',
- 'settings/ajax/togglesubadmins.php',
- 'settings/ajax/setquota.php',
- 'settings/ajax/enableapp.php',
- 'settings/ajax/disableapp.php',
- 'core/register_command.php',
- 'ocs/routes.php',
- 'ocs/v1.php',
- 'core/routes.php',
- ],
-
-
- // The number of processes to fork off during the analysis
- // phase.
- 'processes' => 5,
-
- // Backwards Compatibility Checking. This is slow
- // and expensive, but you should consider running
- // it before upgrading your version of PHP to a
- // new version that has backward compatibility
- // breaks.
- 'backward_compatibility_checks' => false,
-
- // Run a quick version of checks that takes less
- // time at the cost of not running as thorough
- // an analysis. You should consider setting this
- // to true only when you wish you had more issues
- // to fix in your code base.
- 'quick_mode' => false,
-
- // If true, check to make sure the return type declared
- // in the doc-block (if any) matches the return type
- // declared in the method signature. This process is
- // slow.
- 'check_docblock_signature_param_type_match' => true,
-
- // If enabled, check all methods that override a
- // parent method to make sure its signature is
- // compatible with the parent's. This check
- // can add quite a bit of time to the analysis.
- 'analyze_signature_compatibility' => true,
-
- // The minimum severity level to report on. This can be
- // set to Issue::SEVERITY_LOW, Issue::SEVERITY_NORMAL or
- // Issue::SEVERITY_CRITICAL. Setting it to only
- // critical issues is a good place to start on a big
- // sloppy mature code base.
- 'minimum_severity' => \Phan\Issue::SEVERITY_CRITICAL,
-
- // If true, missing properties will be created when
- // they are first seen. If false, we'll report an
- // error message if there is an attempt to write
- // to a class property that wasn't explicitly
- // defined.
- 'allow_missing_properties' => false,
-
- // Allow null to be cast as any type and for any
- // type to be cast to null. Setting this to false
- // will cut down on false positives.
- 'null_casts_as_any_type' => false,
-
- // Allow null to be cast as any array-like type (Requires 0.9.3+)
- // This is an incremental step in migrating away from null_casts_as_any_type.
- // If null_casts_as_any_type is true, this has no effect.
- 'null_casts_as_array' => false,
-
- // Allow any array-like type to be cast to null. (Requires 0.9.3+)
- // This is an incremental step in migrating away from null_casts_as_any_type.
- // If null_casts_as_any_type is true, this has no effect.
- 'array_casts_as_null' => false,
-
- // If enabled, scalars (int, float, bool, true, false, string, null)
- // are treated as if they can cast to each other.
- 'scalar_implicit_cast' => true,
-
- // If this has entries, scalars (int, float, bool, true, false, string, null)
- // are allowed to perform the casts listed.
- // E.g. ['int' => ['float', 'string'], 'float' => ['int'], 'string' => ['int'], 'null' => ['string']]
- // allows casting null to a string, but not vice versa.
- // (subset of scalar_implicit_cast)
- // (Requires 0.9.3+)
- 'scalar_implicit_partial' => [],
-
- // If true, seemingly undeclared variables in the global
- // scope will be ignored. This is useful for projects
- // with complicated cross-file globals that you have no
- // hope of fixing.
- 'ignore_undeclared_variables_in_global_scope' => true,
-
- // Add any issue types (such as 'PhanUndeclaredMethod')
- // to this black-list to inhibit them from being reported.
- 'suppress_issue_types' => [
- // 'PhanUndeclaredMethod',
- ],
-
- // If empty, no filter against issues types will be applied.
- // If this white-list is non-empty, only issues within the list
- // will be emitted by Phan.
- 'whitelist_issue_types' => [
- // 'PhanAccessMethodPrivate',
- ],
-
- // A list of plugin files to execute
- 'plugins' => [
- 'build/.phan/plugins/SqlInjectionCheckerPlugin.php',
- ],
-];
diff --git a/build/.phan/plugin-checker.php b/build/.phan/plugin-checker.php
deleted file mode 100644
index f7946fc2a42..00000000000
--- a/build/.phan/plugin-checker.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-$expected = <<<EOT
-build/.phan/tests/SqlInjectionCheckerTest.php:23 SqlInjectionChecker Potential SQL injection detected - neither a parameter nor a string
-build/.phan/tests/SqlInjectionCheckerTest.php:35 SqlInjectionChecker Potential SQL injection detected - neither a parameter nor a string
-build/.phan/tests/SqlInjectionCheckerTest.php:37 SqlInjectionChecker Potential SQL injection detected - neither a parameter nor a string
-build/.phan/tests/SqlInjectionCheckerTest.php:39 SqlInjectionChecker Potential SQL injection detected - neither a parameter nor a string
-build/.phan/tests/SqlInjectionCheckerTest.php:41 SqlInjectionChecker Potential SQL injection detected - neither a parameter nor a string
-build/.phan/tests/SqlInjectionCheckerTest.php:43 SqlInjectionChecker Potential SQL injection detected - neither a parameter nor a string
-build/.phan/tests/SqlInjectionCheckerTest.php:54 SqlInjectionChecker Potential SQL injection detected - neither a parameter nor a string
-build/.phan/tests/SqlInjectionCheckerTest.php:61 SqlInjectionChecker Potential SQL injection detected - method: no child method
-build/.phan/tests/SqlInjectionCheckerTest.php:62 SqlInjectionChecker Potential SQL injection detected - method: no child method
-build/.phan/tests/SqlInjectionCheckerTest.php:69 SqlInjectionChecker Potential SQL injection detected - method: no child method
-build/.phan/tests/SqlInjectionCheckerTest.php:70 SqlInjectionChecker Potential SQL injection detected - method: no child method
-
-EOT;
-
-$result = shell_exec('php '. __DIR__ . '/../../lib/composer/phan/phan/phan -k build/.phan/config.php --include-analysis-file-list build/.phan/tests/* --directory build/.phan/tests/');
-
-if($result !== $expected) {
- echo("Output of phan doesn't match expectation\n");
- echo("Expected: $expected\n");
- echo("Result: $result\n");
- exit(1);
-}
diff --git a/build/.phan/plugins/SqlInjectionCheckerPlugin.php b/build/.phan/plugins/SqlInjectionCheckerPlugin.php
deleted file mode 100644
index a9a0b817d5c..00000000000
--- a/build/.phan/plugins/SqlInjectionCheckerPlugin.php
+++ /dev/null
@@ -1,136 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-declare(strict_types=1);
-
-use Phan\PluginV2;
-use Phan\PluginV2\AnalyzeNodeCapability;
-use Phan\PluginV2\PluginAwareAnalysisVisitor;
-
-class SqlInjectionCheckerPlugin extends PluginV2 implements AnalyzeNodeCapability{
- public static function getAnalyzeNodeVisitorClassName() : string {
- return SqlInjectionCheckerVisitor::class;
- }
-}
-
-class SqlInjectionCheckerVisitor extends PluginAwareAnalysisVisitor {
-
- private function throwError(string $hint) {
- $this->emit(
- 'SqlInjectionChecker',
- 'Potential SQL injection detected - ' . $hint,
- [],
- \Phan\Issue::SEVERITY_CRITICAL
- );
- }
-
- /**
- * Checks whether the query builder functions are using prepared statements
- *
- * @param \ast\Node $node
- */
- private function checkQueryBuilderParameters(\ast\Node $node) {
- $dangerousFunctions = [
- 'eq',
- 'neq',
- 'lt',
- 'lte',
- 'gt',
- 'gte',
- 'like',
- 'iLike',
- 'notLike',
- ];
-
- $safeFunctions = [
- 'createNamedParameter',
- 'createPositionalParameter',
- 'createParameter',
- 'createFunction',
- 'func',
- ];
-
- $functionsToSearch = [
- 'set',
- 'setValue',
- ];
-
- $expandedNode = \Phan\Language\UnionType::fromNode($this->context, $this->code_base, $node);
- $expandedNodeType = (string)$expandedNode->asExpandedTypes($this->code_base);
-
- if($expandedNodeType === '\OCP\DB\QueryBuilder\IQueryBuilder') {
- /** @var \ast\Node $child */
- foreach($node->children as $child) {
- if(isset($child->kind) && $child->kind === 128) {
- if(isset($child->children)) {
- /** @var \ast\Node $subChild */
- foreach ($child->children as $subChild) {
- // For set actions
- if(isset($node->children['method']) && in_array($node->children['method'], $functionsToSearch, true) && !is_string($subChild)) {
- if(!isset($subChild->children['method']) || !in_array($subChild->children['method'], $safeFunctions, true)) {
- $this->throwError('method: ' . ($subChild->children['method'] ?? 'no child method'));
- }
- }
-
- if(isset($subChild->children['method'])) {
- // For all "eq" etc. actions
- $method = $subChild->children['method'];
- if(!in_array($method, $dangerousFunctions, true)) {
- return;
- }
-
- /** @var \ast\Node $functionNode */
- $functionNode = $subChild->children['args'];
-
- /** @var \ast\Node $secondParameterNode */
- $secondParameterNode = $functionNode->children[1];
- $expandedNode = \Phan\Language\UnionType::fromNode($this->context, $this->code_base, $secondParameterNode);
-
- // For literals with a plain string or integer inside
- if(isset($secondParameterNode->children['method']) && $secondParameterNode->children['method'] === 'literal') {
- /** @var \ast\Node $functionNode */
- $functionNode = $secondParameterNode->children['args'];
-
- $expandedNode = \Phan\Language\UnionType::fromNode($this->context, $this->code_base, $functionNode);
- if(isset($functionNode->children[0]) && (is_string($functionNode->children[0]) || is_int($functionNode->children[0]))) {
- return;
- }
- }
-
- // If it is an IParameter or a pure string no error is thrown
- if((string)$expandedNode !== '\OCP\DB\QueryBuilder\IParameter' && !is_string($secondParameterNode)) {
- $this->throwError('neither a parameter nor a string');
- }
- }
- }
- }
- }
- }
- }
- }
-
- public function visitMethodCall(\ast\Node $node) {
- $this->checkQueryBuilderParameters($node);
- }
-
-}
-
-return new SqlInjectionCheckerPlugin();
diff --git a/build/.phan/stubs/APCIterator.php b/build/.phan/stubs/APCIterator.php
deleted file mode 100644
index e837b3971a9..00000000000
--- a/build/.phan/stubs/APCIterator.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-/**
- * The APCIterator class
- *
- * The APCIterator class makes it easier to iterate over large APC caches.
- * This is helpful as it allows iterating over large caches in steps, while grabbing a defined number
- * of entries per lock instance, so it frees the cache locks for other activities rather than hold up
- * the entire cache to grab 100 (the default) entries. Also, using regular expression matching is more
- * efficient as it's been moved to the C level.
- *
- * @link http://php.net/manual/en/class.apciterator.php
- */
-class APCIterator implements Iterator
-{
- /**
- * Constructs an APCIterator iterator object
- * @link http://php.net/manual/en/apciterator.construct.php
- * @param string $cache The cache type, which will be 'user' or 'file'.
- * @param string|string[]|null $search A PCRE regular expression that matches against APC key names,
- * either as a string for a single regular expression, or as an array of regular expressions.
- * Or, optionally pass in NULL to skip the search.
- * @param int $format The desired format, as configured with one ore more of the APC_ITER_* constants.
- * @param int $chunk_size The chunk size. Must be a value greater than 0. The default value is 100.
- * @param int $list The type to list. Either pass in APC_LIST_ACTIVE or APC_LIST_INACTIVE.
- */
- public function __construct($cache, $search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE){}
-
- /**
- * Rewinds back the iterator to the first element
- * @link http://php.net/manual/en/apciterator.rewind.php
- */
- public function rewind(){}
-
- /**
- * Checks if the current iterator position is valid
- * @link http://php.net/manual/en/apciterator.valid.php
- * @return bool Returns TRUE if the current iterator position is valid, otherwise FALSE.
- */
- public function valid(){}
-
- /**
- * Gets the current item from the APCIterator stack
- * @link http://php.net/manual/en/apciterator.current.php
- * @return mixed Returns the current item on success, or FALSE if no more items or exist, or on failure.
- */
- public function current(){}
-
- /**
- * Gets the current iterator key
- * @link http://php.net/manual/en/apciterator.key.php
- * @return string|int|bool Returns the key on success, or FALSE upon failure.
- */
- public function key(){}
-
- /**
- * Moves the iterator pointer to the next element
- * @link http://php.net/manual/en/apciterator.next.php
- * @return bool Returns TRUE on success or FALSE on failure.
- */
- public function next(){}
-
- /**
- * Gets the total number of cache hits
- * @link http://php.net/manual/en/apciterator.gettotalhits.php
- * @return int|bool The number of hits on success, or FALSE on failure.
- */
- public function getTotalHits(){}
-
- /**
- * Gets the total cache size
- * @link http://php.net/manual/en/apciterator.gettotalsize.php
- * @return int|bool The total cache size.
- */
- public function getTotalSize(){}
-
- /**
- * Get the total count
- * @link http://php.net/manual/en/apciterator.gettotalcount.php
- * @return int|bool The total count.
- */
- public function getTotalCount(){}
-}
diff --git a/build/.phan/stubs/APCUIterator.php b/build/.phan/stubs/APCUIterator.php
deleted file mode 100644
index 138e92428eb..00000000000
--- a/build/.phan/stubs/APCUIterator.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-
-/**
-* The APCUIterator class
-*
-* The APCUIterator class makes it easier to iterate over large APCu caches.
-* This is helpful as it allows iterating over large caches in steps, while grabbing a defined number
-* of entries per lock instance, so it frees the cache locks for other activities rather than hold up
-* the entire cache to grab 100 (the default) entries. Also, using regular expression matching is more
-* efficient as it's been moved to the C level.
-*
-* @link http://php.net/manual/en/class.apcuiterator.php
-* @since APCu 5.0.0
-*/
-class APCUIterator implements Iterator {
- /**
- * Constructs an APCUIterator iterator object
- * @link http://php.net/manual/en/apcuiterator.construct.php
- * @param string|string[]|null $search A PCRE regular expression that matches against APCu key names,
- * either as a string for a single regular expression, or as an array of regular expressions.
- * Or, optionally pass in NULL to skip the search.
- * @param int $format The desired format, as configured with one ore more of the APC_ITER_* constants.
- * @param int $chunk_size The chunk size. Must be a value greater than 0. The default value is 100.
- * @param int $list The type to list. Either pass in APC_LIST_ACTIVE or APC_LIST_DELETED.
- */
- public function __construct($search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE){}
-
- /**
- * Rewinds back the iterator to the first element
- * @link http://php.net/manual/en/apcuiterator.rewind.php
- */
- public function rewind(){}
-
- /**
- * Checks if the current iterator position is valid
- * @link http://php.net/manual/en/apcuiterator.valid.php
- * @return bool Returns TRUE if the current iterator position is valid, otherwise FALSE.
- */
- public function valid(){}
-
- /**
- * Gets the current item from the APCUIterator stack
- * @link http://php.net/manual/en/apcuiterator.current.php
- * @return mixed Returns the current item on success, or FALSE if no more items or exist, or on failure.
- */
- public function current(){}
-
- /**
- * Gets the current iterator key
- * @link http://php.net/manual/en/apcuiterator.key.php
- * @return string|int|bool Returns the key on success, or FALSE upon failure.
- */
- public function key(){}
-
- /**
- * Moves the iterator pointer to the next element
- * @link http://php.net/manual/en/apcuiterator.next.php
- * @return bool Returns TRUE on success or FALSE on failure.
- */
- public function next(){}
-
- /**
- * Gets the total number of cache hits
- * @link http://php.net/manual/en/apcuiterator.gettotalhits.php
- * @return int|bool The number of hits on success, or FALSE on failure.
- */
- public function getTotalHits(){}
-
- /**
- * Gets the total cache size
- * @link http://php.net/manual/en/apcuiterator.gettotalsize.php
- * @return int|bool The total cache size.
- */
- public function getTotalSize(){}
-
- /**
- * Get the total count
- * @link http://php.net/manual/en/apcuiterator.gettotalcount.php
- * @return int|bool The total count.
- */
- public function getTotalCount(){}
-}
diff --git a/build/.phan/stubs/apc.php b/build/.phan/stubs/apc.php
deleted file mode 100644
index 8e533998a9a..00000000000
--- a/build/.phan/stubs/apc.php
+++ /dev/null
@@ -1,318 +0,0 @@
-<?
-
-/**
- * Stubs for APC 3.1.4
- *
- * Author: Johnny Woo
- * Date: Aug 9, 2010
- * Time: 12:19:14 PM
- */
-
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_LIST_ACTIVE', 1);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_LIST_DELETED', 2);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_TYPE', 1);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_KEY', 2);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_FILENAME', 4);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_DEVICE', 8);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_INODE', 16);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_VALUE', 32);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_MD5', 64);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_NUM_HITS', 128);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_MTIME', 256);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_CTIME', 512);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_DTIME', 1024);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_ATIME', 2048);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_REFCOUNT', 4096);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_MEM_SIZE', 8192);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_TTL', 16384);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_NONE', 0);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_ITER_ALL', -1);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_BIN_VERIFY_MD5', 1);
-/**
- * @link http://php.net/manual/en/apc.constants.php
- */
-define('APC_BIN_VERIFY_CRC32', 2);
-
-/**
- * Retrieves cached information and meta-data from APC's data store
- * @link http://php.net/manual/en/function.apc-cache-info.php
- * @param string $type If cache_type is "user", information about the user cache will be returned.
- * If cache_type is "filehits", information about which files have been served from the bytecode
- * cache for the current request will be returned. This feature must be enabled at compile time
- * using --enable-filehits. If an invalid or no cache_type is specified, information about the
- * system cache (cached files) will be returned.
- * @param bool $limited If limited is TRUE, the return value will exclude the individual list
- * of cache entries. This is useful when trying to optimize calls for statistics gathering.
- * @return array|bool Array of cached data (and meta-data) or FALSE on failure.
- */
-function apc_cache_info($type = '', $limited = false){}
-
-/**
- * Clears the APC cache
- * @link http://php.net/manual/en/function.apc-clear-cache.php
- * @param string $cache_type If cache_type is "user", the user cache will be cleared;
- * otherwise, the system cache (cached files) will be cleared.
- * @return bool Returns TRUE on success or FALSE on failure.
- */
-function apc_clear_cache($cache_type = ''){}
-
-/**
- * Retrieves APC's Shared Memory Allocation information
- * @link http://php.net/manual/en/function.apc-sma-info.php
- * @param bool $limited When set to FALSE (default) apc_sma_info() will
- * return a detailed information about each segment.
- * @return array|bool Array of Shared Memory Allocation data; FALSE on failure.
- */
-function apc_sma_info($limited = false){}
-
-/**
- * Cache a variable in the data store
- * @link http://php.net/manual/en/function.apc-store.php
- * @param string|array $key String: Store the variable using this name. Keys are cache-unique,
- * so storing a second value with the same key will overwrite the original value.
- * Array: Names in key, variables in value.
- * @param mixed $var [optional] The variable to store
- * @param int $ttl [optional] Time To Live; store var in the cache for ttl seconds. After the ttl has passed,
- * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied
- * (or if the ttl is 0), the value will persist until it is removed from the cache manually,
- * or otherwise fails to exist in the cache (clear, restart, etc.).
- * @return bool|array Returns TRUE on success or FALSE on failure | array with error keys.
- */
-function apc_store($key, $var, $ttl = 0){}
-
-/**
- * Fetch a stored variable from the cache
- * @link http://php.net/manual/en/function.apc-fetch.php
- * @param string|string[] $key The key used to store the value (with apc_store()).
- * If an array is passed then each element is fetched and returned.
- * @param bool $success Set to TRUE in success and FALSE in failure.
- * @return mixed The stored variable or array of variables on success; FALSE on failure.
- */
-function apc_fetch($key, &$success = null){}
-
-/**
- * Removes a stored variable from the cache
- * @link http://php.net/manual/en/function.apc-delete.php
- * @param string|string[]|APCIterator $key The key used to store the value (with apc_store()).
- * @return bool|string[] Returns TRUE on success or FALSE on failure. For array of keys returns list of failed keys.
- */
-function apc_delete($key){}
-
-/**
- * Defines a set of constants for retrieval and mass-definition
- *
- * define() is notoriously slow. Since the main benefit of APC is to increase
- * the performance of scripts/applications, this mechanism is provided to streamline
- * the process of mass constant definition. However, this function does not perform
- * as well as anticipated. For a better-performing solution, try the hidef extension from PECL.
- *
- * @link http://php.net/manual/en/function.apc-define-constants.php
- * @param string $key The key serves as the name of the constant set being stored.
- * This key is used to retrieve the stored constants in apc_load_constants().
- * @param array $constants An associative array of constant_name => value pairs.
- * The constant_name must follow the normal constant naming rules. Value must evaluate to a scalar value.
- * @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive;
- * i.e. CONSTANT and Constant represent different values. If this parameter evaluates to FALSE
- * the constants will be declared as case-insensitive symbols.
- * @return bool Returns TRUE on success or FALSE on failure.
- */
-function apc_define_constants($key, array $constants, $case_sensitive = true){}
-
-/**
- * Caches a variable in the data store, only if it's not already stored
- * @link http://php.net/manual/en/function.apc-add.php
- * @param string $key Store the variable using this name. Keys are cache-unique,
- * so attempting to use apc_add() to store data with a key that already exists will not
- * overwrite the existing data, and will instead return FALSE. (This is the only difference
- * between apc_add() and apc_store().)
- * @param mixed $var The variable to store
- * @param int $ttl Time To Live; store var in the cache for ttl seconds. After the ttl has passed,
- * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied
- * (or if the ttl is 0), the value will persist until it is removed from the cache manually,
- * or otherwise fails to exist in the cache (clear, restart, etc.).
- * @return bool
- */
-function apc_add($key, $var, $ttl = 0){}
-
-/**
- * Stores a file in the bytecode cache, bypassing all filters
- * @link http://php.net/manual/en/function.apc-compile-file.php
- * @param string|string[] $filename Full or relative path to a PHP file that will be
- * compiled and stored in the bytecode cache.
- * @param bool $atomic
- * @return bool Returns TRUE on success or FALSE on failure.
- */
-function apc_compile_file($filename, $atomic = true){}
-
-/**
- * Loads a set of constants from the cache
- * @link http://php.net/manual/en/function.apc-load-constants.php
- * @param string $key The name of the constant set (that was stored
- * with apc_define_constants()) to be retrieved.
- * @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive;
- * i.e. CONSTANT and Constant represent different values. If this parameter evaluates to FALSE
- * the constants will be declared as case-insensitive symbols.
- * @return bool Returns TRUE on success or FALSE on failure.
- */
-function apc_load_constants($key, $case_sensitive = true){}
-
-/**
- * Checks if APC key exists
- * @link http://php.net/manual/en/function.apc-exists.php
- * @param bool|string[] $keys A string, or an array of strings, that contain keys.
- * @return bool|string[] Returns TRUE if the key exists, otherwise FALSE
- * Or if an array was passed to keys, then an array is returned that
- * contains all existing keys, or an empty array if none exist.
- */
-function apc_exists($keys){}
-
-/**
- * Deletes the given files from the opcode cache
- *
- * Accepts a string, array of strings, or APCIterator object.
- * Returns True/False, or for an Array an Array of failed files.
- *
- * @link http://php.net/manual/en/function.apc-delete-file.php
- * @param string|string[]|APCIterator $keys
- * @return bool|string[]
- */
-function apc_delete_file($keys){}
-
-/**
- * Increase a stored number
- * @link http://php.net/manual/en/function.apc-inc.php
- * @param string $key The key of the value being increased.
- * @param int $step The step, or value to increase.
- * @param bool $success Optionally pass the success or fail boolean value to this referenced variable.
- * @return int|bool Returns the current value of key's value on success, or FALSE on failure.
- */
-function apc_inc($key, $step = 1, &$success = null){}
-
-/**
- * Decrease a stored number
- * @link http://php.net/manual/en/function.apc-dec.php
- * @param string $key The key of the value being decreased.
- * @param int $step The step, or value to decrease.
- * @param bool $success Optionally pass the success or fail boolean value to this referenced variable.
- * @return int|bool Returns the current value of key's value on success, or FALSE on failure.
- */
-function apc_dec($key, $step = 1, &$success = null){}
-
-/**
- * @link http://php.net/manual/en/function.apc-cas.php
- * @param string $key
- * @param int $old
- * @param int $new
- * @return bool
- */
-function apc_cas($key, $old, $new){}
-
-/**
- * Returns a binary dump of the given files and user variables from the APC cache
- *
- * A NULL for files or user_vars signals a dump of every entry, while array() will dump nothing.
- *
- * @link http://php.net/manual/en/function.apc-bin-dump.php
- * @param string[]|null $files The files. Passing in NULL signals a dump of every entry, while passing in array() will dump nothing.
- * @param string[]|null $user_vars The user vars. Passing in NULL signals a dump of every entry, while passing in array() will dump nothing.
- * @return string|bool|null Returns a binary dump of the given files and user variables from the APC cache, FALSE if APC is not enabled, or NULL if an unknown error is encountered.
- */
-function apc_bin_dump($files = null, $user_vars = null){}
-
-/**
- * Output a binary dump of the given files and user variables from the APC cache to the named file
- * @link http://php.net/manual/en/function.apc-bin-dumpfile.php
- * @param string[]|null $files The file names being dumped.
- * @param string[]|null $user_vars The user variables being dumped.
- * @param string $filename The filename where the dump is being saved.
- * @param int $flags Flags passed to the filename stream. See the file_put_contents() documentation for details.
- * @param resource $context The context passed to the filename stream. See the file_put_contents() documentation for details.
- * @return int|bool The number of bytes written to the file, otherwise FALSE if APC
- * is not enabled, filename is an invalid file name, filename can't be opened,
- * the file dump can't be completed (e.g., the hard drive is out of disk space),
- * or an unknown error was encountered.
- */
-function apc_bin_dumpfile($files, $user_vars, $filename, $flags = 0, $context = null){}
-
-/**
- * Load the given binary dump into the APC file/user cache
- * @link http://php.net/manual/en/function.apc-bin-load.php
- * @param string $data The binary dump being loaded, likely from apc_bin_dump().
- * @param int $flags Either APC_BIN_VERIFY_CRC32, APC_BIN_VERIFY_MD5, or both.
- * @return bool Returns TRUE if the binary dump data was loaded with success, otherwise FALSE is returned.
- * FALSE is returned if APC is not enabled, or if the data is not a valid APC binary dump (e.g., unexpected size).
- */
-function apc_bin_load($data, $flags = 0){}
-
-/**
- * Load the given binary dump from the named file into the APC file/user cache
- * @link http://php.net/manual/en/function.apc-bin-loadfile.php
- * @param string $filename The file name containing the dump, likely from apc_bin_dumpfile().
- * @param resource $context The files context.
- * @param int $flags Either APC_BIN_VERIFY_CRC32, APC_BIN_VERIFY_MD5, or both.
- * @return bool Returns TRUE on success, otherwise FALSE Reasons it may return FALSE include APC
- * is not enabled, filename is an invalid file name or empty, filename can't be opened,
- * the file dump can't be completed, or if the data is not a valid APC binary dump (e.g., unexpected size).
- */
-function apc_bin_loadfile($filename, $context = null, $flags = 0){}
-
diff --git a/build/.phan/stubs/apcu.php b/build/.phan/stubs/apcu.php
deleted file mode 100644
index f08f860d4f7..00000000000
--- a/build/.phan/stubs/apcu.php
+++ /dev/null
@@ -1,235 +0,0 @@
-<?php
-
-/**
- * Stubs for APCu 5.0.0
- */
-
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_LIST_ACTIVE', 1);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_LIST_DELETED', 2);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_TYPE', 1);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_KEY', 2);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_FILENAME', 4);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_DEVICE', 8);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_INODE', 16);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_VALUE', 32);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_MD5', 64);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_NUM_HITS', 128);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_MTIME', 256);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_CTIME', 512);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_DTIME', 1024);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_ATIME', 2048);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_REFCOUNT', 4096);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_MEM_SIZE', 8192);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_TTL', 16384);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_NONE', 0);
-/**
- * @link http://php.net/manual/en/apcu.constants.php
- */
-define('APC_ITER_ALL', -1);
-
-
-/**
- * Clears the APCu cache
- * @link http://php.net/manual/en/function.apcu-clear-cache.php
- *
- * @return bool Returns TRUE always.
- */
-function apcu_clear_cache(){}
-
-/**
- * Retrieves APCu Shared Memory Allocation information
- * @link http://php.net/manual/en/function.apcu-sma-info.php
- * @param bool $limited When set to FALSE (default) apcu_sma_info() will
- * return a detailed information about each segment.
- *
- * @return array|bool Array of Shared Memory Allocation data; FALSE on failure.
- */
-function apcu_sma_info($limited = false){}
-
-/**
- * Cache a variable in the data store
- * @link http://php.net/manual/en/function.apcu-store.php
- * @param string|array $key String: Store the variable using this name. Keys are cache-unique,
- * so storing a second value with the same key will overwrite the original value.
- * Array: Names in key, variables in value.
- * @param mixed $var [optional] The variable to store
- * @param int $ttl [optional] Time To Live; store var in the cache for ttl seconds. After the ttl has passed,
- * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied
- * (or if the ttl is 0), the value will persist until it is removed from the cache manually,
- * or otherwise fails to exist in the cache (clear, restart, etc.).
- * @return bool|array Returns TRUE on success or FALSE on failure | array with error keys.
- */
-function apcu_store($key, $var, $ttl = 0){}
-
-/**
- * Fetch a stored variable from the cache
- * @link http://php.net/manual/en/function.apcu-fetch.php
- * @param string|string[] $key The key used to store the value (with apcu_store()).
- * If an array is passed then each element is fetched and returned.
- * @param bool $success Set to TRUE in success and FALSE in failure.
- * @return mixed The stored variable or array of variables on success; FALSE on failure.
- */
-function apcu_fetch($key, &$success = null){}
-
-/**
- * Removes a stored variable from the cache
- * @link http://php.net/manual/en/function.apcu-delete.php
- * @param string|string[]|APCUIterator $key The key used to store the value (with apcu_store()).
- * @return bool|string[] Returns TRUE on success or FALSE on failure. For array of keys returns list of failed keys.
- */
-function apcu_delete($key){}
-
-/**
- * Caches a variable in the data store, only if it's not already stored
- * @link http://php.net/manual/en/function.apcu-add.php
- * @param string $key Store the variable using this name. Keys are cache-unique,
- * so attempting to use apcu_add() to store data with a key that already exists will not
- * overwrite the existing data, and will instead return FALSE. (This is the only difference
- * between apcu_add() and apcu_store().)
- * @param mixed $var The variable to store
- * @param int $ttl Time To Live; store var in the cache for ttl seconds. After the ttl has passed,
- * the stored variable will be expunged from the cache (on the next request). If no ttl is supplied
- * (or if the ttl is 0), the value will persist until it is removed from the cache manually,
- * or otherwise fails to exist in the cache (clear, restart, etc.).
- * @return bool
- */
-function apcu_add($key, $var, $ttl = 0){}
-
-/**
- * Checks if APCu key exists
- * @link http://php.net/manual/en/function.apcu-exists.php
- * @param string|string[] $keys A string, or an array of strings, that contain keys.
- * @return bool|string[] Returns TRUE if the key exists, otherwise FALSE
- * Or if an array was passed to keys, then an array is returned that
- * contains all existing keys, or an empty array if none exist.
- */
-function apcu_exists($keys){}
-
-/**
- * Increase a stored number
- * @link http://php.net/manual/en/function.apcu-inc.php
- * @param string $key The key of the value being increased.
- * @param int $step The step, or value to increase.
- * @param bool $success Optionally pass the success or fail boolean value to this referenced variable.
- * @return int|bool Returns the current value of key's value on success, or FALSE on failure.
- */
-function apcu_inc($key, $step = 1, &$success = null){}
-
-/**
- * Decrease a stored number
- * @link http://php.net/manual/en/function.apcu-dec.php
- * @param string $key The key of the value being decreased.
- * @param int $step The step, or value to decrease.
- * @param bool $success Optionally pass the success or fail boolean value to this referenced variable.
- * @return int|bool Returns the current value of key's value on success, or FALSE on failure.
- */
-function apcu_dec($key, $step = 1, &$success = null){}
-
-/**
- * Updates an old value with a new value
- *
- * apcu_cas() updates an already existing integer value if the old parameter matches the currently stored value
- * with the value of the new parameter.
- *
- * @link http://php.net/manual/en/function.apcu-cas.php
- * @param string $key The key of the value being updated.
- * @param int $old The old value (the value currently stored).
- * @param int $new The new value to update to.
- * @return bool Returns TRUE on success or FALSE on failure.
- */
-function apcu_cas($key, $old, $new){}
-
-/**
- * Atomically fetch or generate a cache entry
- *
- * <p>Atomically attempts to find key in the cache, if it cannot be found generator is called,
- * passing key as the only argument. The return value of the call is then cached with the optionally
- * specified ttl, and returned.
- * </p>
- *
- * <p>Note: When control enters <i>apcu_entry()</i> the lock for the cache is acquired exclusively, it is released when
- * control leaves apcu_entry(): In effect, this turns the body of generator into a critical section,
- * disallowing two processes from executing the same code paths concurrently.
- * In addition, it prohibits the concurrent execution of any other APCu functions,
- * since they will acquire the same lock.
- * </p>
- *
- * @link http://php.net/manual/en/function.apcu-entry.php
- *
- * @param string $key Identity of cache entry
- * @param callable $generator A callable that accepts key as the only argument and returns the value to cache.
- * <p>Warning
- * The only APCu function that can be called safely by generator is apcu_entry().</p>
- * @param int $ttl [optional] Time To Live; store var in the cache for ttl seconds.
- * After the ttl has passed, the stored variable will be expunged from the cache (on the next request).
- * If no ttl is supplied (or if the ttl is 0), the value will persist until it is removed from the cache manually,
- * or otherwise fails to exist in the cache (clear, restart, etc.).
- * @return mixed Returns the cached value
- * @since APCu 5.1.0
- */
-function apcu_entry($key, callable $generator, $ttl = 0){}
-
-/**
- * Retrieves cached information from APCu's data store
- *
- * @link http://php.net/manual/en/function.apcu-cache-info.php
- *
- * @param bool $limited If limited is TRUE, the return value will exclude the individual list of cache entries.
- * This is useful when trying to optimize calls for statistics gathering.
- * @return array|bool Array of cached data (and meta-data) or FALSE on failure
- */
-function apcu_cache_info($limited = false){}
diff --git a/build/.phan/stubs/memcached.php b/build/.phan/stubs/memcached.php
deleted file mode 100644
index 2c8aced175e..00000000000
--- a/build/.phan/stubs/memcached.php
+++ /dev/null
@@ -1,1257 +0,0 @@
-<?php
-// Start of memcached v.2.1.0
-
-/**
- * Represents a connection to a set of memcached servers.
- * @link http://php.net/manual/en/class.memcached.php
- */
-class Memcached {
-
- /**
- * <p>Enables or disables payload compression. When enabled,
- * item values longer than a certain threshold (currently 100 bytes) will be
- * compressed during storage and decompressed during retrieval
- * transparently.</p>
- * <p>Type: boolean, default: <b>TRUE</b>.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_COMPRESSION = -1001;
- const OPT_COMPRESSION_TYPE = -1004;
-
- /**
- * <p>This can be used to create a "domain" for your item keys. The value
- * specified here will be prefixed to each of the keys. It cannot be
- * longer than 128 characters and will reduce the
- * maximum available key size. The prefix is applied only to the item keys,
- * not to the server keys.</p>
- * <p>Type: string, default: "".</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_PREFIX_KEY = -1002;
-
- /**
- * <p>
- * Specifies the serializer to use for serializing non-scalar values.
- * The valid serializers are <b>Memcached::SERIALIZER_PHP</b>
- * or <b>Memcached::SERIALIZER_IGBINARY</b>. The latter is
- * supported only when memcached is configured with
- * --enable-memcached-igbinary option and the
- * igbinary extension is loaded.
- * </p>
- * <p>Type: integer, default: <b>Memcached::SERIALIZER_PHP</b>.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_SERIALIZER = -1003;
-
- /**
- * <p>Indicates whether igbinary serializer support is available.</p>
- * <p>Type: boolean.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const HAVE_IGBINARY = 0;
-
- /**
- * <p>Indicates whether JSON serializer support is available.</p>
- * <p>Type: boolean.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const HAVE_JSON = 0;
- const HAVE_SESSION = 1;
- const HAVE_SASL = 0;
-
- /**
- * <p>Specifies the hashing algorithm used for the item keys. The valid
- * values are supplied via <b>Memcached::HASH_*</b> constants.
- * Each hash algorithm has its advantages and its disadvantages. Go with the
- * default if you don't know or don't care.</p>
- * <p>Type: integer, default: <b>Memcached::HASH_DEFAULT</b></p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_HASH = 2;
-
- /**
- * <p>The default (Jenkins one-at-a-time) item key hashing algorithm.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const HASH_DEFAULT = 0;
-
- /**
- * <p>MD5 item key hashing algorithm.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const HASH_MD5 = 1;
-
- /**
- * <p>CRC item key hashing algorithm.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const HASH_CRC = 2;
-
- /**
- * <p>FNV1_64 item key hashing algorithm.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const HASH_FNV1_64 = 3;
-
- /**
- * <p>FNV1_64A item key hashing algorithm.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const HASH_FNV1A_64 = 4;
-
- /**
- * <p>FNV1_32 item key hashing algorithm.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const HASH_FNV1_32 = 5;
-
- /**
- * <p>FNV1_32A item key hashing algorithm.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const HASH_FNV1A_32 = 6;
-
- /**
- * <p>Hsieh item key hashing algorithm.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const HASH_HSIEH = 7;
-
- /**
- * <p>Murmur item key hashing algorithm.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const HASH_MURMUR = 8;
-
- /**
- * <p>Specifies the method of distributing item keys to the servers.
- * Currently supported methods are modulo and consistent hashing. Consistent
- * hashing delivers better distribution and allows servers to be added to
- * the cluster with minimal cache losses.</p>
- * <p>Type: integer, default: <b>Memcached::DISTRIBUTION_MODULA.</b></p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_DISTRIBUTION = 9;
-
- /**
- * <p>Modulo-based key distribution algorithm.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const DISTRIBUTION_MODULA = 0;
-
- /**
- * <p>Consistent hashing key distribution algorithm (based on libketama).</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const DISTRIBUTION_CONSISTENT = 1;
- const DISTRIBUTION_VIRTUAL_BUCKET = 6;
-
- /**
- * <p>Enables or disables compatibility with libketama-like behavior. When
- * enabled, the item key hashing algorithm is set to MD5 and distribution is
- * set to be weighted consistent hashing distribution. This is useful
- * because other libketama-based clients (Python, Ruby, etc.) with the same
- * server configuration will be able to access the keys transparently.
- * </p>
- * <p>
- * It is highly recommended to enable this option if you want to use
- * consistent hashing, and it may be enabled by default in future
- * releases.
- * </p>
- * <p>Type: boolean, default: <b>FALSE</b>.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_LIBKETAMA_COMPATIBLE = 16;
- const OPT_LIBKETAMA_HASH = 17;
- const OPT_TCP_KEEPALIVE = 32;
-
- /**
- * <p>Enables or disables buffered I/O. Enabling buffered I/O causes
- * storage commands to "buffer" instead of being sent. Any action that
- * retrieves data causes this buffer to be sent to the remote connection.
- * Quitting the connection or closing down the connection will also cause
- * the buffered data to be pushed to the remote connection.</p>
- * <p>Type: boolean, default: <b>FALSE</b>.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_BUFFER_WRITES = 10;
-
- /**
- * <p>Enable the use of the binary protocol. Please note that you cannot
- * toggle this option on an open connection.</p>
- * <p>Type: boolean, default: <b>FALSE</b>.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_BINARY_PROTOCOL = 18;
-
- /**
- * <p>Enables or disables asynchronous I/O. This is the fastest transport
- * available for storage functions.</p>
- * <p>Type: boolean, default: <b>FALSE</b>.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_NO_BLOCK = 0;
-
- /**
- * <p>Enables or disables the no-delay feature for connecting sockets (may
- * be faster in some environments).</p>
- * <p>Type: boolean, default: <b>FALSE</b>.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_TCP_NODELAY = 1;
-
- /**
- * <p>The maximum socket send buffer in bytes.</p>
- * <p>Type: integer, default: varies by platform/kernel
- * configuration.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_SOCKET_SEND_SIZE = 4;
-
- /**
- * <p>The maximum socket receive buffer in bytes.</p>
- * <p>Type: integer, default: varies by platform/kernel
- * configuration.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_SOCKET_RECV_SIZE = 5;
-
- /**
- * <p>In non-blocking mode this set the value of the timeout during socket
- * connection, in milliseconds.</p>
- * <p>Type: integer, default: 1000.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_CONNECT_TIMEOUT = 14;
-
- /**
- * <p>The amount of time, in seconds, to wait until retrying a failed
- * connection attempt.</p>
- * <p>Type: integer, default: 0.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_RETRY_TIMEOUT = 15;
-
- /**
- * <p>Socket sending timeout, in microseconds. In cases where you cannot
- * use non-blocking I/O this will allow you to still have timeouts on the
- * sending of data.</p>
- * <p>Type: integer, default: 0.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_SEND_TIMEOUT = 19;
-
- /**
- * <p>Socket reading timeout, in microseconds. In cases where you cannot
- * use non-blocking I/O this will allow you to still have timeouts on the
- * reading of data.</p>
- * <p>Type: integer, default: 0.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_RECV_TIMEOUT = 20;
-
- /**
- * <p>Timeout for connection polling, in milliseconds.</p>
- * <p>Type: integer, default: 1000.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_POLL_TIMEOUT = 8;
-
- /**
- * <p>Enables or disables caching of DNS lookups.</p>
- * <p>Type: boolean, default: <b>FALSE</b>.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_CACHE_LOOKUPS = 6;
-
- /**
- * <p>Specifies the failure limit for server connection attempts. The
- * server will be removed after this many continuous connection
- * failures.</p>
- * <p>Type: integer, default: 0.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const OPT_SERVER_FAILURE_LIMIT = 21;
- const OPT_AUTO_EJECT_HOSTS = 28;
- const OPT_HASH_WITH_PREFIX_KEY = 25;
- const OPT_NOREPLY = 26;
- const OPT_SORT_HOSTS = 12;
- const OPT_VERIFY_KEY = 13;
- const OPT_USE_UDP = 27;
- const OPT_NUMBER_OF_REPLICAS = 29;
- const OPT_RANDOMIZE_REPLICA_READ = 30;
- const OPT_REMOVE_FAILED_SERVERS = 35;
-
- /**
- * <p>The operation was successful.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_SUCCESS = 0;
-
- /**
- * <p>The operation failed in some fashion.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_FAILURE = 1;
-
- /**
- * <p>DNS lookup failed.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_HOST_LOOKUP_FAILURE = 2;
-
- /**
- * <p>Failed to read network data.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_UNKNOWN_READ_FAILURE = 7;
-
- /**
- * <p>Bad command in memcached protocol.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_PROTOCOL_ERROR = 8;
-
- /**
- * <p>Error on the client side.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_CLIENT_ERROR = 9;
-
- /**
- * <p>Error on the server side.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_SERVER_ERROR = 10;
-
- /**
- * <p>Failed to write network data.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_WRITE_FAILURE = 5;
-
- /**
- * <p>Failed to do compare-and-swap: item you are trying to store has been
- * modified since you last fetched it.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_DATA_EXISTS = 12;
-
- /**
- * <p>Item was not stored: but not because of an error. This normally
- * means that either the condition for an "add" or a "replace" command
- * wasn't met, or that the item is in a delete queue.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_NOTSTORED = 14;
-
- /**
- * <p>Item with this key was not found (with "get" operation or "cas"
- * operations).</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_NOTFOUND = 16;
-
- /**
- * <p>Partial network data read error.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_PARTIAL_READ = 18;
-
- /**
- * <p>Some errors occurred during multi-get.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_SOME_ERRORS = 19;
-
- /**
- * <p>Server list is empty.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_NO_SERVERS = 20;
-
- /**
- * <p>End of result set.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_END = 21;
-
- /**
- * <p>System error.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_ERRNO = 26;
-
- /**
- * <p>The operation was buffered.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_BUFFERED = 32;
-
- /**
- * <p>The operation timed out.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_TIMEOUT = 31;
-
- /**
- * <p>Bad key.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_BAD_KEY_PROVIDED = 33;
- const RES_STORED = 15;
- const RES_DELETED = 22;
- const RES_STAT = 24;
- const RES_ITEM = 25;
- const RES_NOT_SUPPORTED = 28;
- const RES_FETCH_NOTFINISHED = 30;
- const RES_SERVER_MARKED_DEAD = 35;
- const RES_UNKNOWN_STAT_KEY = 36;
- const RES_INVALID_HOST_PROTOCOL = 34;
- const RES_MEMORY_ALLOCATION_FAILURE = 17;
- const RES_E2BIG = 37;
- const RES_KEY_TOO_BIG = 39;
- const RES_SERVER_TEMPORARILY_DISABLED = 47;
- const RES_SERVER_MEMORY_ALLOCATION_FAILURE = 48;
- const RES_AUTH_PROBLEM = 40;
- const RES_AUTH_FAILURE = 41;
- const RES_AUTH_CONTINUE = 42;
-
-
- /**
- * <p>Failed to create network socket.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_CONNECTION_SOCKET_CREATE_FAILURE = 11;
-
- /**
- * <p>Payload failure: could not compress/decompress or serialize/unserialize the value.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const RES_PAYLOAD_FAILURE = -1001;
-
- /**
- * <p>The default PHP serializer.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const SERIALIZER_PHP = 1;
-
- /**
- * <p>The igbinary serializer.
- * Instead of textual representation it stores PHP data structures in a
- * compact binary form, resulting in space and time gains.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const SERIALIZER_IGBINARY = 2;
-
- /**
- * <p>The JSON serializer. Requires PHP 5.2.10+.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const SERIALIZER_JSON = 3;
- const SERIALIZER_JSON_ARRAY = 4;
- const COMPRESSION_FASTLZ = 2;
- const COMPRESSION_ZLIB = 1;
-
- /**
- * <p>A flag for <b>Memcached::getMulti</b> and
- * <b>Memcached::getMultiByKey</b> to ensure that the keys are
- * returned in the same order as they were requested in. Non-existing keys
- * get a default value of NULL.</p>
- * @link http://php.net/manual/en/memcached.constants.php
- */
- const GET_PRESERVE_ORDER = 1;
- const GET_ERROR_RETURN_VALUE = false;
-
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Create a Memcached instance
- * @link http://php.net/manual/en/memcached.construct.php
- * @param $persistent_id [optional]
- * @param $callback [optional]
- */
- public function __construct ($persistent_id, $callback) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Return the result code of the last operation
- * @link http://php.net/manual/en/memcached.getresultcode.php
- * @return int Result code of the last Memcached operation.
- */
- public function getResultCode () {}
-
- /**
- * (PECL memcached &gt;= 1.0.0)<br/>
- * Return the message describing the result of the last operation
- * @link http://php.net/manual/en/memcached.getresultmessage.php
- * @return string Message describing the result of the last Memcached operation.
- */
- public function getResultMessage () {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Retrieve an item
- * @link http://php.net/manual/en/memcached.get.php
- * @param string $key <p>
- * The key of the item to retrieve.
- * </p>
- * @param callable $cache_cb [optional] <p>
- * Read-through caching callback or <b>NULL</b>.
- * </p>
- * @param float $cas_token [optional] <p>
- * The variable to store the CAS token in.
- * </p>
- * @return mixed the value stored in the cache or <b>FALSE</b> otherwise.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
- */
- public function get ($key, callable $cache_cb = null, &$cas_token = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Retrieve an item from a specific server
- * @link http://php.net/manual/en/memcached.getbykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param string $key <p>
- * The key of the item to fetch.
- * </p>
- * @param callable $cache_cb [optional] <p>
- * Read-through caching callback or <b>NULL</b>
- * </p>
- * @param float $cas_token [optional] <p>
- * The variable to store the CAS token in.
- * </p>
- * @return mixed the value stored in the cache or <b>FALSE</b> otherwise.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
- */
- public function getByKey ($server_key, $key, callable $cache_cb = null, &$cas_token = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Retrieve multiple items
- * @link http://php.net/manual/en/memcached.getmulti.php
- * @param array $keys <p>
- * Array of keys to retrieve.
- * </p>
- * @param array $cas_tokens [optional] <p>
- * The variable to store the CAS tokens for the found items.
- * </p>
- * @param int $flags [optional] <p>
- * The flags for the get operation.
- * </p>
- * @return mixed the array of found items or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function getMulti (array $keys, array &$cas_tokens = null, $flags = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Retrieve multiple items from a specific server
- * @link http://php.net/manual/en/memcached.getmultibykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param array $keys <p>
- * Array of keys to retrieve.
- * </p>
- * @param string $cas_tokens [optional] <p>
- * The variable to store the CAS tokens for the found items.
- * </p>
- * @param int $flags [optional] <p>
- * The flags for the get operation.
- * </p>
- * @return array the array of found items or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function getMultiByKey ($server_key, array $keys, &$cas_tokens = null, $flags = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Request multiple items
- * @link http://php.net/manual/en/memcached.getdelayed.php
- * @param array $keys <p>
- * Array of keys to request.
- * </p>
- * @param bool $with_cas [optional] <p>
- * Whether to request CAS token values also.
- * </p>
- * @param callable $value_cb [optional] <p>
- * The result callback or <b>NULL</b>.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function getDelayed (array $keys, $with_cas = null, callable $value_cb = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Request multiple items from a specific server
- * @link http://php.net/manual/en/memcached.getdelayedbykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param array $keys <p>
- * Array of keys to request.
- * </p>
- * @param bool $with_cas [optional] <p>
- * Whether to request CAS token values also.
- * </p>
- * @param callable $value_cb [optional] <p>
- * The result callback or <b>NULL</b>.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function getDelayedByKey ($server_key, array $keys, $with_cas = null, callable $value_cb = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Fetch the next result
- * @link http://php.net/manual/en/memcached.fetch.php
- * @return array the next result or <b>FALSE</b> otherwise.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_END</b> if result set is exhausted.
- */
- public function fetch () {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Fetch all the remaining results
- * @link http://php.net/manual/en/memcached.fetchall.php
- * @return array the results or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function fetchAll () {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Store an item
- * @link http://php.net/manual/en/memcached.set.php
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param mixed $value <p>
- * The value to store.
- * </p>
- * @param int $expiration [optional] <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function set ($key, $value, $expiration = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Store an item on a specific server
- * @link http://php.net/manual/en/memcached.setbykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param mixed $value <p>
- * The value to store.
- * </p>
- * @param int $expiration [optional] <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function setByKey ($server_key, $key, $value, $expiration = null) {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Set a new expiration on an item
- * @link http://php.net/manual/en/memcached.touch.php
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param int $expiration <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function touch ($key, $expiration) {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Set a new expiration on an item on a specific server
- * @link http://php.net/manual/en/memcached.touchbykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param int $expiration <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function touchByKey ($server_key, $key, $expiration) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Store multiple items
- * @link http://php.net/manual/en/memcached.setmulti.php
- * @param array $items <p>
- * An array of key/value pairs to store on the server.
- * </p>
- * @param int $expiration [optional] <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function setMulti (array $items, $expiration = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Store multiple items on a specific server
- * @link http://php.net/manual/en/memcached.setmultibykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param array $items <p>
- * An array of key/value pairs to store on the server.
- * </p>
- * @param int $expiration [optional] <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function setMultiByKey ($server_key, array $items, $expiration = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Compare and swap an item
- * @link http://php.net/manual/en/memcached.cas.php
- * @param float $cas_token <p>
- * Unique value associated with the existing item. Generated by memcache.
- * </p>
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param mixed $value <p>
- * The value to store.
- * </p>
- * @param int $expiration [optional] <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_DATA_EXISTS</b> if the item you are trying
- * to store has been modified since you last fetched it.
- */
- public function cas ($cas_token, $key, $value, $expiration = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Compare and swap an item on a specific server
- * @link http://php.net/manual/en/memcached.casbykey.php
- * @param float $cas_token <p>
- * Unique value associated with the existing item. Generated by memcache.
- * </p>
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param mixed $value <p>
- * The value to store.
- * </p>
- * @param int $expiration [optional] <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_DATA_EXISTS</b> if the item you are trying
- * to store has been modified since you last fetched it.
- */
- public function casByKey ($cas_token, $server_key, $key, $value, $expiration = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Add an item under a new key
- * @link http://php.net/manual/en/memcached.add.php
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param mixed $value <p>
- * The value to store.
- * </p>
- * @param int $expiration [optional] <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTSTORED</b> if the key already exists.
- */
- public function add ($key, $value, $expiration = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Add an item under a new key on a specific server
- * @link http://php.net/manual/en/memcached.addbykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param mixed $value <p>
- * The value to store.
- * </p>
- * @param int $expiration [optional] <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTSTORED</b> if the key already exists.
- */
- public function addByKey ($server_key, $key, $value, $expiration = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Append data to an existing item
- * @link http://php.net/manual/en/memcached.append.php
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param string $value <p>
- * The string to append.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
- */
- public function append ($key, $value) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Append data to an existing item on a specific server
- * @link http://php.net/manual/en/memcached.appendbykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param string $value <p>
- * The string to append.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
- */
- public function appendByKey ($server_key, $key, $value) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Prepend data to an existing item
- * @link http://php.net/manual/en/memcached.prepend.php
- * @param string $key <p>
- * The key of the item to prepend the data to.
- * </p>
- * @param string $value <p>
- * The string to prepend.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
- */
- public function prepend ($key, $value) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Prepend data to an existing item on a specific server
- * @link http://php.net/manual/en/memcached.prependbykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param string $key <p>
- * The key of the item to prepend the data to.
- * </p>
- * @param string $value <p>
- * The string to prepend.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
- */
- public function prependByKey ($server_key, $key, $value) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Replace the item under an existing key
- * @link http://php.net/manual/en/memcached.replace.php
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param mixed $value <p>
- * The value to store.
- * </p>
- * @param int $expiration [optional] <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
- */
- public function replace ($key, $value, $expiration = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Replace the item under an existing key on a specific server
- * @link http://php.net/manual/en/memcached.replacebykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param string $key <p>
- * The key under which to store the value.
- * </p>
- * @param mixed $value <p>
- * The value to store.
- * </p>
- * @param int $expiration [optional] <p>
- * The expiration time, defaults to 0. See Expiration Times for more info.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
- */
- public function replaceByKey ($server_key, $key, $value, $expiration = null) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Delete an item
- * @link http://php.net/manual/en/memcached.delete.php
- * @param string $key <p>
- * The key to be deleted.
- * </p>
- * @param int $time [optional] <p>
- * The amount of time the server will wait to delete the item.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
- */
- public function delete ($key, $time = 0) {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Delete multiple items
- * @link http://php.net/manual/en/memcached.deletemulti.php
- * @param array $keys <p>
- * The keys to be deleted.
- * </p>
- * @param int $time [optional] <p>
- * The amount of time the server will wait to delete the items.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
- */
- public function deleteMulti (array $keys, $time = 0) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Delete an item from a specific server
- * @link http://php.net/manual/en/memcached.deletebykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param string $key <p>
- * The key to be deleted.
- * </p>
- * @param int $time [optional] <p>
- * The amount of time the server will wait to delete the item.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
- */
- public function deleteByKey ($server_key, $key, $time = 0) {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Delete multiple items from a specific server
- * @link http://php.net/manual/en/memcached.deletemultibykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param array $keys <p>
- * The keys to be deleted.
- * </p>
- * @param int $time [optional] <p>
- * The amount of time the server will wait to delete the items.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * The <b>Memcached::getResultCode</b> will return
- * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
- */
- public function deleteMultiByKey ($server_key, array $keys, $time = 0) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Increment numeric item's value
- * @link http://php.net/manual/en/memcached.increment.php
- * @param string $key <p>
- * The key of the item to increment.
- * </p>
- * @param int $offset [optional] <p>
- * The amount by which to increment the item's value.
- * </p>
- * @param int $initial_value [optional] <p>
- * The value to set the item to if it doesn't currently exist.
- * </p>
- * @param int $expiry [optional] <p>
- * The expiry time to set on the item.
- * </p>
- * @return int new item's value on success or <b>FALSE</b> on failure.
- */
- public function increment ($key, $offset = 1, $initial_value = 0, $expiry = 0) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Decrement numeric item's value
- * @link http://php.net/manual/en/memcached.decrement.php
- * @param string $key <p>
- * The key of the item to decrement.
- * </p>
- * @param int $offset [optional] <p>
- * The amount by which to decrement the item's value.
- * </p>
- * @param int $initial_value [optional] <p>
- * The value to set the item to if it doesn't currently exist.
- * </p>
- * @param int $expiry [optional] <p>
- * The expiry time to set on the item.
- * </p>
- * @return int item's new value on success or <b>FALSE</b> on failure.
- */
- public function decrement ($key, $offset = 1, $initial_value = 0, $expiry = 0) {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Increment numeric item's value, stored on a specific server
- * @link http://php.net/manual/en/memcached.incrementbykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param string $key <p>
- * The key of the item to increment.
- * </p>
- * @param int $offset [optional] <p>
- * The amount by which to increment the item's value.
- * </p>
- * @param int $initial_value [optional] <p>
- * The value to set the item to if it doesn't currently exist.
- * </p>
- * @param int $expiry [optional] <p>
- * The expiry time to set on the item.
- * </p>
- * @return int new item's value on success or <b>FALSE</b> on failure.
- */
- public function incrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Decrement numeric item's value, stored on a specific server
- * @link http://php.net/manual/en/memcached.decrementbykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @param string $key <p>
- * The key of the item to decrement.
- * </p>
- * @param int $offset [optional] <p>
- * The amount by which to decrement the item's value.
- * </p>
- * @param int $initial_value [optional] <p>
- * The value to set the item to if it doesn't currently exist.
- * </p>
- * @param int $expiry [optional] <p>
- * The expiry time to set on the item.
- * </p>
- * @return int item's new value on success or <b>FALSE</b> on failure.
- */
- public function decrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Add a server to the server pool
- * @link http://php.net/manual/en/memcached.addserver.php
- * @param string $host <p>
- * The hostname of the memcache server. If the hostname is invalid, data-related
- * operations will set
- * <b>Memcached::RES_HOST_LOOKUP_FAILURE</b> result code.
- * </p>
- * @param int $port <p>
- * The port on which memcache is running. Usually, this is
- * 11211.
- * </p>
- * @param int $weight [optional] <p>
- * The weight of the server relative to the total weight of all the
- * servers in the pool. This controls the probability of the server being
- * selected for operations. This is used only with consistent distribution
- * option and usually corresponds to the amount of memory available to
- * memcache on that server.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- */
- public function addServer ($host, $port, $weight = 0) {}
-
- /**
- * (PECL memcached &gt;= 0.1.1)<br/>
- * Add multiple servers to the server pool
- * @link http://php.net/manual/en/memcached.addservers.php
- * @param array $servers
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- */
- public function addServers (array $servers) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Get the list of the servers in the pool
- * @link http://php.net/manual/en/memcached.getserverlist.php
- * @return array The list of all servers in the server pool.
- */
- public function getServerList () {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Map a key to a server
- * @link http://php.net/manual/en/memcached.getserverbykey.php
- * @param string $server_key <p>
- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
- * </p>
- * @return array an array containing three keys of host,
- * port, and weight on success or <b>FALSE</b>
- * on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function getServerByKey ($server_key) {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Clears all servers from the server list
- * @link http://php.net/manual/en/memcached.resetserverlist.php
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- */
- public function resetServerList () {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Close any open connections
- * @link http://php.net/manual/en/memcached.quit.php
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- */
- public function quit () {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Get server pool statistics
- * @link http://php.net/manual/en/memcached.getstats.php
- * @return array Array of server statistics, one entry per server.
- */
- public function getStats () {}
-
- /**
- * (PECL memcached &gt;= 0.1.5)<br/>
- * Get server pool version info
- * @link http://php.net/manual/en/memcached.getversion.php
- * @return array Array of server versions, one entry per server.
- */
- public function getVersion () {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Gets the keys stored on all the servers
- * @link http://php.net/manual/en/memcached.getallkeys.php
- * @return array the keys stored on all the servers on success or <b>FALSE</b> on failure.
- */
- public function getAllKeys () {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Invalidate all items in the cache
- * @link http://php.net/manual/en/memcached.flush.php
- * @param int $delay [optional] <p>
- * Numer of seconds to wait before invalidating the items.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- * Use <b>Memcached::getResultCode</b> if necessary.
- */
- public function flush ($delay = 0) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Retrieve a Memcached option value
- * @link http://php.net/manual/en/memcached.getoption.php
- * @param int $option <p>
- * One of the Memcached::OPT_* constants.
- * </p>
- * @return mixed the value of the requested option, or <b>FALSE</b> on
- * error.
- */
- public function getOption ($option) {}
-
- /**
- * (PECL memcached &gt;= 0.1.0)<br/>
- * Set a Memcached option
- * @link http://php.net/manual/en/memcached.setoption.php
- * @param int $option
- * @param mixed $value
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- */
- public function setOption ($option, $value) {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Set Memcached options
- * @link http://php.net/manual/en/memcached.setoptions.php
- * @param array $options <p>
- * An associative array of options where the key is the option to set and
- * the value is the new value for the option.
- * </p>
- * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
- */
- public function setOptions (array $options) {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Check if a persitent connection to memcache is being used
- * @link http://php.net/manual/en/memcached.ispersistent.php
- * @return bool true if Memcache instance uses a persistent connection, false otherwise.
- */
- public function isPersistent () {}
-
- /**
- * (PECL memcached &gt;= 2.0.0)<br/>
- * Check if the instance was recently created
- * @link http://php.net/manual/en/memcached.ispristine.php
- * @return bool the true if instance is recently created, false otherwise.
- */
- public function isPristine () {}
-
-}
-
-/**
- * @link http://php.net/manual/en/class.memcachedexception.php
- */
-class MemcachedException extends RuntimeException {
-
-}
-// End of memcached v.2.1.0
diff --git a/build/.phan/stubs/xcache.php b/build/.phan/stubs/xcache.php
deleted file mode 100644
index 22700b1b190..00000000000
--- a/build/.phan/stubs/xcache.php
+++ /dev/null
@@ -1,217 +0,0 @@
-<?php
-/**
- * Common Used Functions
- */
-
-/**
- * Get cached data by specified name
- *
- * @param string $name Key name
- * @return mixed
- */
-function xcache_get($name) {}
-
-/**
- * Store data to cache by specified name
- *
- * @param string $name Key name
- * @param mixed $value Value to store
- * @param int $ttl TTL in seconds
- * @return bool TRUE on success, FALSE otherwise
- */
-function xcache_set($name, $value, $ttl = 0) {}
-
-/**
- * Check if an entry exists in cache by specified name
- *
- * @param string $name Key name
- * @return bool TRUE if key exists, FALSE otherwise
- */
-function xcache_isset($name) {}
-
-/**
- * Unset existing data in cache by specified name
- *
- * @param string $name Key name
- * @return bool
- */
-function xcache_unset($name) {}
-
-/**
- * Unset existing data in cache by specified prefix
- *
- * @param string $prefix Keys' prefix
- * @return bool
- */
-function xcache_unset_by_prefix($prefix) {}
-
-/**
- * Increase an int counter in cache by specified name, create it if not exists
- *
- * @param string $name
- * @param mixed $value
- * @param int $ttl
- * @return int
- */
-function xcache_inc($name, $value = 1, $ttl = 0) {}
-
-/**
- * Decrease an int counter in cache by specified name, create it if not exists
- *
- * @param string $name
- * @param mixed $value
- * @param int $ttl
- * @return int
- */
-function xcache_dec($name, $value = 1, $ttl = 0) {}
-
-/**
- * Administrator Functions
- */
-
-/**
- * Return count of cache on specified cache type
- *
- * @param int $type
- * @return int
- */
-function xcache_count($type) {}
-
-/**
- * Get cache info by id on specified cache type
- *
- * @param int $type
- * @param int $id
- * @return array
- */
-function xcache_info($type, $id) {}
-
-/**
- * Get cache entries list by id on specified cache type
- *
- * @param int $type
- * @param int $id
- * @return array
- */
-function xcache_list($type, $id) {}
-
-/**
- * Clear cache by id on specified cache type
- *
- * @param int $type
- * @param int $id
- * @return void
- */
-function xcache_clear_cache($type, $id = -1) {}
-
-/**
- * @param int $op_type
- * @return string
- */
-function xcache_coredump($op_type) {}
-
-/**
- * Coverager Functions
- */
-
-/**
- * @param string $data
- * @return array
- */
-function xcache_coverager_decode($data) {}
-
-/**
- * @param bool $clean
- * @return void
- */
-function xcache_coverager_start($clean = true) {}
-
-/**
- * @param bool $clean
- * @return void
- */
-function xcache_coverager_stop($clean = false) {}
-
-/**
- * @param bool $clean
- * @return array
- */
-function xcache_coverager_get($clean = false) {}
-
-/**
- * Opcode Functions
- */
-
-/**
- * @param string $filename
- * @return string
- */
-function xcache_asm($filename) {}
-
-/**
- * Disassemble file into opcode array by filename
- *
- * @param string $filename
- * @return string
- */
-function xcache_dasm_file($filename) {}
-
-/**
- * Disassemble php code into opcode array
- *
- * @param string $code
- * @return string
- */
-function xcache_dasm_string($code) {}
-
-/**
- * Encode php file into XCache opcode encoded format
- *
- * @param string $filename
- * @return string
- */
-function xcache_encode($filename) {}
-
-/**
- * Decode(load) opcode from XCache encoded format file
- *
- * @param string $filename
- * @return bool
- */
-function xcache_decode($filename) {}
-
-/**
- * @param int $op_type
- * @return string
- */
-function xcache_get_op_type($op_type) {}
-
-/**
- * @param int $type
- * @return string
- */
-function xcache_get_data_type($type) {}
-
-/**
- * @param int $opcode
- * @return string
- */
-function xcache_get_opcode($opcode) {}
-
-/**
- * @param int $op_type
- * @return string
- */
-function xcache_get_op_spec($op_type) {}
-
-/**
- * @param int $opcode
- * @return string
- */
-function xcache_get_opcode_spec($opcode) {}
-
-/**
- * @param string $name
- * @return string
- */
-function xcache_is_autoglobal($name) {}
diff --git a/build/.phan/tests/SqlInjectionCheckerTest.php b/build/.phan/tests/SqlInjectionCheckerTest.php
deleted file mode 100644
index 3824d5c1704..00000000000
--- a/build/.phan/tests/SqlInjectionCheckerTest.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-$builder = \OC::$server->getDatabaseConnection()->getQueryBuilder();
-$builder->select('*')->from('ado')->where($this->qb->expr()->eq('asdf', $_GET['asdf']));
-
-class SqlInjectionCheckerTest {
- private $qb;
-
- public function __construct(\OCP\IDBConnection $dbConnection) {
- $this->qb = $dbConnection->getQueryBuilder();
- }
-
- public function testEqAndNeq() {
- $this->qb->select('*')->from('ado')->where($this->qb->expr()->eq('asdf', $this->qb->expr()->literal('myString')));
- $this->qb->select('*')->from('ado')->where($this->qb->expr()->eq('asdf', $this->qb->expr()->literal(0)));
- $this->qb->select('*')->from('ado')->where($this->qb->expr()->eq('asdf', $this->qb->expr()->literal($_GET['bar'])));
- $asdf = '123';
- $this->qb->select('*')->from('ado')->where($this->qb->expr()->eq('asdf', $this->qb->expr()->literal($asdf)));
- $asdf = 1;
- $this->qb->select('*')->from('ado')->where($this->qb->expr()->neq('asdf', $asdf));
- $asdf = '123';
- $this->qb->select('*')->from('ado')->where($this->qb->expr()->lt('asdf', $asdf));
- $this->qb->select('*')->from('ado')->where($this->qb->expr()->eq('s.resourceid', 'a.id'));
- $this->qb->select('*')->from('ado')->andWhere($this->qb->expr()->gte('asdf', $_GET['asdf']));
- $this->qb->select('*')
- ->from('ado')
- ->where($this->qb->expr()->eq('asdf', $this->qb->createNamedParameter('asdf')));
- $this->qb->select('*')
- ->from('ado')
- ->where($this->qb->expr()->eq('asdf', $this->qb->createPositionalParameter('asdf')));
- }
-
- public function testInstantiatingDatabaseConnection() {
- $qb = \OC::$server->getDatabaseConnection();
- $qb->getQueryBuilder()->select('*')->from('ado')->where($this->qb->expr()->eq('asdf', $_GET['asdf']));
- }
-
- public function testSet() {
- $this->qb->update('file_locks')->set('lock', $this->qb->createNamedParameter('lukaslukaslukas'));
- $this->qb->update('file_locks')->set('lock', '1234');
- $asdf = '1234';
- $this->qb->update('file_locks')->set('lock', $asdf);
- $this->qb->update('file_locks')->set('lock', $_GET['asdf']);
- }
-
- public function testSetValue() {
- $this->qb->update('file_locks')->setValue('lock', $this->qb->createNamedParameter('lukaslukaslukas'));
- $this->qb->update('file_locks')->setValue('lock', '1234');
- $asdf = '1234';
- $this->qb->update('file_locks')->setValue('lock', $asdf);
- $this->qb->update('file_locks')->setValue('lock', $_GET['asdf']);
- }
-} \ No newline at end of file
diff --git a/composer.json b/composer.json
index 088ee20e105..64e4f3d835a 100644
--- a/composer.json
+++ b/composer.json
@@ -22,6 +22,6 @@
"scripts": {
"cs:fix": "php-cs-fixer fix",
"cs:check": "php-cs-fixer fix --dry-run --diff",
- "lint": "find . -name \\*.php -not -path './lib/composer/*' -not -path './build/.phan/*' -not -path './build/stubs/*' -print0 | xargs -0 -n1 php -l"
+ "lint": "find . -name \\*.php -not -path './lib/composer/*' -not -path './build/stubs/*' -print0 | xargs -0 -n1 php -l"
}
}