Skip to content

Commit 4189e08

Browse files
author
Juuso Leinonen
committed
Making things prettier
1 parent 33b04ff commit 4189e08

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
vendor/
22
phpunit.xml
3-
.idea
43
.composer.lock

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"name": "leinonen/dataloader",
33
"type": "library",
4+
"description": "Port of Facebook's dataloader to PHP",
5+
"keywords": ["batch loading", "dataloader", "graphql"],
46
"require": {
57
"react/promise": "^2.5",
68
"react/event-loop": "^0.4.2"

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
<directory suffix=".php">./src/</directory>
1616
</whitelist>
1717
</filter>
18-
</phpunit>
18+
</phpunit>

src/DataLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,15 @@ private function dispatchQueueBatch($batch)
207207
function ($values) use ($batch, $keys) {
208208
if (! is_array($values)) {
209209
$this->handleFailedDispatch($batch, new \RuntimeException(
210-
DataLoader::class . ' must be constructed with a function which accepts ' .
210+
self::class . ' must be constructed with a function which accepts ' .
211211
'an array of keys and returns a Promise which resolves to an array of values ' .
212212
sprintf('not return a Promise: %s.', gettype($values))
213213
));
214214
}
215215

216216
if (count($values) !== count($keys)) {
217217
$this->handleFailedDispatch($batch, new \RuntimeException(
218-
DataLoader::class . ' must be constructed with a function which accepts ' .
218+
self::class . ' must be constructed with a function which accepts ' .
219219
'an array of keys and returns a Promise which resolves to an array of values, but ' .
220220
'the function did not return a Promise of an array of the same length as the array of keys.' .
221221
sprintf("\n Keys: %s\n Values: %s\n", count($keys), count($values))

0 commit comments

Comments
 (0)