Issue #3420582 by quietone: Fix spelling of 11 function words

merge-requests/6153/head^2
Dave Long 2024-02-18 11:29:17 +00:00
parent 5b79fe260c
commit acdd40a533
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
28 changed files with 62 additions and 65 deletions

View File

@ -11,6 +11,8 @@ use Drupal\Core\Test\TestDatabase;
use Drupal\Core\Utility\Error;
use Drupal\Core\StringTranslation\TranslatableMarkup;
// cspell:ignore htkey
/**
* Error reporting level: display no errors.
*/

View File

@ -1004,7 +1004,7 @@ final class DocParser
private function PlainValue()
{
if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) {
return $this->Arrayx();
return $this->ArrayX();
}
if ($this->lexer->isNextToken(DocLexer::T_AT)) {
@ -1070,7 +1070,7 @@ final class DocParser
*
* @return array
*/
private function Arrayx()
private function ArrayX()
{
$array = $values = array();

View File

@ -3,7 +3,7 @@
namespace Drupal\Component\Utility;
/**
* Wraps __toString in a trait to avoid some fatals.
* Wraps __toString in a trait to avoid some fatal errors.
*/
trait ToStringTrait {

View File

@ -45,7 +45,7 @@ abstract class Element extends TypedData {
* The typed config manager. This must be an instance of
* \Drupal\Core\Config\TypedConfigManagerInterface. If it is not, then this
* method will error when assertions are enabled. We can not narrow the
* typehint as this will cause PHP errors.
* type hint as this will cause PHP errors.
*
* @return $this
*/

View File

@ -50,7 +50,7 @@
* all operations have finished, this is passed to callback_batch_finished()
* where results may be referenced to display information to the end-user,
* such as how many total items were processed.
* It is discouraged to typehint this parameter as an array, to allow an
* It is discouraged to type hint this parameter as an array, to allow an
* object implement \ArrayAccess to be passed.
*/
function callback_batch_operation($multiple_params, &$context) {

View File

@ -102,7 +102,7 @@ class PrivateTempStore {
* The data associated with the key, or NULL if the key does not exist.
*/
public function get($key) {
$key = $this->createkey($key);
$key = $this->createKey($key);
if (($object = $this->storage->get($key)) && ($object->owner == $this->getOwner())) {
return $object->data;
}
@ -132,7 +132,7 @@ class PrivateTempStore {
}
}
$key = $this->createkey($key);
$key = $this->createKey($key);
if (!$this->lockBackend->acquire($key)) {
$this->lockBackend->wait($key);
if (!$this->lockBackend->acquire($key)) {
@ -160,7 +160,7 @@ class PrivateTempStore {
* NULL otherwise.
*/
public function getMetadata($key) {
$key = $this->createkey($key);
$key = $this->createKey($key);
// Fetch the key/value pair and its metadata.
$object = $this->storage->get($key);
if ($object) {
@ -184,7 +184,7 @@ class PrivateTempStore {
* Thrown when a lock for the backend storage could not be acquired.
*/
public function delete($key) {
$key = $this->createkey($key);
$key = $this->createKey($key);
if (!$object = $this->storage->get($key)) {
return TRUE;
}
@ -211,7 +211,7 @@ class PrivateTempStore {
* @return string
* The unique key for the user.
*/
protected function createkey($key) {
protected function createKey($key) {
return $this->getOwner() . ':' . $key;
}

View File

@ -9,7 +9,6 @@ adminforms
afterclose
aftercreate
ahah
ajaxcallback
ajaxing
allwords
alphadecimal
@ -20,7 +19,6 @@ applix
archiver
archivers
arrakis
arrayx
arrowrefresh
arrowreturn
arrowreturnthick
@ -163,7 +161,6 @@ controlgroup
conv
corge
cpio
createkey
createrole
createuser
crema
@ -274,7 +271,6 @@ falsey
falsish
fapi
fastcgi
fatals
favourite
favstar
fcgi
@ -336,7 +332,6 @@ hoglet
hookname
hosters
hrefs
htkey
htmlcorrector
httpheader
httplug
@ -350,7 +345,6 @@ idekey
iframes
iframeupload
imagecache
imagecreatefrom
imagetextalternative
indexname
inited
@ -426,7 +420,6 @@ mank
maryjane
matchout
mathematica
maxage
maximumred
maxlifetime
maynot
@ -798,9 +791,6 @@ testcase
testcontent
testcontextawareblock
testdialog
testfilter
testfunc
testfunction
testgroups
testkey
testlogger
@ -852,7 +842,6 @@ troopal
truecolor
twistie
twocol
typehint
tzid
uids
ulwa

View File

@ -161,14 +161,14 @@ class ContentModerationConfigureEntityTypesForm extends FormBase {
'#button_type' => 'primary',
'#value' => $this->t('Save'),
'#ajax' => [
'callback' => [$this, 'ajaxcallback'],
'callback' => [$this, 'ajaxCallback'],
],
];
$form['actions']['cancel'] = [
'#type' => 'button',
'#value' => $this->t('Cancel'),
'#ajax' => [
'callback' => [$this, 'ajaxcallback'],
'callback' => [$this, 'ajaxCallback'],
],
];

View File

@ -73,7 +73,7 @@ class FieldFile extends ProcessPluginBase implements ContainerFactoryPluginInter
// means the file referenced by the current field item did not migrate for
// some reason -- file migration is notoriously brittle -- and we do NOT
// want to send invalid file references into the field system (it causes
// fatals), so return an empty item instead.
// fatal errors), so return an empty item instead.
$lookup_result = $this->migrateLookup->lookup('d6_file', [$value['fid']]);
if ($lookup_result) {
return [

View File

@ -42,12 +42,12 @@ class FilterHtmlTest extends UnitTestCase {
* @param string $expected
* The expected output string.
*/
public function testfilterAttributes($html, $expected) {
public function testFilterAttributes($html, $expected) {
$this->assertSame($expected, $this->filter->filterAttributes($html));
}
/**
* Provides data for testfilterAttributes.
* Provides data for testFilterAttributes.
*
* @return array
* An array of test data.

View File

@ -268,7 +268,7 @@ class PageCacheTest extends BrowserTestBase {
// Until bubbling of max-age up to the response is supported, verify that
// a custom #cache max-age set on an element does not affect page max-age.
$this->drupalLogout();
$this->drupalGet('system-test/cache_maxage_page');
$this->drupalGet('system-test/cache_max_age_page');
$this->assertSession()->responseHeaderEquals('Cache-Control', 'max-age=300, public');
}

View File

@ -247,7 +247,7 @@ class RequestHandler implements ContainerInjectionInterface {
// methods historically receive the unserialized request body as the N+1th
// method argument, where N is the number of route parameters specified on
// the accompanying route. To be able to use the argument resolver, which is
// not based on position but on name and typehint, specify commonly used
// not based on position but on name and type hint, specify commonly used
// names here. Similarly, those methods receive the original stored object
// as the first method argument.

View File

@ -15,7 +15,7 @@ use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
// cspell:ignore rrggbb
// cspell:ignore imagecreatefrom rrggbb
/**
* Defines the GD2 toolkit for image manipulation within Drupal.

View File

@ -5,10 +5,10 @@ error_test.generate_warnings:
requirements:
_access: 'TRUE'
error_test.generate_fatals:
path: '/error-test/generate-fatals'
error_test.generate_fatal_errors:
path: '/error-test/generate-fatal-errors'
defaults:
_controller: '\Drupal\error_test\Controller\ErrorTestController::generateFatals'
_controller: '\Drupal\error_test\Controller\ErrorTestController::generateFatalErrors'
requirements:
_access: 'TRUE'

View File

@ -56,9 +56,9 @@ class ErrorTestController extends ControllerBase {
}
/**
* Generate fatals to test the error handler.
* Generate fatal errors to test the error handler.
*/
public function generateFatals() {
public function generateFatalErrors() {
$function = function (array $test) {
};

View File

@ -263,7 +263,7 @@ class SystemTestController extends ControllerBase implements TrustedCallbackInte
/**
* Set cache max-age on the returned render array.
*/
public function system_test_cache_maxage_page() {
public function system_test_cache_max_age_page() {
$build['main'] = [
'#cache' => ['max-age' => 90],
'message' => [

View File

@ -76,10 +76,10 @@ system_test.cache_tags_page:
requirements:
_access: 'TRUE'
system_test.cache_maxage_page:
path: '/system-test/cache_maxage_page'
system_test.cache_max_age_page:
path: '/system-test/cache_max_age_page'
defaults:
_controller: '\Drupal\system_test\Controller\SystemTestController::system_test_cache_maxage_page'
_controller: '\Drupal\system_test\Controller\SystemTestController::system_test_cache_max_age_page'
requirements:
_access: 'TRUE'

View File

@ -18,14 +18,14 @@ class TestExtension extends AbstractExtension {
* A key/value array that defines custom Twig functions. The key denotes the
* function name used in the tag, e.g.:
* @code
* {{ testfunc() }}
* {{ custom_function() }}
* @endcode
*
* The value is a standard PHP callback that defines what the function does.
*/
public function getFunctions() {
return [
'testfunc' => new TwigFunction('testfunc', ['Drupal\twig_extension_test\TwigExtension\TestExtension', 'testFunction']),
'custom_function' => new TwigFunction('custom_function', ['Drupal\twig_extension_test\TwigExtension\TestExtension', 'testFunction']),
];
}
@ -36,14 +36,14 @@ class TestExtension extends AbstractExtension {
* A key/value array that defines custom Twig filters. The key denotes the
* filter name used in the tag, e.g.:
* @code
* {{ foo|testfilter }}
* {{ foo|test_filter }}
* @endcode
*
* The value is a standard PHP callback that defines what the filter does.
*/
public function getFilters() {
return [
'testfilter' => new TwigFilter('testfilter', ['Drupal\twig_extension_test\TwigExtension\TestExtension', 'testFilter']),
'test_filter' => new TwigFilter('test_filter', ['Drupal\twig_extension_test\TwigExtension\TestExtension', 'testFilter']),
];
}

View File

@ -1,5 +1,5 @@
<div class="testfilter">
{{ message|testfilter }}
<div class="test-filter">
{{ message|test_filter}}
</div>
<div>
{{ safe_join_items|safe_join('<br/>') }}

View File

@ -1,7 +1,7 @@
<div class="testfunction">
{{ testfunc(1) }}
<div class="test-function">
{{ custom_function(1) }}
</div>
<div class="testfunction">
{{ testfunc(0) }}
<div class="test-function">
{{ custom_function(0) }}
</div>

View File

@ -98,7 +98,7 @@ class UncaughtExceptionTest extends BrowserTestBase {
'@message' => 'Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}(): Argument #1 ($test) must be of type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 65',
'%function' => 'Drupal\error_test\Controller\ErrorTestController->Drupal\error_test\Controller\{closure}()',
];
$this->drupalGet('error-test/generate-fatals');
$this->drupalGet('error-test/generate-fatal-errors');
$this->assertSession()->statusCodeEquals(500);
$message = new FormattableMarkup('%type: @message in %function (line ', $fatal_error);
$this->assertSession()->responseContains((string) $message);

View File

@ -13,6 +13,8 @@ use Drupal\user\Entity\Role;
use PHPUnit\Framework\ExpectationFailedException;
use Symfony\Component\HttpFoundation\Request;
// cspell:ignore htkey
/**
* Tests BrowserTestBase functionality.
*
@ -524,7 +526,7 @@ class BrowserTestBaseTest extends BrowserTestBase {
/**
* Tests the protections provided by .htkey.
*/
public function testHtkey() {
public function testHtKey() {
// Remove the Simpletest private key file so we can test the protection
// against requests that forge a valid testing user agent to gain access
// to the installer.

View File

@ -7,6 +7,8 @@ use Drupal\Core\Image\ImageFactory;
use Drupal\Core\Image\ImageInterface;
use Drupal\KernelTests\KernelTestBase;
// cspell:ignore imagecreatefrom
/**
* Tests for the GD image toolkit.
*

View File

@ -285,8 +285,8 @@ EOS;
* @covers ::buildParameter
* @covers ::buildMethodBody
*/
public function testBuildWithNullableSelfTypehint() {
$class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceNullableTypehintSelf';
public function testBuildWithNullableSelfTypeHint() {
$class = 'Drupal\Tests\Component\ProxyBuilder\TestServiceNullableTypeHintSelf';
$result = $this->proxyBuilder->build($class);
@ -296,9 +296,9 @@ EOS;
/**
* {@inheritdoc}
*/
public function typehintSelf(?\Drupal\Tests\Component\ProxyBuilder\TestServiceNullableTypehintSelf $parameter): ?\Drupal\Tests\Component\ProxyBuilder\TestServiceNullableTypehintSelf
public function typeHintSelf(?\Drupal\Tests\Component\ProxyBuilder\TestServiceNullableTypeHintSelf $parameter): ?\Drupal\Tests\Component\ProxyBuilder\TestServiceNullableTypeHintSelf
{
return $this->lazyLoadItself()->typehintSelf($parameter);
return $this->lazyLoadItself()->typeHintSelf($parameter);
}
EOS;
@ -438,9 +438,9 @@ class TestServiceComplexMethod {
}
class TestServiceNullableTypehintSelf {
class TestServiceNullableTypeHintSelf {
public function typehintSelf(?self $parameter): ?self {
public function typeHintSelf(?self $parameter): ?self {
return NULL;
}

View File

@ -124,11 +124,11 @@ class ArgumentsResolverTest extends TestCase {
}
/**
* Tests getArgument() with a wildcard parameter with no typehint.
* Tests getArgument() with a wildcard parameter with no type hint.
*
* Without the typehint, the wildcard object will not be passed to the callable.
* Without the type hint, the wildcard object will not be passed to the callable.
*/
public function testGetWildcardArgumentNoTypehint() {
public function testGetWildcardArgumentNoTypeHint() {
$a = $this->getMockBuilder('\Drupal\Tests\Component\Utility\Test1Interface')->getMock();
$wildcards = [$a];
$resolver = new ArgumentsResolver([], [], $wildcards);
@ -140,12 +140,12 @@ class ArgumentsResolverTest extends TestCase {
}
/**
* Tests getArgument() with a named parameter with no typehint and a value.
* Tests getArgument() with a named parameter with no type hint and a value.
*
* Without the typehint, passing a value to a named parameter will still
* Without the type hint, passing a value to a named parameter will still
* receive the provided value.
*/
public function testGetArgumentRouteNoTypehintAndValue() {
public function testGetArgumentRouteNoTypeHintAndValue() {
$scalars = ['route' => 'foo'];
$resolver = new ArgumentsResolver($scalars, [], []);

View File

@ -142,8 +142,8 @@ class CsrfTokenGeneratorTest extends UnitTestCase {
public function testValidateParameterTypes($token, $value) {
$this->setupDefaultExpectations();
// The following check might throw PHP fatals and notices, so we disable
// error assertions.
// The following check might throw PHP fatal errors and notices, so we
// disable error assertions.
set_error_handler(function () {
return TRUE;
});

View File

@ -174,7 +174,7 @@ class StorageCopyTraitTest extends UnitTestCase {
class TestStorage extends MemoryStorage {
/**
* Provides a setter to bypass the array typehint on ::write().
* Provides a setter to bypass the array type hint on ::write().
*
* This method allows us to create invalid configurations. The method
* ::write() only allows values of the type array.

View File

@ -13,6 +13,8 @@ use GuzzleHttp\Psr7\Request;
use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\Process;
// cspell:ignore htkey
/**
* Tests core/scripts/test-site.php.
*