Skip to content

Commit fb83e3a

Browse files
authored
Format evaled code with heredoc (#2812)
Enable code analysis in PHPStorm
1 parent 0530248 commit fb83e3a

File tree

1 file changed

+16
-13
lines changed
  • tests/Doctrine/ODM/MongoDB/Tests/Functional

1 file changed

+16
-13
lines changed

tests/Doctrine/ODM/MongoDB/Tests/Functional/IdTest.php

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -364,19 +364,22 @@ private function createIdTestClass(string $type, string $strategy): string
364364

365365
if (! class_exists($className)) {
366366
$code = sprintf(
367-
'namespace Doctrine\ODM\MongoDB\Tests\Functional;
368-
369-
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
370-
371-
#[ODM\Document]
372-
class %s
373-
{
374-
#[ODM\Id(strategy: "%s", options: ["type" => "%s"])]
375-
public $id;
376-
377-
#[ODM\Field(type: "string")]
378-
public $test = "test";
379-
}',
367+
<<<'PHP'
368+
namespace %s;
369+
370+
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
371+
372+
#[ODM\Document]
373+
class %s
374+
{
375+
#[ODM\Id(strategy: "%s", options: ["type" => "%s"])]
376+
public $id;
377+
378+
#[ODM\Field(type: "string")]
379+
public $test = "test";
380+
}
381+
PHP,
382+
__NAMESPACE__,
380383
$shortClassName,
381384
$strategy,
382385
$type,

0 commit comments

Comments
 (0)