Skip to content

Commit efe200c

Browse files
Merge branch '2.8' into 3.4
* 2.8: Fix Clidumper tests Enable the fixer enforcing fully-qualified calls for compiler-optimized functions Apply fixers Disable the native_constant_invocation fixer until it can be scoped Update the list of excluded files for the CS fixer
1 parent b5fee44 commit efe200c

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

Definition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private function addPlace($place)
8686
throw new InvalidArgumentException(sprintf('The place "%s" contains invalid characters.', $place));
8787
}
8888

89-
if (!count($this->places)) {
89+
if (!\count($this->places)) {
9090
$this->initialPlace = $place;
9191
}
9292

EventListener/AuditTrailListener.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ public function __construct(LoggerInterface $logger)
3030
public function onLeave(Event $event)
3131
{
3232
foreach ($event->getTransition()->getFroms() as $place) {
33-
$this->logger->info(sprintf('Leaving "%s" for subject of class "%s" in workflow "%s".', $place, get_class($event->getSubject()), $event->getWorkflowName()));
33+
$this->logger->info(sprintf('Leaving "%s" for subject of class "%s" in workflow "%s".', $place, \get_class($event->getSubject()), $event->getWorkflowName()));
3434
}
3535
}
3636

3737
public function onTransition(Event $event)
3838
{
39-
$this->logger->info(sprintf('Transition "%s" for subject of class "%s" in workflow "%s".', $event->getTransition()->getName(), get_class($event->getSubject()), $event->getWorkflowName()));
39+
$this->logger->info(sprintf('Transition "%s" for subject of class "%s" in workflow "%s".', $event->getTransition()->getName(), \get_class($event->getSubject()), $event->getWorkflowName()));
4040
}
4141

4242
public function onEnter(Event $event)
4343
{
4444
foreach ($event->getTransition()->getTos() as $place) {
45-
$this->logger->info(sprintf('Entering "%s" for subject of class "%s" in workflow "%s".', $place, get_class($event->getSubject()), $event->getWorkflowName()));
45+
$this->logger->info(sprintf('Entering "%s" for subject of class "%s" in workflow "%s".', $place, \get_class($event->getSubject()), $event->getWorkflowName()));
4646
}
4747
}
4848

EventListener/ExpressionLanguage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected function registerFunctions()
4141

4242
$errors = $variables['validator']->validate($object, null, $groups);
4343

44-
return 0 === count($errors);
44+
return 0 === \count($errors);
4545
});
4646
}
4747
}

Registry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function get($subject, $workflowName = null)
5858
}
5959

6060
if (!$matched) {
61-
throw new InvalidArgumentException(sprintf('Unable to find a workflow for class "%s".', get_class($subject)));
61+
throw new InvalidArgumentException(sprintf('Unable to find a workflow for class "%s".', \get_class($subject)));
6262
}
6363

6464
return $matched;

Validator/StateMachineValidator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ public function validate(Definition $definition, $name)
2424
$transitionFromNames = array();
2525
foreach ($definition->getTransitions() as $transition) {
2626
// Make sure that each transition has exactly one TO
27-
if (1 !== count($transition->getTos())) {
28-
throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one output. But the transition "%s" in StateMachine "%s" has %d outputs.', $transition->getName(), $name, count($transition->getTos())));
27+
if (1 !== \count($transition->getTos())) {
28+
throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one output. But the transition "%s" in StateMachine "%s" has %d outputs.', $transition->getName(), $name, \count($transition->getTos())));
2929
}
3030

3131
// Make sure that each transition has exactly one FROM
3232
$froms = $transition->getFroms();
33-
if (1 !== count($froms)) {
34-
throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one input. But the transition "%s" in StateMachine "%s" has %d inputs.', $transition->getName(), $name, count($froms)));
33+
if (1 !== \count($froms)) {
34+
throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one input. But the transition "%s" in StateMachine "%s" has %d inputs.', $transition->getName(), $name, \count($froms)));
3535
}
3636

3737
// Enforcing uniqueness of the names of transitions starting at each node

Validator/WorkflowValidator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function validate(Definition $definition, $name)
3535
$places = array_fill_keys($definition->getPlaces(), array());
3636
foreach ($definition->getTransitions() as $transition) {
3737
foreach ($transition->getFroms() as $from) {
38-
if (in_array($transition->getName(), $places[$from])) {
38+
if (\in_array($transition->getName(), $places[$from])) {
3939
throw new InvalidDefinitionException(sprintf('All transitions for a place must have an unique name. Multiple transitions named "%s" where found for place "%s" in workflow "%s".', $transition->getName(), $from, $name));
4040
}
4141
$places[$from][] = $transition->getName();
@@ -47,8 +47,8 @@ public function validate(Definition $definition, $name)
4747
}
4848

4949
foreach ($definition->getTransitions() as $transition) {
50-
if (1 < count($transition->getTos())) {
51-
throw new InvalidDefinitionException(sprintf('The marking store of workflow "%s" can not store many places. But the transition "%s" has too many output (%d). Only one is accepted.', $name, $transition->getName(), count($transition->getTos())));
50+
if (1 < \count($transition->getTos())) {
51+
throw new InvalidDefinitionException(sprintf('The marking store of workflow "%s" can not store many places. But the transition "%s" has too many output (%d). Only one is accepted.', $name, $transition->getName(), \count($transition->getTos())));
5252
}
5353
}
5454
}

0 commit comments

Comments
 (0)