8000 minor #19405 Fixed bugs in names of classes and methods. (zomberg) · symfony/symfony@b27b0a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit b27b0a9

Browse files
minor #19405 Fixed bugs in names of classes and methods. (zomberg)
This PR was squashed before being merged into the 2.7 branch (closes #19405). Discussion ---------- Fixed bugs in names of classes and methods. | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ It's related to case sensitive. I changed only calls of names of called methods but not definition of methods because BC. Commits ------- c41aa03 Fixed bugs in names of classes and methods.
2 parents 0f07034 + c41aa03 commit b27b0a9

File tree

25 files changed

+32
-32
lines changed

25 files changed

+32
-32
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -823,10 +823,10 @@ private function getValidatorMappingFiles(ContainerBuilder $container)
823823

824824
if (is_dir($dir = $dirname.'/Resources/config/validation')) {
825825
foreach (Finder::create()->files()->in($dir)->name('*.xml') as $file) {
826-
$files[0][] = $file->getRealpath();
826+
$files[0][] = $file->getRealPath();
827827
}
828828
foreach (Finder::create()->files()->in($dir)->name('*.yml') as $file) {
829-
$files[1][] = $file->getRealpath();
829+
$files[1][] = $file->getRealPath();
830830
}
831831

832832
$container->addResource(new DirectoryResource($dir));
@@ -944,13 +944,13 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
944944

945945
if (is_dir($dir = $dirname.'/Resources/config/serialization')) {
946946
foreach (Finder::create()->files()->in($dir)->name('*.xml') as $file) {
947-
$definition = new Definition('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader', array($file->getRealpath()));
947+
$definition = new Definition('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader', array($file->getRealPath()));
948948
$definition->setPublic(false);
949949

950950
$serializerLoaders[] = $definition;
951951
}
952952
foreach (Finder::create()->files()->in($dir)->name('*.yml') as $file) {
953-
$definition = new Definition('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader', array($file->getRealpath()));
953+
$definition = new Definition('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader', array($file->getRealPath()));
954954
$definition->setPublic(false);
955955

956956
$serializerLoaders[] = $definition;

src/Symfony/Bundle/FrameworkBundle/Translation/TranslationLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function loadMessages($directory, MessageCatalogue $catalogue)
5858
$extension = $catalogue->getLocale().'.'.$format;
5959
$files = $finder->files()->name('*.'.$extension)->in($directory);
6060
foreach ($files as $file) {
61-
$domain = substr($file->getFileName(), 0, -1 * strlen($extension) - 1);
61+
$domain = substr($file->getFilename(), 0, -1 * strlen($extension) - 1);
6262
$catalogue->addCatalogue($loader->load($file->getPathname(), $catalogue->getLocale(), $domain));
6363
}
6464
}

src/Symfony/Component/Config/Util/XmlUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static function loadFile($file, $schemaOrCallable = null)
123123
*
124124
* @return array A PHP array
125125
*/
126-
public static function convertDomElementToArray(\DomElement $element, $checkPrefix = true)
126+
public static function convertDomElementToArray(\DOMElement $element, $checkPrefix = true)
127127
{
128128
$prefix = (string) $element->prefix;
129129
$empty = true;

src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected function writePrompt(OutputInterface $output, Question $question)
6666

6767
break;
6868

69-
case $question instanceof ChoiceQuestion && $question->isMultiSelect():
69+
case $question instanceof ChoiceQuestion && $question->isMultiselect():
7070
$choices = $question->getChoices();
7171
$default = explode(',', $default);
7272

src/Symfony/Component/Console/Tests/ApplicationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ public function testFindAlternativeNamespace()
423423
$application->add(new \FooCommand());
424424
$application->add(new \Foo1Command());
425425
$application->add(new \Foo2Command());
426-
$application->add(new \foo3Command());
426+
$application->add(new \Foo3Command());
427427

428428
try {
429429
$application->find('Unknown-namespace:Unknown-command');

src/Symfony/Component/Debug/Tests/MockExceptionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Symfony\Component\Debug\ExceptionHandler;
1515

16-
class MockExceptionHandler extends Exceptionhandler
16+
class MockExceptionHandler extends ExceptionHandler
1717
{
1818
public $e;
1919

src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ private function loadFromExtensions(\DOMDocument $xml)
564564
*
565565
* @return array A PHP array
566566
*/
567-
public static function convertDomElementToArray(\DomElement $element)
567+
public static function convertDomElementToArray(\DOMElement $element)
568568
{
569569
return XmlUtils::convertDomElementToArray($element);
570570
}

src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function provideInvalidParameters()
100100
{
101101
return array(
102102
array(array('foo' => new Definition('stdClass'))),
103-
array(array('foo' => new Expression('service("foo").foo() ~ (container.hasparameter("foo") ? parameter("foo") : "default")'))),
103+
array(array('foo' => new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")'))),
104104
array(array('foo' => new Reference('foo'))),
105105
array(array('foo' => new Variable('foo'))),
106106
);

src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
->addMethodCall('setBar', array(new Reference('foo2', ContainerInterface::NULL_ON_INVALID_REFERENCE)))
5151
->addMethodCall('setBar', array(new Reference('foo3', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)))
5252
->addMethodCall('setBar', array(new Reference('foobaz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)))
53-
->addMethodCall('setBar', array(new Expression('service("foo").foo() ~ (container.hasparameter("foo") ? parameter("foo") : "default")')))
53+
->addMethodCall('setBar', array(new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')))
5454
;
5555
$container
5656
->register('foo_with_inline', 'Foo')

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ protected function getMethodCall1Service()
248248
if ($this->has('foobaz')) {
249249
$instance->setBar($this->get('foobaz', ContainerInterface::NULL_ON_INVALID_REFERENCE));
250250
}
251-
$instance->setBar(($this->get("foo")->foo() . (($this->hasparameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
251+
$instance->setBar(($this->get("foo")->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
252252

253253
return $instance;
254254
}

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ protected function getMethodCall1Service()
246246

247247
$instance->setBar($this->get('foo'));
248248
$instance->setBar(NULL);
249-
$instance->setBar(($this->get("foo")->foo() . (($this->hasparameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
249+
$instance->setBar(($this->get("foo")->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
250250

251251
return $instance;
252252
}

src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<service id="method_call1" class="FooClass">
3333
<call method="setBar" />
3434
<call method="setBar">
35-
<argument type="expression">service("foo").foo() ~ (container.hasparameter("foo") ? parameter("foo") : "default")</argument>
35+
<argument type="expression">service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")</argument>
3636
</call>
3737
</service>
3838
<service id="method_call2" class="FooClass">

src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<argument type="service" id="foobaz" on-invalid="ignore"/>
5757
</call>
5858
<call method="setBar">
59-
<argument type="expression">service("foo").foo() ~ (container.hasparameter("foo") ? parameter("foo") : "default")</argument>
59+
<argument type="expression">service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")</argument>
6060
</call>
6161
</service>
6262
<service id="foo_with_inline" class="Foo">

src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
calls:
1515
- [ setBar, [] ]
1616
- [ setBar ]
17-
- [ setBar, ['@=service("foo").foo() ~ (container.hasparameter("foo") ? parameter("foo") : "default")'] ]
17+
- [ setBar, ['@=service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")'] ]
1818
method_call2:
1919
class: FooClass
2020
calls:

src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ services:
3636
- [setBar, ['@?foo2']]
3737
- [setBar, ['@?foo3']]
3838
- [setBar, ['@?foobaz']]
39-
- [setBar, ['@=service("foo").foo() ~ (container.hasparameter("foo") ? parameter("foo") : "default")']]
39+
- [setBar, ['@=service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")']]
4040

4141
foo_with_inline:
4242
class: Foo

src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public function testLoadServices()
260260
$this->assertEquals('sc_configure', $services['configurator1']->getConfigurator(), '->load() parses the configurator tag');
261261
$this->assertEquals(array(new Reference('baz', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, false), 'configure'), $services['configurator2']->getConfigurator(), '->load() parses the configurator tag');
262262
$this->assertEquals(array('BazClass', 'configureStatic'), $services['configurator3']->getConfigurator(), '->load() parses the configurator tag');
263-
$this->assertEquals(array(array('setBar', array()), array('setBar', array(new Expression('service("foo").foo() ~ (container.hasparameter("foo") ? parameter("foo") : "default")')))), $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag');
263+
$this->assertEquals(array(array('setBar', array()), array('setBar', array(new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')))), $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag');
264264
$this->assertEquals(array(array('setBar', array('foo', new Reference('foo'), array(true, false)))), $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag');
265265
$this->assertEquals('factory', $services['new_factory1']->getFactory(), '->load() parses the factory tag');
266266
$this->assertEquals(array(new Reference('baz', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, false), 'getClass'), $services['new_factory2']->getFactory(), '->load() parses the factory tag');

src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function testLoadServices()
157157
$this->assertEquals('sc_configure', $services['configurator1']->getConfigurator(), '->load() parses the configurator tag');
158158
$this->assertEquals(array(new Reference('baz'), 'configure'), $services['configurator2']->getConfigurator(), '->load() parses the configurator tag');
159159
$this->assertEquals(array('BazClass', 'configureStatic'), $services['configurator3']->getConfigurator(), '->load() parses the configurator tag');
160-
$this->assertEquals(array(array('setBar', array()), array('setBar', array()), array('setBar', array(new Expression('service("foo").foo() ~ (container.hasparameter("foo") ? parameter("foo") : "default")')))), $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag');
160+
$this->assertEquals(array(array('setBar', array()), array('setBar', array()), array('setBar', array(new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')))), $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag');
161161
$this->assertEquals(array(array('setBar', array('foo', new Reference('foo'), array(true, false)))), $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag');
162162
$this->assertEquals('factory', $services['new_factory1']->getFactory(), '->load() parses the factory tag');
163163
$this->assertEquals(array(new Reference('baz'), 'getClass'), $services['new_factory2']->getFactory(), '->load() parses the factory tag');

src/Symfony/Component/Finder/Tests/Shell/CommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function testExecute()
148148

149149
$this->assertInternalType('array', $result);
150150
$this->assertNotEmpty($result);
151-
$this->assertRegexp('/PHP|HipHop/', $result[0]);
151+
$this->assertRegExp('/PHP|HipHop/', $result[0]);
152152
}
153153

154154
public function testCastToString()

src/Symfony/Component/Form/Tests/AbstractLayoutTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function tearDown()
4747
parent::tearDown();
4848
}
4949

50-
protected function assertXpathNodeValue(\DomElement $element, $expression, $nodeValue)
50+
protected function assertXpathNodeValue(\DOMElement $element, $expression, $nodeValue)
5151
{
5252
$xpath = new \DOMXPath($element->ownerDocument);
5353
$nodeList = $xpath->evaluate($expression);

src/Symfony/Component/Intl/Util/IntlTestHelper.php

Lines changed: 4 additions & 4 deletions
< 10000 col width="100%"/>
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class IntlTestHelper
3131
*
3232
* @param \PhpUnit_Framework_TestCase $testCase
3333
*/
34-
public static function requireIntl(\PhpUnit_Framework_TestCase $testCase)
34+
public static function requireIntl(\PHPUnit_Framework_TestCase $testCase)
3535
{
3636
// We only run tests if the version is *one specific version*.
3737
// This condition is satisfied if
@@ -63,7 +63,7 @@ public static function requireIntl(\PhpUnit_Framework_TestCase $testCase)
6363
*
6464
* @param \PhpUnit_Framework_TestCase $testCase
6565
*/
66-
public static function requireFullIntl(\PhpUnit_Framework_TestCase $testCase)
66+
public static function requireFullIntl(\PHPUnit_Framework_TestCase $testCase)
6767
{
6868
// We only run tests if the intl extension is loaded...
6969
if (!Intl::isExtensionLoaded()) {
@@ -92,7 +92,7 @@ public static function requireFullIntl(\PhpUnit_Framework_TestCase $testCase)
9292
*
9393
* @param \PhpUnit_Framework_TestCase $testCase
9494
*/
95-
public static function require32Bit(\PhpUnit_Framework_TestCase $testCase)
95+
public static function require32Bit(\PHPUnit_Framework_TestCase $testCase)
9696
{
9797
if (4 !== PHP_INT_SIZE) {
9898
$testCase->markTestSkipped('PHP 32 bit is required.');
@@ -104,7 +104,7 @@ public static function require32Bit(\PhpUnit_Framework_TestCase $testCase)
104104
*
105105
* @param \PhpUnit_Framework_TestCase $testCase
106106
*/
107-
public static function require64Bit(\PhpUnit_Framework_TestCase $testCase)
107+
public static function require64Bit(\PHPUnit_Framework_TestCase $testCase)
108108
{
109109
if (8 !== PHP_INT_SIZE) {
110110
$testCase->markTestSkipped('PHP 64 bit is required.');

src/Symfony/Component/Process/Tests/ProcessTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ private function getProcess($commandline, $cwd = null, array $env = null, $input
12291229
} catch (RuntimeException $e) {
12301230
$this->assertSame('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.', $e->getMessage());
< D7AE /td>
12311231
if ($enhance) {
1232-
$process->setEnhanceSigChildCompatibility(true);
1232+
$process->setEnhanceSigchildCompatibility(true);
12331233
} else {
12341234
self::$notEnhancedSigchild = true;
12351235
}

src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
$finder = new Finder();
3838
$finder->name('*Platform.php')->in(dirname($reflection->getFileName()));
3939
foreach ($finder as $file) {
40-
require_once $file->getPathName();
40+
require_once $file->getPathname();
4141
$className = 'Doctrine\\DBAL\\Platforms\\'.$file->getBasename('.php');
4242

4343
$reflection = new ReflectionClass($className);

src/Symfony/Component/Translation/DataCollectorTranslator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ private function collectMessage($locale, $domain, $id, $translation)
124124
} elseif ($catalogue->has($id, $domain)) {
125125
$state = self::MESSAGE_EQUALS_FALLBACK;
126126

127-
$fallbackCatalogue = $catalogue->getFallBackCatalogue();
127+
$fallbackCatalogue = $catalogue->getFallbackCatalogue();
128128
while ($fallbackCatalogue) {
129129
if ($fallbackCatalogue->defines($id, $domain)) {
130130
$locale = $fallbackCatalogue->getLocale();
131131
break;
132132
}
133133

134-
$fallbackCatalogue = $fallbackCatalogue->getFallBackCatalogue();
134+
$fallbackCatalogue = $fallbackCatalogue->getFallbackCatalogue();
135135
}
136136
} else {
137137
$state = self::MESSAGE_MISSING;

src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function validate($value, Constraint $constraint)
4444
// the DateTime constructor:
4545
// http://php.net/manual/en/datetime.formats.php
4646
if (is_string($comparedValue)) {
47-
if ($value instanceof \DatetimeImmutable) {
47+
if ($value instanceof \DateTimeImmutable) {
4848
// If $value is immutable, convert the compared value to a
4949
// DateTimeImmutable too
5050
$comparedValue = new \DatetimeImmutable($comparedValue);

src/Symfony/Component/VarDumper/Caster/AmqpCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, $isN
131131
$prefix.'contentType' => $c->getContentType(),
132132
$prefix.'contentEncoding' => $c->getContentEncoding(),
133133
$prefix.'type' => $c->getType(),
134-
$prefix.'timestamp' => $c->getTimestamp(),
134+
$prefix.'timestamp' => $c->getTimeStamp(),
135135
$prefix.'priority' => $c->getPriority(),
136136
$prefix.'expiration' => $c->getExpiration(),
137137
$prefix.'userId' => $c->getUserId(),

0 commit comments

Comments
 (0)
0