@@ -47,15 +47,15 @@ |
||
47 | 47 | ] |
48 | 48 | ]; |
49 | 49 | |
50 | - private $inheritance = [ LeafsInterface::class ]; |
|
50 | + private $inheritance = [LeafsInterface::class]; |
|
51 | 51 | |
52 | - private $traits = [ EntityTrait::class ]; |
|
52 | + private $traits = [EntityTrait::class]; |
|
53 | 53 | |
54 | 54 | public function propertiesProvider() |
55 | 55 | { |
56 | 56 | |
57 | 57 | return [ |
58 | - [ 'items', ['default' => new ArrayCollection(), 'value' => new \Doctrine\Common\Collections\ArrayCollection()]], |
|
58 | + ['items', ['default' => new ArrayCollection(), 'value' => new \Doctrine\Common\Collections\ArrayCollection()]], |
|
59 | 59 | ]; |
60 | 60 | } |
61 | 61 |
@@ -124,18 +124,18 @@ |
||
124 | 124 | private function getPreparedTarget() |
125 | 125 | { |
126 | 126 | return new FieldsetCustomizationOptions([ |
127 | - 'fields' => [ |
|
128 | - 'field' => [ |
|
129 | - 'attributes' => ['attr' => 'attrVal'], |
|
130 | - 'options' => ['opt1' => 'optVal' ], |
|
131 | - 'label' => 'label', |
|
132 | - 'required' => true, |
|
133 | - 'type' => 'ElementType', |
|
134 | - 'priority' => 12, |
|
135 | - 'flags' => ['priority' => 10], |
|
136 | - 'input_filter' => ['test' => 'works'], |
|
137 | - ], |
|
138 | - ], |
|
127 | + 'fields' => [ |
|
128 | + 'field' => [ |
|
129 | + 'attributes' => ['attr' => 'attrVal'], |
|
130 | + 'options' => ['opt1' => 'optVal' ], |
|
131 | + 'label' => 'label', |
|
132 | + 'required' => true, |
|
133 | + 'type' => 'ElementType', |
|
134 | + 'priority' => 12, |
|
135 | + 'flags' => ['priority' => 10], |
|
136 | + 'input_filter' => ['test' => 'works'], |
|
137 | + ], |
|
138 | + ], |
|
139 | 139 | ]); |
140 | 140 | } |
141 | 141 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | '@testCopyArrayValues' => Fcot_Mock::class, |
42 | 42 | ]; |
43 | 43 | |
44 | - private $inheritance = [ AbstractOptions::class ]; |
|
44 | + private $inheritance = [AbstractOptions::class]; |
|
45 | 45 | |
46 | 46 | public function propertiesProvider() |
47 | 47 | { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | 'fields' => [ |
128 | 128 | 'field' => [ |
129 | 129 | 'attributes' => ['attr' => 'attrVal'], |
130 | - 'options' => ['opt1' => 'optVal' ], |
|
130 | + 'options' => ['opt1' => 'optVal'], |
|
131 | 131 | 'label' => 'label', |
132 | 132 | 'required' => true, |
133 | 133 | 'type' => 'ElementType', |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | protected $target = [ |
31 | 31 | 'class' => '\Core\Options\Exception\MissingOptionException', |
32 | - 'args' => [ 'testOptionKey', 'TestTarget' ] |
|
32 | + 'args' => ['testOptionKey', 'TestTarget'] |
|
33 | 33 | ]; |
34 | 34 | |
35 | 35 | protected $inheritance = [ |
@@ -44,29 +44,29 @@ discard block |
||
44 | 44 | $target2 = new MissingOptionException('-', new \stdClass()); |
45 | 45 | |
46 | 46 | return [ |
47 | - [ 'OptionKey', [ |
|
47 | + ['OptionKey', [ |
|
48 | 48 | 'value' => 'testOptionKey', |
49 | 49 | 'ignore_setter' => true, |
50 | 50 | ]], |
51 | - [ 'target', [ |
|
51 | + ['target', [ |
|
52 | 52 | 'value' => 'TestTarget', |
53 | 53 | 'ignore_setter' => true, |
54 | 54 | ]], |
55 | - [ 'targetFQCN', [ |
|
55 | + ['targetFQCN', [ |
|
56 | 56 | 'value' => 'stdClass', |
57 | 57 | 'target' => $target2, |
58 | 58 | 'ignore_setter' => true, |
59 | 59 | ]], |
60 | - [ 'targetFQCN', [ |
|
60 | + ['targetFQCN', [ |
|
61 | 61 | 'value' => 'TestTarget', |
62 | 62 | 'ignore_setter' => true, |
63 | 63 | ]], |
64 | - [ 'previous', [ |
|
64 | + ['previous', [ |
|
65 | 65 | 'value' => $ex, |
66 | 66 | 'target' => $target, |
67 | 67 | 'ignore_setter' => true, |
68 | 68 | ]], |
69 | - [ 'message', [ |
|
69 | + ['message', [ |
|
70 | 70 | 'value' => 'Missing value for option "testOptionKey" in "TestTarget"', |
71 | 71 | 'ignore_setter' => true, |
72 | 72 | ]] |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | private $target = TreeHydrator::class; |
35 | 35 | |
36 | - private $inheritance = [ HydratorInterface::class ]; |
|
36 | + private $inheritance = [HydratorInterface::class]; |
|
37 | 37 | |
38 | 38 | private function getHydratedTree($mode = 'all') |
39 | 39 | { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | private function getExtractedTree() |
66 | 66 | { |
67 | - return [ 'items' => [ |
|
67 | + return ['items' => [ |
|
68 | 68 | new \ArrayObject([ |
69 | 69 | 'id' => 'root-id', |
70 | 70 | 'current' => '1', |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | { |
50 | 50 | $expect = ['extract' => 'works']; |
51 | 51 | $object = $this->getMockBuilder(MetaDataProviderInterface::class) |
52 | - ->setMethods(['getMetaData']) |
|
53 | - ->getMockForAbstractClass(); |
|
52 | + ->setMethods(['getMetaData']) |
|
53 | + ->getMockForAbstractClass(); |
|
54 | 54 | |
55 | 55 | $object->expects($this->once())->method('getMetaData')->willReturn($expect); |
56 | 56 | |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | public function testHydrationOfMetaDataProvider() |
70 | 70 | { |
71 | 71 | $object = $this->getMockBuilder(MetaDataProviderInterface::class) |
72 | - ->setMethods(['setMetaData']) |
|
73 | - ->getMockForAbstractClass(); |
|
72 | + ->setMethods(['setMetaData']) |
|
73 | + ->getMockForAbstractClass(); |
|
74 | 74 | |
75 | 75 | $object->expects($this->once())->method('setMetaData')->with('key', 'value'); |
76 | 76 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | private $target = MetaDataHydrator::class; |
37 | 37 | |
38 | - private $inheritance = [ HydratorInterface::class ]; |
|
38 | + private $inheritance = [HydratorInterface::class]; |
|
39 | 39 | |
40 | 40 | public function testExtractionOfNonMetaDataProvider() |
41 | 41 | { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $labeldContainer->setLabel('testLabel'); |
43 | 43 | $topContainer = new Container(); |
44 | 44 | $topContainer->setForm('child', [ '__instance__' => $object ]) |
45 | - ->setLabel('top'); |
|
45 | + ->setLabel('top'); |
|
46 | 46 | |
47 | 47 | return [ |
48 | 48 | /*[ 'Headscripts', [ |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $labeldContainer = new Container(); |
42 | 42 | $labeldContainer->setLabel('testLabel'); |
43 | 43 | $topContainer = new Container(); |
44 | - $topContainer->setForm('child', [ '__instance__' => $object ]) |
|
44 | + $topContainer->setForm('child', ['__instance__' => $object]) |
|
45 | 45 | ->setLabel('top'); |
46 | 46 | |
47 | 47 | return [ |
@@ -49,85 +49,85 @@ discard block |
||
49 | 49 | 'default' => [ '/assets/twitter-bootstrap-wizard/jquery.bootstrap.wizard.js' ], |
50 | 50 | 'value' => [ 'test/scripts' ], |
51 | 51 | ]],*/ |
52 | - [ 'Form', [ |
|
52 | + ['Form', [ |
|
53 | 53 | 'value' => 'test', |
54 | - 'setter_args' => [ $object ], |
|
55 | - 'setter_exception' => [ '\InvalidArgumentException', 'Tab container must be of the type' ], |
|
54 | + 'setter_args' => [$object], |
|
55 | + 'setter_exception' => ['\InvalidArgumentException', 'Tab container must be of the type'], |
|
56 | 56 | ]], |
57 | - [ 'Form', [ |
|
57 | + ['Form', [ |
|
58 | 58 | 'value' => 'test', |
59 | - 'setter_args' => [ $container ], |
|
60 | - 'setter_exception' => [ '\InvalidArgumentException', 'Container instances must have a label' ], |
|
59 | + 'setter_args' => [$container], |
|
60 | + 'setter_exception' => ['\InvalidArgumentException', 'Container instances must have a label'], |
|
61 | 61 | ]], |
62 | - [ 'Form', [ |
|
62 | + ['Form', [ |
|
63 | 63 | 'value' => 'test', |
64 | - 'setter_args' => [ $labeldContainer ], |
|
65 | - 'getter_args' => [ 'test', true ], |
|
64 | + 'setter_args' => [$labeldContainer], |
|
65 | + 'getter_args' => ['test', true], |
|
66 | 66 | 'expect' => $labeldContainer, |
67 | 67 | ]], |
68 | - [ 'Form', [ |
|
68 | + ['Form', [ |
|
69 | 69 | 'value' => 'test', |
70 | - 'setter_args' => [ 'Test/Container' ], |
|
71 | - 'getter_args' => [ 'test', /*asInstance*/ false ], |
|
70 | + 'setter_args' => ['Test/Container'], |
|
71 | + 'getter_args' => ['test', /*asInstance*/ false], |
|
72 | 72 | 'expect' => [ |
73 | 73 | 'type' => 'Test/Container', |
74 | 74 | 'name' => 'test', |
75 | 75 | 'entity' => '*', |
76 | 76 | ], |
77 | 77 | ]], |
78 | - [ 'Form', [ |
|
78 | + ['Form', [ |
|
79 | 79 | 'value' => 'test', |
80 | - 'setter_args' => [ [ 'type' => 'Test/Container' ] ], |
|
81 | - 'getter_args' => [ 'test', false ], |
|
80 | + 'setter_args' => [['type' => 'Test/Container']], |
|
81 | + 'getter_args' => ['test', false], |
|
82 | 82 | 'expect' => [ |
83 | 83 | 'type' => 'Test/Container', |
84 | 84 | 'name' => 'test', |
85 | 85 | 'entity' => '*', |
86 | 86 | ], |
87 | 87 | ]], |
88 | - [ 'Form', [ |
|
88 | + ['Form', [ |
|
89 | 89 | 'value' => 'test', |
90 | - 'setter_args' => [ [ ] ], |
|
91 | - 'getter_args' => [ 'test', false ], |
|
90 | + 'setter_args' => [[]], |
|
91 | + 'getter_args' => ['test', false], |
|
92 | 92 | 'expect' => [ |
93 | 93 | 'type' => 'Core/Container', |
94 | 94 | 'name' => 'test', |
95 | 95 | 'entity' => '*', |
96 | 96 | ], |
97 | 97 | ]], |
98 | - [ 'Form', [ |
|
98 | + ['Form', [ |
|
99 | 99 | 'value' => 'test', |
100 | - 'setter_args' => [ [ 'forms' => [] ] ], |
|
101 | - 'getter_args' => [ 'test', false ], |
|
100 | + 'setter_args' => [['forms' => []]], |
|
101 | + 'getter_args' => ['test', false], |
|
102 | 102 | 'expect' => [ |
103 | 103 | 'type' => 'Core/Container', |
104 | 104 | 'name' => 'test', |
105 | - 'options' => [ 'forms' => [] ], |
|
105 | + 'options' => ['forms' => []], |
|
106 | 106 | 'entity' => '*', |
107 | 107 | ] |
108 | 108 | ]], |
109 | - [ 'Form', [ |
|
109 | + ['Form', [ |
|
110 | 110 | 'value' => 'test', |
111 | - 'setter_args' => [ [ '__instance__' => $object ] ], |
|
112 | - 'getter_args' => [ 'test' ], |
|
111 | + 'setter_args' => [['__instance__' => $object]], |
|
112 | + 'getter_args' => ['test'], |
|
113 | 113 | 'getter_exception' => '\UnexpectedValueException' |
114 | 114 | ]], |
115 | - [ 'Form', [ |
|
115 | + ['Form', [ |
|
116 | 116 | 'value' => 'test', |
117 | - 'setter_args' => [ [ '__instance__' => $container ] ], |
|
118 | - 'getter_args' => [ 'test' ], |
|
117 | + 'setter_args' => [['__instance__' => $container]], |
|
118 | + 'getter_args' => ['test'], |
|
119 | 119 | 'getter_exception' => '\UnexpectedValueException' |
120 | 120 | ]], |
121 | - [ 'Form', [ |
|
121 | + ['Form', [ |
|
122 | 122 | 'value' => 'test', |
123 | - 'setter_args' => [ [ '__instance__' => $labeldContainer ] ], |
|
124 | - 'getter_args' => [ 'test' ], |
|
123 | + 'setter_args' => [['__instance__' => $labeldContainer]], |
|
124 | + 'getter_args' => ['test'], |
|
125 | 125 | 'expect' => $labeldContainer |
126 | 126 | ]], |
127 | - [ 'Form', [ |
|
127 | + ['Form', [ |
|
128 | 128 | 'value' => 'test', |
129 | - 'setter_args' => [ [ '__instance__' => $topContainer ] ], |
|
130 | - 'getter_args' => [ 'test.child' ], |
|
129 | + 'setter_args' => [['__instance__' => $topContainer]], |
|
130 | + 'getter_args' => ['test.child'], |
|
131 | 131 | 'expect' => $object |
132 | 132 | ]], |
133 | 133 |
@@ -106,7 +106,7 @@ |
||
106 | 106 | [ |
107 | 107 | [ |
108 | 108 | 0 => ['name' => 'test', 'options' => ['opt' => 'value', 'label' => 'Overridden']], |
109 | - 1 => [ 't' => 'y', 'test' => 'AlsoOverridden'] |
|
109 | + 1 => ['t' => 'y', 'test' => 'AlsoOverridden'] |
|
110 | 110 | ] |
111 | 111 | ], |
112 | 112 | $this->target->addCalledWithArgs |
@@ -146,7 +146,7 @@ |
||
146 | 146 | |
147 | 147 | $this->assertEquals( |
148 | 148 | ['test' => ['required' => true], |
149 | - 'test2' => ['filters' => []]], |
|
149 | + 'test2' => ['filters' => []]], |
|
150 | 150 | $actual |
151 | 151 | ); |
152 | 152 | } |
@@ -32,14 +32,14 @@ |
||
32 | 32 | |
33 | 33 | private $target = ManagementForm::class; |
34 | 34 | |
35 | - private $inheritance = [ SummaryForm::class, HeadscriptProviderInterface::class ]; |
|
35 | + private $inheritance = [SummaryForm::class, HeadscriptProviderInterface::class]; |
|
36 | 36 | |
37 | 37 | private $attributes = [ |
38 | 38 | 'baseFieldset' => 'Core/Tree/ManagementFieldset', |
39 | - 'attributes' => [ 'method' => 'POST', 'class' => 'yk-tree-management-form' ], |
|
39 | + 'attributes' => ['method' => 'POST', 'class' => 'yk-tree-management-form'], |
|
40 | 40 | ]; |
41 | 41 | |
42 | 42 | private $properties = [ |
43 | - [ 'headscripts', ['value' => ['testHeadScript'], 'default' => [ 'modules/Core/js/html.sortable.min.js', 'modules/Core/js/forms.tree-management.js' ]] ] |
|
43 | + ['headscripts', ['value' => ['testHeadScript'], 'default' => ['modules/Core/js/html.sortable.min.js', 'modules/Core/js/forms.tree-management.js']]] |
|
44 | 44 | ]; |
45 | 45 | } |
@@ -40,12 +40,12 @@ |
||
40 | 40 | */ |
41 | 41 | private $target = [ |
42 | 42 | ManagementFieldset::class, |
43 | - '@testInitialize' => [ 'mock' => ['add'] ], |
|
43 | + '@testInitialize' => ['mock' => ['add']], |
|
44 | 44 | ]; |
45 | 45 | |
46 | - private $inheritance = [ Fieldset::class, ViewPartialProviderInterface::class ]; |
|
46 | + private $inheritance = [Fieldset::class, ViewPartialProviderInterface::class]; |
|
47 | 47 | |
48 | - private $traits = [ ViewPartialProviderTrait::class ]; |
|
48 | + private $traits = [ViewPartialProviderTrait::class]; |
|
49 | 49 | |
50 | 50 | private $attributes = [ |
51 | 51 | 'defaultPartial' => 'core/form/tree-manage', |