Permalink
Browse files

[CS Fix] Consistent coding-style of concatenation operator usage

  • Loading branch information...
1 parent 54b32f1 commit 7c47e34928c39e4797edc841423237a16588395e @canni canni committed Apr 2, 2013
Showing with 305 additions and 305 deletions.
  1. +2 −2 UPGRADE-2.1.md
  2. +1 −1 UPGRADE-2.2.md
  3. +1 −1 src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php
  4. +5 −5 src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php
  5. +2 −2 src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
  6. +1 −1 src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
  7. +2 −2 src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php
  8. +2 −2 src/Symfony/Bridge/Propel1/Security/User/PropelUserProvider.php
  9. +1 −1 src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php
  10. +1 −1 src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php
  11. +1 −1 src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php
  12. +2 −2 src/Symfony/Bundle/FrameworkBundle/Resources/config/router.php
  13. +1 −1 src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php
  14. +1 −1 src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php
  15. +1 −1 src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php
  16. +2 −2 src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php
  17. +1 −1 src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php
  18. +1 −1 src/Symfony/Bundle/SecurityBundle/Tests/Functional/WebTestCase.php
  19. +6 −6 src/Symfony/Component/ClassLoader/ClassLoader.php
  20. +1 −1 src/Symfony/Component/ClassLoader/ClassMapGenerator.php
  21. +1 −1 src/Symfony/Component/ClassLoader/Tests/ClassLoaderTest.php
  22. +1 −1 src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php
  23. +1 −1 src/Symfony/Component/ClassLoader/Tests/UniversalClassLoaderTest.php
  24. +2 −2 src/Symfony/Component/Config/Definition/ReferenceDumper.php
  25. +3 −3 src/Symfony/Component/Console/Helper/DialogHelper.php
  26. +1 −1 src/Symfony/Component/Console/Helper/ProgressHelper.php
  27. +7 −7 src/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php
  28. +1 −1 src/Symfony/Component/DependencyInjection/Extension/Extension.php
  29. +1 −1 src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/createphar.php
  30. +1 −1 src/Symfony/Component/Filesystem/Filesystem.php
  31. +5 −5 src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
  32. +11 −11 src/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php
  33. +6 −6 src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php
  34. +4 −4 src/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php
  35. +2 −2 src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php
  36. +1 −1 src/Symfony/Component/Form/Extension/Core/ChoiceList/LazyChoiceList.php
  37. +1 −1 src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php
  38. +1 −1 src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToBooleanArrayTransformer.php
  39. +1 −1 src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php
  40. +1 −1 src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToBooleanArrayTransformer.php
  41. +1 −1 src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php
  42. +3 −3 src/Symfony/Component/Form/Extension/Core/Type/FormType.php
  43. +1 −1 src/Symfony/Component/Form/Extension/Templating/TemplatingRendererEngine.php
  44. +2 −2 src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php
  45. +5 −5 src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php
  46. +9 −9 src/Symfony/Component/Form/Form.php
  47. +2 −2 src/Symfony/Component/Form/FormRenderer.php
  48. +2 −2 src/Symfony/Component/Form/Tests/AbstractLayoutTest.php
  49. +2 −2 .../Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php
  50. +55 −55 src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php
  51. +2 −2 src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php
  52. +4 −4 src/Symfony/Component/Form/Tests/SimpleFormTest.php
  53. +1 −1 src/Symfony/Component/HttpFoundation/BinaryFileResponse.php
  54. +1 −1 src/Symfony/Component/HttpFoundation/Tests/CookieTest.php
  55. +1 −1 src/Symfony/Component/HttpKernel/Kernel.php
  56. +2 −2 src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php
  57. +2 −2 src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php
  58. +1 −1 src/Symfony/Component/HttpKernel/Profiler/MemcacheProfilerStorage.php
  59. +1 −1 src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php
  60. +1 −1 src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
  61. +1 −1 src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php
  62. +8 −8 src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php
  63. +2 −2 src/Symfony/Component/Locale/Resources/data/UPDATE.txt
  64. +3 −3 src/Symfony/Component/OptionsResolver/Options.php
  65. +2 −2 src/Symfony/Component/OptionsResolver/OptionsResolver.php
  66. +4 −4 src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php
  67. +1 −1 src/Symfony/Component/OptionsResolver/Tests/OptionsTest.php
  68. +2 −2 src/Symfony/Component/Process/Tests/AbstractProcessTest.php
  69. +2 −2 src/Symfony/Component/PropertyAccess/PropertyAccessor.php
  70. +3 −3 src/Symfony/Component/PropertyAccess/PropertyPath.php
  71. +5 −5 src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php
  72. +2 −2 src/Symfony/Component/PropertyAccess/StringUtil.php
  73. +9 −9 src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php
  74. +5 −5 src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php
  75. +3 −3 src/Symfony/Component/Routing/Generator/UrlGenerator.php
  76. +1 −1 src/Symfony/Component/Routing/Loader/XmlFileLoader.php
  77. +1 −1 src/Symfony/Component/Routing/Route.php
  78. +1 −1 src/Symfony/Component/Routing/RouteCollection.php
  79. +2 −2 src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
  80. +1 −1 src/Symfony/Component/Routing/Tests/RouteCompilerTest.php
  81. +1 −1 src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php
  82. +1 −1 src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php
  83. +1 −1 src/Symfony/Component/Security/Tests/Core/Encoder/BCryptPasswordEncoderTest.php
  84. +6 −6 src/Symfony/Component/Security/Tests/Http/Firewall/DigestDataTest.php
  85. +1 −1 src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
  86. +7 −7 src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php
  87. +6 −6 src/Symfony/Component/Translation/Dumper/MoFileDumper.php
  88. +4 −4 src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd
  89. +1 −1 src/Symfony/Component/Translation/README.md
  90. +1 −1 src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php
  91. +2 −2 src/Symfony/Component/Validator/ConstraintViolation.php
  92. +1 −1 src/Symfony/Component/Validator/ConstraintViolationList.php
  93. +2 −2 src/Symfony/Component/Validator/Constraints/All.php
  94. +3 −3 src/Symfony/Component/Validator/Constraints/Collection.php
  95. +1 −1 src/Symfony/Component/Validator/Constraints/Count.php
  96. +1 −1 src/Symfony/Component/Validator/Constraints/Length.php
  97. +1 −1 src/Symfony/Component/Validator/Constraints/Range.php
  98. +2 −2 src/Symfony/Component/Validator/Constraints/Regex.php
  99. +1 −1 src/Symfony/Component/Validator/Constraints/Valid.php
  100. +2 −2 src/Symfony/Component/Validator/ExecutionContext.php
  101. +2 −2 src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php
  102. +1 −1 src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php
  103. +1 −1 src/Symfony/Component/Validator/Tests/Fixtures/Entity.php
  104. +2 −2 src/Symfony/Component/Validator/Tests/Fixtures/FakeMetadataFactory.php
  105. +4 −4 src/Symfony/Component/Validator/Tests/Mapping/Loader/FilesLoaderTest.php
  106. +6 −6 src/Symfony/Component/Validator/Validator.php
  107. +1 −1 src/Symfony/Component/Yaml/Tests/InlineTest.php
