@@ -31,24 +31,24 @@ class PlantUmlDumper implements DumperInterface
3131
3232 const STATEMACHINE_TRANSITION = 'arrow ' ;
3333 const WORKFLOW_TRANSITION = 'square ' ;
34- const TRANSITION_TYPES = array ( self ::STATEMACHINE_TRANSITION , self ::WORKFLOW_TRANSITION ) ;
35- const DEFAULT_OPTIONS = array (
36- 'skinparams ' => array (
34+ const TRANSITION_TYPES = [ self ::STATEMACHINE_TRANSITION , self ::WORKFLOW_TRANSITION ] ;
35+ const DEFAULT_OPTIONS = [
36+ 'skinparams ' => [
3737 'titleBorderRoundCorner ' => 15 ,
3838 'titleBorderThickness ' => 2 ,
39- 'state ' => array (
39+ 'state ' => [
4040 'BackgroundColor ' .self ::INITIAL => '#87b741 ' ,
4141 'BackgroundColor ' .self ::MARKED => '#3887C6 ' ,
4242 'BorderColor ' => '#3887C6 ' ,
4343 'BorderColor ' .self ::MARKED => 'Black ' ,
4444 'FontColor ' .self ::MARKED => 'White ' ,
45- ) ,
46- 'agent ' => array (
45+ ] ,
46+ 'agent ' => [
4747 'BackgroundColor ' => '#ffffff ' ,
4848 'BorderColor ' => '#3887C6 ' ,
49- ) ,
50- ) ,
51- ) ;
49+ ] ,
50+ ] ,
51+ ] ;
5252
5353 private $ transitionType = self ::STATEMACHINE_TRANSITION ;
5454
@@ -60,7 +60,7 @@ public function __construct(string $transitionType = null)
6060 $ this ->transitionType = $ transitionType ;
6161 }
6262
63- public function dump (Definition $ definition , Marking $ marking = null , array $ options = array () ): string
63+ public function dump (Definition $ definition , Marking $ marking = null , array $ options = [] ): string
6464 {
6565 $ options = array_replace_recursive (self ::DEFAULT_OPTIONS , $ options );
6666 $ code = $ this ->initialize ($ options );
@@ -84,10 +84,10 @@ public function dump(Definition $definition, Marking $marking = null, array $opt
8484 foreach ($ transition ->getTos () as $ to ) {
8585 $ toEscaped = $ this ->escape ($ to );
8686 if ($ this ->isWorkflowTransitionType ()) {
87- $ lines = array (
87+ $ lines = [
8888 "$ fromEscaped --> $ transitionEscaped " ,
8989 "$ transitionEscaped --> $ toEscaped " ,
90- ) ;
90+ ] ;
9191 foreach ($ lines as $ line ) {
9292 if (!\in_array ($ line , $ code )) {
9393 $ code [] = $ line ;
@@ -128,7 +128,7 @@ private function getLines(array $code): string
128128
129129 private function initialize (array $ options ): array
130130 {
131- $ code = array () ;
131+ $ code = [] ;
132132 if (isset ($ options ['title ' ])) {
133133 $ code [] = "title {$ options ['title ' ]}" ;
134134 }
0 commit comments