@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | '@testValueFilter' => false, |
46 | 46 | ]; |
47 | 47 | |
48 | - private $inheritance = [ NodeInterface::class ]; |
|
48 | + private $inheritance = [NodeInterface::class]; |
|
49 | 49 | |
50 | - private $traits = [ EntityTrait::class, IdentifiableEntityTrait::class ]; |
|
50 | + private $traits = [EntityTrait::class, IdentifiableEntityTrait::class]; |
|
51 | 51 | |
52 | 52 | public function propertiesProvider() |
53 | 53 | { |
@@ -56,16 +56,16 @@ discard block |
||
56 | 56 | ['name', 'testName'], |
57 | 57 | ['value', ['value' => '', 'setter_exception' => ['\InvalidArgumentException', 'Value must not be empty']]], |
58 | 58 | ['value', 'testValue'], |
59 | - ['value', ['pre' => function () { |
|
59 | + ['value', ['pre' => function() { |
|
60 | 60 | $this->target->setName('test Name'); |
61 | 61 | }, 'value' => '', 'expect' => 'test_name']], |
62 | - ['value', ['pre' => function () { |
|
62 | + ['value', ['pre' => function() { |
|
63 | 63 | $this->target->setName('test-Name'); |
64 | 64 | }, 'value' => '', 'expect' => 'test_name']], |
65 | - ['value', ['pre' => function () { |
|
65 | + ['value', ['pre' => function() { |
|
66 | 66 | $this->target->setName('testName'); |
67 | 67 | }, 'value' => '', 'expect' => 'testname']], |
68 | - ['value', ['pre' => function () { |
|
68 | + ['value', ['pre' => function() { |
|
69 | 69 | $this->target->setName('test Name'); |
70 | 70 | }, 'ignore_setter' => true, 'value' => 'test_name']], |
71 | 71 | ['priority', 12], |
@@ -31,5 +31,5 @@ |
||
31 | 31 | |
32 | 32 | private $target = EmbeddedLeafs::class; |
33 | 33 | |
34 | - private $inheritance = [ AbstractLeafs::class ]; |
|
34 | + private $inheritance = [AbstractLeafs::class]; |
|
35 | 35 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | public function testSetGetName() |
54 | 54 | { |
55 | - $name="test.jpg"; |
|
55 | + $name = "test.jpg"; |
|
56 | 56 | $this->target->setName($name); |
57 | 57 | $this->assertSame($this->target->getName(), $name); |
58 | 58 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | public function testGetDateUploaded() |
109 | 109 | { |
110 | - $input= new \DateTime("2016-01-02"); |
|
110 | + $input = new \DateTime("2016-01-02"); |
|
111 | 111 | $this->target->setDateUploaded($input); |
112 | 112 | $this->assertEquals($this->target->getDateUploaded(), $input); |
113 | 113 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | private $target = 'getTarget'; |
44 | 44 | |
45 | - private $inheritance = [ StrategyInterface::class ]; |
|
45 | + private $inheritance = [StrategyInterface::class]; |
|
46 | 46 | |
47 | 47 | public function propertiesProvider() |
48 | 48 | { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | ['treeRoot', new Node()], |
52 | 52 | ['allowSelectMultipleItems', ['default' => false, 'value' => true, 'getter_method' => '*']], |
53 | 53 | ['allowSelectMultipleItems', ['value' => false, 'getter_method' => '*']], |
54 | - ['allowSelectMultipleItems', ['value' => function () { |
|
54 | + ['allowSelectMultipleItems', ['value' => function() { |
|
55 | 55 | return true; |
56 | 56 | }, 'getter_method' => '*', 'expect' => true]], |
57 | 57 |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | public function provideSetFormData() |
135 | 135 | { |
136 | 136 | return [ |
137 | - ['fieldname','input',true,true ], |
|
138 | - ['fieldname', 'foobar', false, false ], |
|
137 | + ['fieldname', 'input', true, true], |
|
138 | + ['fieldname', 'foobar', false, false], |
|
139 | 139 | ]; |
140 | 140 | } |
141 | 141 | |
@@ -192,10 +192,10 @@ discard block |
||
192 | 192 | |
193 | 193 | |
194 | 194 | return [ |
195 | - [$e['application'], null , $e['application'] ], |
|
196 | - [$e['job'], 'job' , $e['job'] ], |
|
197 | - [$e['user'], null , $e['user'] ], |
|
198 | - [$e['organization'], null , $e['organization'] ], |
|
195 | + [$e['application'], null, $e['application']], |
|
196 | + [$e['job'], 'job', $e['job']], |
|
197 | + [$e['user'], null, $e['user']], |
|
198 | + [$e['organization'], null, $e['organization']], |
|
199 | 199 | ]; |
200 | 200 | } |
201 | 201 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $childName = 'child'; |
214 | 214 | $child = new Container($childName); |
215 | 215 | $this->target->setForm($childName, $child); |
216 | - $this->assertSame($childName .'.' . $name, $child->formatAction($name)); |
|
216 | + $this->assertSame($childName.'.'.$name, $child->formatAction($name)); |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | public function testGetActionFor() |
@@ -26,9 +26,9 @@ |
||
26 | 26 | protected function setUp() |
27 | 27 | { |
28 | 28 | $this->target = $this->getMockBuilder('Core\Form\BaseForm') |
29 | - ->disableOriginalConstructor() |
|
30 | - ->setMethods(array('AddButtonsFieldset', 'AddBaseFieldset', 'add')) |
|
31 | - ->getMock(); |
|
29 | + ->disableOriginalConstructor() |
|
30 | + ->setMethods(array('AddButtonsFieldset', 'AddBaseFieldset', 'add')) |
|
31 | + ->getMock(); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function testConstructor() |
@@ -36,41 +36,41 @@ |
||
36 | 36 | */ |
37 | 37 | protected $target = '\Core\Form\Event\FormEvent'; |
38 | 38 | |
39 | - protected $inheritance = [ '\Zend\EventManager\Event' ]; |
|
39 | + protected $inheritance = ['\Zend\EventManager\Event']; |
|
40 | 40 | |
41 | 41 | public function propertiesProvider() |
42 | 42 | { |
43 | 43 | $form = new Form(); |
44 | 44 | $container = new Container(); |
45 | 45 | return [ |
46 | - [ 'Form', '@\Zend\Form\Form' ], |
|
47 | - [ 'Form', '@\Core\Form\Container' ], |
|
48 | - [ 'Form', [ 'value' => 'invalid', 'setter_exception' => ['\InvalidArgumentException', 'Form must either' ] ] ], |
|
49 | - [ 'Target', 'TestTarget' ], |
|
50 | - [ 'Target', [ |
|
46 | + ['Form', '@\Zend\Form\Form'], |
|
47 | + ['Form', '@\Core\Form\Container'], |
|
48 | + ['Form', ['value' => 'invalid', 'setter_exception' => ['\InvalidArgumentException', 'Form must either']]], |
|
49 | + ['Target', 'TestTarget'], |
|
50 | + ['Target', [ |
|
51 | 51 | 'value' => $form, |
52 | - 'expect_property' => [ 'form', $form ] |
|
52 | + 'expect_property' => ['form', $form] |
|
53 | 53 | ]], |
54 | - [ 'Target', [ |
|
54 | + ['Target', [ |
|
55 | 55 | 'value' => $container, |
56 | - 'expect_property' => [ 'form', $container ], |
|
56 | + 'expect_property' => ['form', $container], |
|
57 | 57 | ]], |
58 | - [ 'Target', [ |
|
58 | + ['Target', [ |
|
59 | 59 | 'value' => 'NonFormOrContainer', |
60 | - 'expect_property' => [ 'form', null ], |
|
60 | + 'expect_property' => ['form', null], |
|
61 | 61 | ]], |
62 | - [ 'Params', [ 'value' => [ 'param1' => 'value1' ]]], |
|
63 | - [ 'Params', [ |
|
64 | - 'value' => [ 'form' => $form ], |
|
65 | - 'expect_property' => [ 'form', $form ] |
|
62 | + ['Params', ['value' => ['param1' => 'value1']]], |
|
63 | + ['Params', [ |
|
64 | + 'value' => ['form' => $form], |
|
65 | + 'expect_property' => ['form', $form] |
|
66 | 66 | ]], |
67 | - [ 'Params', [ |
|
68 | - 'value' => [ 'form' => $container ], |
|
69 | - 'expect_property' => [ 'form', $container ] |
|
67 | + ['Params', [ |
|
68 | + 'value' => ['form' => $container], |
|
69 | + 'expect_property' => ['form', $container] |
|
70 | 70 | ]], |
71 | - [ 'Params', [ |
|
72 | - 'value' => [ 'form' => 'notAnFormInstance' ], |
|
73 | - 'expect_property' => [ 'form', null ] |
|
71 | + ['Params', [ |
|
72 | + 'value' => ['form' => 'notAnFormInstance'], |
|
73 | + 'expect_property' => ['form', null] |
|
74 | 74 | ]] |
75 | 75 | ]; |
76 | 76 | } |
@@ -42,9 +42,9 @@ |
||
42 | 42 | |
43 | 43 | public function testSetGetFormId() |
44 | 44 | { |
45 | - $id=123; |
|
45 | + $id = 123; |
|
46 | 46 | $this->target->setFormId($id); |
47 | - $this->assertSame($this->target->getFormId(), (string)$id); |
|
47 | + $this->assertSame($this->target->getFormId(), (string) $id); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | public function testSetAttribute() |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | public function providerRenderMode() |
53 | 53 | { |
54 | 54 | return [ |
55 | - [SummaryFormInterface::RENDER_FORM,SummaryFormInterface::RENDER_FORM], |
|
56 | - [SummaryFormInterface::RENDER_SUMMARY,SummaryFormInterface::RENDER_SUMMARY], |
|
55 | + [SummaryFormInterface::RENDER_FORM, SummaryFormInterface::RENDER_FORM], |
|
56 | + [SummaryFormInterface::RENDER_SUMMARY, SummaryFormInterface::RENDER_SUMMARY], |
|
57 | 57 | [SummaryFormInterface::RENDER_ALL, SummaryFormInterface::RENDER_ALL], |
58 | 58 | ]; |
59 | 59 | } |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | public function providerDisplayMode() |
76 | 76 | { |
77 | 77 | return [ |
78 | - [SummaryFormInterface::DISPLAY_FORM,SummaryFormInterface::DISPLAY_FORM], |
|
79 | - [SummaryFormInterface::DISPLAY_SUMMARY,SummaryFormInterface::DISPLAY_SUMMARY], |
|
78 | + [SummaryFormInterface::DISPLAY_FORM, SummaryFormInterface::DISPLAY_FORM], |
|
79 | + [SummaryFormInterface::DISPLAY_SUMMARY, SummaryFormInterface::DISPLAY_SUMMARY], |
|
80 | 80 | ]; |
81 | 81 | } |
82 | 82 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function testSetOptions($input, $expected) |
96 | 96 | { |
97 | - $this->target->setOptions(['display_mode' => $input ]); |
|
97 | + $this->target->setOptions(['display_mode' => $input]); |
|
98 | 98 | $this->assertSame($this->target->getDisplayMode(), $expected); |
99 | 99 | } |
100 | 100 | } |