diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 63c3aa0..109e003 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -2995,7 +2995,7 @@ function _drupal_shutdown_function() { * Compares the memory required for an operation to the available memory. * * @deprecated as of Drupal 8.0. - * Use Drupal\Core\Bootstrap\Bootstrap::checkMemoryLimit() directly + * Use \Drupal\Core\Bootstrap\Bootstrap::checkMemoryLimit() directly * instead. */ function drupal_check_memory_limit($required, $memory_limit = NULL) { diff --git a/core/lib/Drupal/Component/Utility/Bytes.php b/core/lib/Drupal/Component/Utility/Bytes.php index 7988542..0bc5aa9 100644 --- a/core/lib/Drupal/Component/Utility/Bytes.php +++ b/core/lib/Drupal/Component/Utility/Bytes.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\Component\Bytes\Bytes. + * Contains \Drupal\Component\Bytes\Bytes. */ namespace Drupal\Component\Utility; @@ -21,11 +21,11 @@ class Bytes { /** * Parses a given byte count. * - * @param $size - * A size expressed as a number of bytes with optional SI or IEC binary unit - * prefix (e.g. 2, 3K, 5MB, 10G, 6GiB, 8 bytes, 9mbytes). + * @param mixed $size + * An integer or string size expressed as a number of bytes with optional SI + * or IEC binary unit prefix (e.g. 2, 3K, 5MB, 10G, 6GiB, 8 bytes, 9mbytes). * - * @return + * @return integer * An integer representation of the size in bytes. */ public static function parseSize($size) { diff --git a/core/lib/Drupal/Core/Bootstrap/Bootstrap.php b/core/lib/Drupal/Core/Bootstrap/Bootstrap.php index 36659af..5e7514a 100644 --- a/core/lib/Drupal/Core/Bootstrap/Bootstrap.php +++ b/core/lib/Drupal/Core/Bootstrap/Bootstrap.php @@ -2,7 +2,7 @@ /** * @file - * Definition of \Drupal\Core\Bootstrap\Bootstrap. + * Contains \Drupal\Core\Bootstrap\Bootstrap. */ namespace Drupal\Core\Bootstrap; @@ -16,7 +16,7 @@ class Bootstrap { /** * Compares the memory required for an operation to the available memory. * - * @param $required + * @param string $required * The memory required for the operation, expressed as a number of bytes with * optional SI or IEC binary unit prefix (e.g. 2, 3K, 5MB, 10G, 6GiB, 8bytes, * 9mbytes). @@ -26,7 +26,7 @@ class Bootstrap { * 6GiB, 8bytes, 9mbytes). If no value is passed, the current PHP * memory_limit will be used. Defaults to NULL. * - * @return + * @return boolean * TRUE if there is sufficient memory to allow the operation, or FALSE * otherwise. */ @@ -77,6 +77,8 @@ public static function checkMemoryLimit($required, $memory_limit = NULL) { * @see conf_path() * @see request_uri() * @see \Symfony\Component\HttpFoundation\Request::getClientIP() + * + * @todo Replace use of `$_REQUEST` with a Symfony request object. */ public static function overrideServerVariables($variables = array()) { // Allow the provided URL to override any existing values in $_SERVER. diff --git a/core/tests/Drupal/Tests/Core/Bootstrap/OverrideServerVariablesUnitTest.php b/core/tests/Drupal/Tests/Core/Bootstrap/BootstrapTest.php similarity index 88% rename from core/tests/Drupal/Tests/Core/Bootstrap/OverrideServerVariablesUnitTest.php rename to core/tests/Drupal/Tests/Core/Bootstrap/BootstrapTest.php index 7becbbc..22c03fd 100644 --- a/core/tests/Drupal/Tests/Core/Bootstrap/OverrideServerVariablesUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Bootstrap/BootstrapTest.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\system\Tests\Bootstrap\OverrideServerVariablesUnitTest. + * Contains \Drupal\system\Tests\Bootstrap\BootstrapTest. */ namespace Drupal\Tests\Core\Bootstrap; @@ -13,7 +13,7 @@ /** * Tests for overriding server variables via the API. */ -class OverrideServerVariablesUnitTest extends UnitTestCase { +class BootstrapTest extends UnitTestCase { public static function getInfo() { return array( 'name' => 'Overriding server variables', @@ -27,7 +27,7 @@ public static function getInfo() { * * @dataProvider provider */ - function testDrupalOverrideServerVariablesProvidedURL($url, $expected_server_values) { + public function testOverrideServerVariables($url, $expected_server_values) { // Remember the original value of $_SERVER, since the function call below // will modify it. $original_server = $_SERVER;