Skip to content

Commit 572543e

Browse files
authored
Make sure we always use a string (#118)
1 parent 7bb3117 commit 572543e

File tree

8 files changed

+19
-8
lines changed

8 files changed

+19
-8
lines changed

src/Visitor/Php/Symfony/FlashMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function enterNode(Node $node)
3737
$name = (string) $node->name;
3838
$caller = $node->var;
3939
// $caller might be "Node\Expr\New_"
40-
$callerName = isset($caller->name) ? $caller->name : '';
40+
$callerName = isset($caller->name) ? (string) $caller->name : '';
4141

4242
/*
4343
* Make sure the caller is from a variable named "this" or a function called "getFlashbag"

tests/Resources/Github/Issue_101.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Translation\Extractor\Tests\Resources\Php\Symfony;
3+
namespace Translation\Extractor\Tests\Resources\Github;
44

55
class NotAnArrayAttrType
66
{

tests/Resources/Github/Issue_104.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Translation\Extractor\Tests\Resources\Php\Symfony;
3+
namespace Translation\Extractor\Tests\Resources\Github;
44

55
class Issue104Type
66
{
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Translation\Extractor\Tests\Resources\Github;
4+
5+
class FooContoller
6+
{
7+
public function index()
8+
{
9+
$this->getFlashBag()->add('success', 'issue_108');
10+
}
11+
}

tests/Resources/Github/Issue_109.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Translation\Extractor\Tests\Resources\Php\Symfony;
3+
namespace Translation\Extractor\Tests\Resources\Github;
44
use Translation\Extractor\Annotation\Ignore;
55

66
class MustNotBeIgnoredType
@@ -19,4 +19,4 @@ public function buildForm(FormBuilderInterface $builder, array $options)
1919
'placeholder' => 'github.issue_109.d',
2020
));
2121
}
22-
}
22+
}

tests/Resources/Github/Issue_111.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Translation\Extractor\Tests\Resources\Php\Symfony;
3+
namespace Translation\Extractor\Tests\Resources\Github;
44

55
use Translation\Extractor\Annotation\Ignore;
66

tests/Resources/Github/issue_82.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Translation\Extractor\Tests\Resources\Php\Symfony;
3+
namespace Translation\Extractor\Tests\Resources\Github;
44

55
class GlobalTranslationDomainType
66
{

tests/Resources/Github/issue_96.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Translation\Extractor\Tests\Resources\Php\Symfony;
3+
namespace Translation\Extractor\Tests\Resources\Github;
44

55
class GlobalTranslationDomainWithPlaceholderType
66
{

0 commit comments

Comments
 (0)