Skip to content

Commit 505fe58

Browse files
ISSUE-142: Updated code to PHP 5.5
1 parent 3b6f365 commit 505fe58

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

tests/BooleanToValueTransformerTest.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -140,40 +140,40 @@ public function testReverseTransformInvalidValue($trueValue, $falseValue)
140140
*/
141141
public function providerTrueFalseValue()
142142
{
143-
return array(
144-
'true/false' => array(true, false),
145-
'yes/no' => array('yes', 'no'),
146-
'on/off' => array('on', 'off'),
147-
'1/0' => array(1, 0),
148-
);
143+
return [
144+
'true/false' => [true, false],
145+
'yes/no' => ['yes', 'no'],
146+
'on/off' => ['on', 'off'],
147+
'1/0' => [1, 0],
148+
];
149149
}
150150

151151
/**
152152
* @return array[]
153153
*/
154154
public function providerNoBool()
155155
{
156-
return array(
157-
'int' => array(1),
158-
'float' => array(1.2),
159-
'string' => array('foo'),
160-
'array' => array(array('foo', 'bar')),
161-
'object' => array(new \stdClass),
162-
'resource' => array(tmpfile()),
163-
'callable' => array(function () {})
164-
);
156+
return [
157+
'int' => [1],
158+
'float' => [1.2],
159+
'string' => ['foo'],
160+
'array' => [['foo', 'bar']],
161+
'object' => [new \stdClass],
162+
'resource' => [tmpfile()],
163+
'callable' => [function () {}],
164+
];
165165
}
166166

167167
/**
168168
* @return array[]
169169
*/
170170
public function providerNoScalar()
171171
{
172-
return array(
173-
'array' => array(array('foo', 'bar')),
174-
'object' => array(new \stdClass),
175-
'resource' => array(tmpfile()),
176-
'callable' => array(function () {})
177-
);
172+
return [
173+
'array' => [['foo', 'bar']],
174+
'object' => [new \stdClass],
175+
'resource' => [tmpfile()],
176+
'callable' => [function () {}],
177+
];
178178
}
179179
}

tests/EntityToIdentifierTransformerTest.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ protected function setUp()
6161
$this->entityManager->method('getRepository')->willReturn($this->repository);
6262
$this->entityManager->method('getClassMetadata')->willReturn($this->metadata);
6363

64-
$this->metadata->method('getName')->willReturnCallback(array($this, 'getClassName'));
65-
$this->metadata->method('getIdentifierValues')->willReturnCallback(array($this, 'getIdentifier'));
64+
$this->metadata->method('getName')->willReturnCallback([$this, 'getClassName']);
65+
$this->metadata->method('getIdentifierValues')->willReturnCallback([$this, 'getIdentifier']);
6666

6767
$this->metadata->isIdentifierComposite = false;
6868
}
@@ -80,7 +80,7 @@ public function getClassName()
8080
*/
8181
public function getIdentifier()
8282
{
83-
return array('id' => $this->identifier);
83+
return ['id' => $this->identifier];
8484
}
8585

8686
/**
@@ -224,27 +224,27 @@ public function testReverseTransformEntityNotFound()
224224
*/
225225
public function providerNoObject()
226226
{
227-
return array(
228-
'bool' => array(true),
229-
'int' => array(1),
230-
'float' => array(1.2),
231-
'string' => array('foo'),
232-
'array' => array(array('foo', 'bar')),
233-
'resource' => array(tmpfile()),
234-
'callable' => array(function () {})
235-
);
227+
return [
228+
'bool' => [true],
229+
'int' => [1],
230+
'float' => [1.2],
231+
'string' => ['foo'],
232+
'array' => [['foo', 'bar']],
233+
'resource' => [tmpfile()],
234+
'callable' => [function () {}],
235+
];
236236
}
237237

238238
/**
239239
* @return array[]
240240
*/
241241
public function providerNoScalar()
242242
{
243-
return array(
244-
'array' => array(array('foo', 'bar')),
245-
'object' => array(new \stdClass()),
246-
'resource' => array(tmpfile()),
247-
'callable' => array(function () {}),
248-
);
243+
return [
244+
'array' => [['foo', 'bar']],
245+
'object' => [new \stdClass()],
246+
'resource' => [tmpfile()],
247+
'callable' => [function () {}],
248+
];
249249
}
250250
}

0 commit comments

Comments
 (0)