Skip to content

Commit 2861930

Browse files
committed
fixed #70
1 parent 87c69db commit 2861930

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Utils.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public static function getData(array $providers, $name, Url $url = null)
8686
'value' => $v,
8787
'providers' => [$key],
8888
];
89-
} else {
89+
} elseif (!in_array($key, $values[$v]['providers'], true)) {
9090
$values[$v]['providers'][] = $key;
9191
}
9292
}
@@ -109,10 +109,10 @@ public static function sortByProviders(array $values)
109109
foreach ($values as $value) {
110110
foreach ($value['providers'] as $provider) {
111111
if (!isset($sorted[$provider])) {
112-
$sorted[$provider] = [];
112+
$sorted[$provider] = [$value];
113+
} else {
114+
$sorted[$provider][] = $value;
113115
}
114-
115-
$sorted[$provider][] = $value;
116116
}
117117
}
118118

0 commit comments

Comments
 (0)