Skip to content

Commit

Permalink
Use getName() instead of get()
Browse files Browse the repository at this point in the history
  • Loading branch information
squrious committed Mar 21, 2024
1 parent d231549 commit 0aad8af
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/CHANGELOG.md
Expand Up @@ -7,7 +7,7 @@ CHANGELOG
* Add method `getEnabledTransition()` to `WorkflowInterface`
* Automatically register places from transitions
* Add support for workflows that need to store many tokens in the marking
* Add method `get()` in event classes to build event names in subscribers
* Add method `getName()` in event classes to build event names in subscribers

7.0
---
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/Event/AnnounceEvent.php
Expand Up @@ -18,7 +18,7 @@
final class AnnounceEvent extends Event
{
use EventNameTrait {
getNameForTransition as public get;
getNameForTransition as public getName;
}
use HasContextTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/Event/CompletedEvent.php
Expand Up @@ -18,7 +18,7 @@
final class CompletedEvent extends Event
{
use EventNameTrait {
getNameForTransition as public get;
getNameForTransition as public getName;
}
use HasContextTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/Event/EnterEvent.php
Expand Up @@ -18,7 +18,7 @@
final class EnterEvent extends Event
{
use EventNameTrait {
getNameForPlace as public get;
getNameForPlace as public getName;
}
use HasContextTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/Event/EnteredEvent.php
Expand Up @@ -18,7 +18,7 @@
final class EnteredEvent extends Event
{
use EventNameTrait {
getNameForPlace as public get;
getNameForPlace as public getName;
}
use HasContextTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/Event/GuardEvent.php
Expand Up @@ -24,7 +24,7 @@
final class GuardEvent extends Event
{
use EventNameTrait {
getNameForTransition as public get;
getNameForTransition as public getName;
}

private TransitionBlockerList $transitionBlockerList;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/Event/LeaveEvent.php
Expand Up @@ -18,7 +18,7 @@
final class LeaveEvent extends Event
{
use EventNameTrait {
getNameForPlace as public get;
getNameForPlace as public getName;
}
use HasContextTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/Event/TransitionEvent.php
Expand Up @@ -18,7 +18,7 @@
final class TransitionEvent extends Event
{
use EventNameTrait {
getNameForTransition as public get;
getNameForTransition as public getName;
}
use HasContextTrait;

Expand Down
Expand Up @@ -29,7 +29,7 @@ class EventNameTraitTest extends TestCase
*/
public function testEventNames(string $class, ?string $workflowName, ?string $transitionOrPlaceName, string $expected)
{
$name = $class::get($workflowName, $transitionOrPlaceName);
$name = $class::getName($workflowName, $transitionOrPlaceName);
$this->assertEquals($expected, $name);
}

Expand Down Expand Up @@ -68,6 +68,6 @@ public function testInvalidArgumentExceptionIsThrownIfWorkflowNameIsMissing()
{
$this->expectException(\InvalidArgumentException::class);

EnterEvent::get(null, 'place');
EnterEvent::getName(null, 'place');
}
}

0 comments on commit 0aad8af

Please sign in to comment.