View
@@ -901,7 +901,7 @@
public function guessPattern($class, $property)
{
if (/* condition */) {
- return new ValueGuess('.{' . $minLength . ',}', Guess::LOW_CONFIDENCE);
+ return new ValueGuess('.{'.$minLength.',}', Guess::LOW_CONFIDENCE);
}
}
```
@@ -1189,7 +1189,7 @@
public function isPropertyValid(ExecutionContext $context)
{
// ...
- $propertyPath = $context->getPropertyPath() . '.property';
+ $propertyPath = $context->getPropertyPath().'.property';
$context->setPropertyPath($propertyPath);
$context->addViolation('Error Message', array(), null);
}
View
@@ -464,7 +464,7 @@
$path .= '.';
}
- $context->getGraphWalker()->walkReference($someObject, $group, $path . 'myProperty', false);
+ $context->getGraphWalker()->walkReference($someObject, $group, $path.'myProperty', false);
}
}
```
@@ -304,7 +304,7 @@ protected function detectMetadataDriver($dir, ContainerBuilder $container)
protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, $cacheName)
{
$cacheDriver = $objectManager[$cacheName.'_driver'];
- $cacheDriverService = $this->getObjectManagerElementName($objectManager['name'] . '_' . $cacheName);
+ $cacheDriverService = $this->getObjectManagerElementName($objectManager['name'].'_'.$cacheName);
switch ($cacheDriver['type']) {
case 'service':
@@ -51,21 +51,21 @@ public function process(ContainerBuilder $container)
*/
private function updateValidatorMappingFiles(ContainerBuilder $container, $mapping, $extension)
{
- if ( ! $container->hasParameter('validator.mapping.loader.' . $mapping . '_files_loader.mapping_files')) {
+ if ( ! $container->hasParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files')) {
return;
}
- $files = $container->getParameter('validator.mapping.loader.' . $mapping . '_files_loader.mapping_files');
- $validationPath = 'Resources/config/validation.' . $this->managerType . '.' . $extension;
+ $files = $container->getParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files');
+ $validationPath = 'Resources/config/validation.'.$this->managerType.'.'.$extension;
foreach ($container->getParameter('kernel.bundles') as $bundle) {
$reflection = new \ReflectionClass($bundle);
- if (is_file($file = dirname($reflection->getFilename()) . '/' . $validationPath)) {
+ if (is_file($file = dirname($reflection->getFilename()).'/'.$validationPath)) {
$files[] = realpath($file);
$container->addResource(new FileResource($file));
}
}
- $container->setParameter('validator.mapping.loader.' . $mapping . '_files_loader.mapping_files', $files);
+ $container->setParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files', $files);
}
}
@@ -120,7 +120,7 @@ public function testCollapsedEntityField()
*/
public function testCollapsedEntityFieldWithChoices()
{
- $choices = $this->em->createQuery('SELECT c FROM ' . self::ENTITY_CLASS . ' c')->getResult();
+ $choices = $this->em->createQuery('SELECT c FROM '.self::ENTITY_CLASS.' c')->getResult();
$this->setMaxRunningTime(1);
for ($i = 0; $i < 40; ++$i) {
@@ -139,7 +139,7 @@ public function testCollapsedEntityFieldWithChoices()
*/
public function testCollapsedEntityFieldWithPreferredChoices()
{
- $choices = $this->em->createQuery('SELECT c FROM ' . self::ENTITY_CLASS . ' c')->getResult();
+ $choices = $this->em->createQuery('SELECT c FROM '.self::ENTITY_CLASS.' c')->getResult();
$this->setMaxRunningTime(1);
for ($i = 0; $i < 40; ++$i) {
@@ -95,7 +95,7 @@ public function validate($entity, Constraint $constraint)
if (count($relatedId) > 1) {
throw new ConstraintDefinitionException(
"Associated entities are not allowed to have more than one identifier field to be " .
- "part of a unique constraint in: " . $class->getName() . "#" . $fieldName
+ "part of a unique constraint in: ".$class->getName()."#".$fieldName
);
}
$criteria[$fieldName] = array_pop($relatedId);
@@ -84,7 +84,7 @@ public function __construct($class, $labelPath = null, $choices = null, $queryOb
{
$this->class = $class;
- $queryClass = $this->class . 'Query';
+ $queryClass = $this->class.'Query';
$query = new $queryClass();
$this->identifier = $query->getTableMap()->getPrimaryKeys();
@@ -198,7 +198,7 @@ public function getChoicesForValues(array $values)
{
if (!$this->loaded) {
if (1 === count($this->identifier)) {
- $filterBy = 'filterBy' . current($this->identifier)->getPhpName();
+ $filterBy = 'filterBy'.current($this->identifier)->getPhpName();
return (array) $this->query->create()
->$filterBy($values)
@@ -53,7 +53,7 @@ class PropelUserProvider implements UserProviderInterface
public function __construct($class, $property = null)
{
$this->class = $class;
- $this->queryClass = $class . 'Query';
+ $this->queryClass = $class.'Query';
$this->property = $property;
}
@@ -66,7 +66,7 @@ public function loadUserByUsername($username)
$query = $queryClass::create();
if (null !== $this->property) {
- $filter = 'filterBy' . ucfirst($this->property);
+ $filter = 'filterBy'.ucfirst($this->property);
$query->$filter($username);
} else {
$query->filterByUsername($username);
@@ -29,7 +29,7 @@ public function compile(\Twig_Compiler $compiler)
if (isset($arguments[0])) {
$compiler->subcompile($arguments[0]);
- $compiler->raw(', \'' . $blockNameSuffix . '\'');
+ $compiler->raw(', \''.$blockNameSuffix.'\'');
if (isset($arguments[1])) {
if ('label' === $blockNameSuffix) {
@@ -134,7 +134,7 @@ public function isSelectedChoiceProvider()
*/
public function testIsChoiceSelected($expected, $choice, $value)
{
- $choice = new ChoiceView($choice, $choice, $choice . ' label');
+ $choice = new ChoiceView($choice, $choice, $choice.' label');
$this->assertSame($expected, $this->extension->isSelectedChoice($choice, $value));
}
@@ -184,7 +184,7 @@ private function formatConfigs(array $array)
$string = '';
ksort($array);
foreach ($array as $name => $value) {
- $string .= ($string ? "\n" . str_repeat(' ', 13) : '') . $name . ': ' . $this->formatValue($value);
+ $string .= ($string ? "\n".str_repeat(' ', 13) : '').$name.': '.$this->formatValue($value);
}
return $string;
@@ -21,10 +21,10 @@
* @author: Albert Jessurum <ajessu@gmail.com>
*/
-if (is_file($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $_SERVER['SCRIPT_NAME'])) {
+if (is_file($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.$_SERVER['SCRIPT_NAME'])) {
return false;
}
-$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'app_dev.php';
+$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app_dev.php';
require 'app_dev.php';
@@ -47,7 +47,7 @@ protected function getExtensions()
// should be moved to the Form component once absolute file paths are supported
// by the default name parser in the Templating component
$reflClass = new \ReflectionClass('Symfony\Bundle\FrameworkBundle\FrameworkBundle');
- $root = realpath(dirname($reflClass->getFileName()) . '/Resources/views');
+ $root = realpath(dirname($reflClass->getFileName()).'/Resources/views');
$rootTheme = realpath(__DIR__.'/Resources');
$templateNameParser = new StubTemplateNameParser($root, $rootTheme);
$loader = new FilesystemLoader(array());
@@ -47,7 +47,7 @@ protected function getExtensions()
// should be moved to the Form component once absolute file paths are supported
// by the default name parser in the Templating component
$reflClass = new \ReflectionClass('Symfony\Bundle\FrameworkBundle\FrameworkBundle');
- $root = realpath(dirname($reflClass->getFileName()) . '/Resources/views');
+ $root = realpath(dirname($reflClass->getFileName()).'/Resources/views');
$rootTheme = realpath(__DIR__.'/Resources');
$templateNameParser = new StubTemplateNameParser($root, $rootTheme);
$loader = new FilesystemLoader(array());
@@ -59,7 +59,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
try {
$schema->addToSchema($connection->getSchemaManager()->createSchema());
} catch (SchemaException $e) {
- $output->writeln("Aborting: " . $e->getMessage());
+ $output->writeln("Aborting: ".$e->getMessage());
return 1;
}
@@ -101,10 +101,10 @@ private function generateLogoutUrl($key, $referenceType)
if ('/' === $logoutPath[0]) {
$request = $this->container->get('request');
- $url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBasePath() . $logoutPath;
+ $url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBasePath().$logoutPath;
if (!empty($parameters)) {
- $url .= '?' . http_build_query($parameters);
+ $url .= '?'.http_build_query($parameters);
}
} else {
$url = $this->router->generate($logoutPath, $parameters, $referenceType);
@@ -23,7 +23,7 @@ public function testSwitchUser($originalUser, $targetUser, $expectedUser, $expec
{
$client = $this->createAuthenticatedClient($originalUser);
- $client->request('GET', '/profile?_switch_user=' . $targetUser);
+ $client->request('GET', '/profile?_switch_user='.$targetUser);
$this->assertEquals($expectedStatus, $client->getResponse()->getStatusCode());
$this->assertEquals($expectedUser, $client->getProfile()->getCollector('security')->getUser());
@@ -60,7 +60,7 @@ protected static function createKernel(array $options = array())
return new $class(
$options['test_case'],
isset($options['root_config']) ? $options['root_config'] : 'config.yml',
- isset($options['environment']) ? $options['environment'] : 'securitybundletest' . strtolower($options['test_case']),
+ isset($options['environment']) ? $options['environment'] : 'securitybundletest'.strtolower($options['test_case']),
isset($options['debug']) ? $options['debug'] : true
);
}
@@ -170,29 +170,29 @@ public function findFile($class)
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
- $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)) . DIRECTORY_SEPARATOR;
+ $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)).DIRECTORY_SEPARATOR;
$className = substr($class, $pos + 1);
} else {
// PEAR-like class name
$classPath = null;
$className = $class;
}
- $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
+ $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className).'.php';
foreach ($this->prefixes as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
- if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
- return $dir . DIRECTORY_SEPARATOR . $classPath;
+ if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
+ return $dir.DIRECTORY_SEPARATOR.$classPath;
}
}
}
}
foreach ($this->fallbackDirs as $dir) {
- if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
- return $dir . DIRECTORY_SEPARATOR . $classPath;
+ if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
+ return $dir.DIRECTORY_SEPARATOR.$classPath;
}
}
@@ -121,7 +121,7 @@ private static function findClasses($path)
}
}
- $classes[] = ltrim($namespace . $class, '\\');
+ $classes[] = ltrim($namespace.$class, '\\');
break;
default:
break;
@@ -100,7 +100,7 @@ public function testUseIncludePath()
$loader->setUseIncludePath(true);
$this->assertTrue($loader->getUseIncludePath());
- set_include_path(__DIR__.'/Fixtures/includepath' . PATH_SEPARATOR . $includePath);
+ set_include_path(__DIR__.'/Fixtures/includepath'.PATH_SEPARATOR.$includePath);
$this->assertEquals(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'includepath'.DIRECTORY_SEPARATOR.'Foo.php', $loader->findFile('Foo'));
@@ -125,7 +125,7 @@ public function testCreateMapFinderSupport()
}
$finder = new \Symfony\Component\Finder\Finder();
- $finder->files()->in(__DIR__ . '/Fixtures/beta/NamespaceCollision');
+ $finder->files()->in(__DIR__.'/Fixtures/beta/NamespaceCollision');
$this->assertEqualsNormalized(array(
'NamespaceCollision\\A\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Bar.php',
@@ -49,7 +49,7 @@ public function testUseIncludePath()
$loader->useIncludePath(true);
$this->assertTrue($loader->getUseIncludePath());
- set_include_path(__DIR__.'/Fixtures/includepath' . PATH_SEPARATOR . $includePath);
+ set_include_path(__DIR__.'/Fixtures/includepath'.PATH_SEPARATOR.$includePath);
$this->assertEquals(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'includepath'.DIRECTORY_SEPARATOR.'Foo.php', $loader->findFile('Foo'));
@@ -115,12 +115,12 @@ private function writeNode(NodeInterface $node, $depth = 0)
$default = (string) $default != '' ? ' '.$default : '';
$comments = count($comments) ? '# '.implode(', ', $comments) : '';
- $text = rtrim(sprintf('%-20s %s %s', $node->getName() . ':', $default, $comments), ' ');
+ $text = rtrim(sprintf('%-20s %s %s', $node->getName().':', $default, $comments), ' ');
if ($info = $node->getInfo()) {
$this->writeLine('');
// indenting multi-line info
- $info = str_replace("\n", sprintf("\n%" . $depth * 4 . "s# ", ' '), $info);
+ $info = str_replace("\n", sprintf("\n%".$depth * 4 . "s# ", ' '), $info);
$this->writeLine('# '.$info, $depth * 4);
}
@@ -178,7 +178,7 @@ public function ask(OutputInterface $output, $question, $default = null, array $
// Save cursor position
$output->write("\0337");
// Write highlighted text
- $output->write('<hl>' . substr($matches[$ofs], $i) . '</hl>');
+ $output->write('<hl>'.substr($matches[$ofs], $i).'</hl>');
// Restore cursor position
$output->write("\0338");
}
@@ -230,11 +230,11 @@ public function askConfirmation(OutputInterface $output, $question, $default = t
public function askHiddenResponse(OutputInterface $output, $question, $fallback = true)
{
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
- $exe = __DIR__ . '/../Resources/bin/hiddeninput.exe';
+ $exe = __DIR__.'/../Resources/bin/hiddeninput.exe';
// handle code running from a phar
if ('phar:' === substr(__FILE__, 0, 5)) {
- $tmpExe = sys_get_temp_dir() . '/hiddeninput.exe';
+ $tmpExe = sys_get_temp_dir().'/hiddeninput.exe';
copy($exe, $tmpExe);
$exe = $tmpExe;
}
@@ -402,7 +402,7 @@ private function humaneTime($secs)
$text = $format[1];
break;
} else {
- $text = ceil($secs / $format[2]) . ' ' . $format[1];
+ $text = ceil($secs / $format[2]).' '.$format[1];
break;
}
}
@@ -37,15 +37,15 @@ public function testFormatBlock()
);
$this->assertEquals(
- '<error> Some text to display </error>' . "\n" .
+ '<error> Some text to display </error>'."\n" .
'<error> foo bar </error>',
$formatter->formatBlock(array('Some text to display', 'foo bar'), 'error'),
'::formatBlock() formats a message in a block'
);
$this->assertEquals(
- '<error> </error>' . "\n" .
- '<error> Some text to display </error>' . "\n" .
+ '<error> </error>'."\n" .
+ '<error> Some text to display </error>'."\n" .
'<error> </error>',
$formatter->formatBlock('Some text to display', 'error', true),
'::formatBlock() formats a message in a block'
@@ -61,8 +61,8 @@ public function testFormatBlockWithDiacriticLetters()
$formatter = new FormatterHelper();
$this->assertEquals(
- '<error> </error>' . "\n" .
- '<error> Du texte à afficher </error>' . "\n" .
+ '<error> </error>'."\n" .
+ '<error> Du texte à afficher </error>'."\n" .
'<error> </error>',
$formatter->formatBlock('Du texte à afficher', 'error', true),
'::formatBlock() formats a message in a block'
@@ -74,8 +74,8 @@ public function testFormatBlockLGEscaping()
$formatter = new FormatterHelper();
$this->assertEquals(
- '<error> </error>' . "\n" .
- '<error> \<info>some info\</info> </error>' . "\n" .
+ '<error> </error>'."\n" .
+ '<error> \<info>some info\</info> </error>'."\n" .
'<error> </error>',
$formatter->formatBlock('<info>some info</info>', 'error', true),
'::formatBlock() escapes \'<\' chars'
@@ -85,7 +85,7 @@ public function getConfiguration(array $config, ContainerBuilder $container)
$reflected = new \ReflectionClass($this);
$namespace = $reflected->getNamespaceName();
- $class = $namespace . '\\Configuration';
+ $class = $namespace.'\\Configuration';
if (class_exists($class)) {
$r = new \ReflectionClass($class);
$container->addResource(new FileResource($r->getFileName()));
Oops, something went wrong.

0 comments on commit 7c47e34

Please sign in to comment.