Skip to content

Commit

Permalink
qa: indent heredocs
Browse files Browse the repository at this point in the history
This has been supported since PHP 7.3, and helps improve readability

Signed-off-by: Matthew Weier O'Phinney <[email protected]>
  • Loading branch information
weierophinney committed Nov 25, 2024
1 parent ed5c7cd commit ce49748
Showing 1 changed file with 73 additions and 73 deletions.
146 changes: 73 additions & 73 deletions test/ComponentInstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,16 @@ public function testMissingDependency(): void
$this->createModuleClass(
$installPath . '/src/SomeComponent/Module.php',
<<<CONTENT
<?php
namespace SomeComponent;
<?php
namespace SomeComponent;
class Module {
public function getModuleDependencies()
{
return ['SomeDependency'];
}
}
CONTENT
class Module {
public function getModuleDependencies()
{
return ['SomeDependency'];
}
}
CONTENT
);

$package = $this->createMock(PackageInterface::class);
Expand Down Expand Up @@ -1469,66 +1469,66 @@ public function setUpModuleDependencies(string $path): void
$this->createModuleClass(
$path . '/src/Psr0Too/DoesNotExist/Module.php',
<<<CONTENT
<?php
namespace DoesNotExist;
<?php
namespace DoesNotExist;
class Module
{
public function getModuleDependencies()
{
return ['DoesNotExistDependency'];
}
}
CONTENT
class Module
{
public function getModuleDependencies()
{
return ['DoesNotExistDependency'];
}
}
CONTENT
);

$this->createModuleClass(
$path . '/src/Psr4/Module.php',
<<<CONTENT
<?php
namespace DoesNotExistEither;
<?php
namespace DoesNotExistEither;
class Module
{
public function getModuleDependencies()
{
return ['DoesNotExistEitherDependency'];
}
}
CONTENT
class Module
{
public function getModuleDependencies()
{
return ['DoesNotExistEitherDependency'];
}
}
CONTENT
);

mkdir(sprintf('%s/%s/src/ClassmappedToo', vfsStream::url('project'), $path));
$this->createModuleClass(
$path . '/src/ClassmappedToo/Module.php',
<<<CONTENT
<?php
namespace ClassmappedToo;
<?php
namespace ClassmappedToo;
class Module
{
public function getModuleDependencies()
{
return ['ClassmappedTooDependency'];
}
}
CONTENT
class Module
{
public function getModuleDependencies()
{
return ['ClassmappedTooDependency'];
}
}
CONTENT
);

$this->createModuleClass(
$path . '/src/File/Module.php',
<<<CONTENT
<?php
namespace File;
<?php
namespace File;
class Module
{
public function getModuleDependencies()
{
return ['FileDependency'];
}
}
CONTENT
class Module
{
public function getModuleDependencies()
{
return ['FileDependency'];
}
}
CONTENT
);
}

Expand Down Expand Up @@ -1575,25 +1575,25 @@ public function testUninstallMessageWithDifferentInjectors(
public function testInstallAutoInstallableDevModuleWithDifferentInjectors(): void
{
$moduleConfigContent = <<<'CONFIG'
<?php
return [
'modules' => [
'Laminas\Router',
'Laminas\Validator',
'Application'
]
];
CONFIG;
<?php
return [
'modules' => [
'Laminas\Router',
'Laminas\Validator',
'Application'
]
];
CONFIG;

$this->createConfigFile('modules.config.php', $moduleConfigContent);

$configContents = <<<'CONFIG'
<?php
return [
'modules' => [
]
];
CONFIG;
<?php
return [
'modules' => [
]
];
CONFIG;
foreach (['development.config.php.dist', 'development.config.php'] as $configName) {
$this->createConfigFile($configName, $configContents);
}
Expand Down Expand Up @@ -1688,15 +1688,15 @@ public function testOnPostPackageInstallDoesNotPromptForAutoInstallablePackages(
public function testInstallAutoInstallableDevModuleWithUniqueInjector(): void
{
$moduleConfigContent = <<<'CONFIG'
<?php
return [
'modules' => [
'Laminas\Router',
'Laminas\Validator',
'Application',
]
];
CONFIG;
<?php
return [
'modules' => [
'Laminas\Router',
'Laminas\Validator',
'Application',
]
];
CONFIG;

$this->createConfigFile('modules.config.php', $moduleConfigContent);

Expand Down

0 comments on commit ce49748

Please sign in to comment.