blob: 979ab0a8f2f14a47bd268df2ddb860224206c291 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
From ff3e1ccdca5792de7a1aed654272f04bffe833ba Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 26 Jun 2017 09:04:17 +0200
Subject: [PATCH] restore PHP 5.3 compatibility
---
src/CollectorResult.php | 2 +-
tests/DuplicateDetectionTest.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/CollectorResult.php b/src/CollectorResult.php
index 9556767..3538140 100644
--- a/src/CollectorResult.php
+++ b/src/CollectorResult.php
@@ -44,7 +44,7 @@ public function addParseResult(\SplFileInfo $file, ParseResult $result) {
}
if (isset($this->units[$unit])) {
if (!isset($this->duplicates[$unit])) {
- $this->duplicates[$unit] = [ $this->units[$unit] ];
+ $this->duplicates[$unit] = array( $this->units[$unit] );
}
$this->duplicates[$unit][] = $filename;
continue;
diff --git a/tests/DuplicateDetectionTest.php b/tests/DuplicateDetectionTest.php
index cf88701..4b02da1 100644
--- a/tests/DuplicateDetectionTest.php
+++ b/tests/DuplicateDetectionTest.php
@@ -43,7 +43,7 @@
class DuplicateDetectionTest extends \PHPUnit\Framework\TestCase {
public function testBugIsFixed() {
- $config = new Config([]);
+ $config = new Config(array());
$config->setLowercaseMode(true);
$factory = new Factory();
|