Skip to content

Commit aaebade

Browse files
authored
Fix some functions!
1 parent 88b50a6 commit aaebade

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

src/vennv/vapm/AssumptionFailedError.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* SOFTWARE.
2323
*/
2424

25-
declare(strict_types = 1);
25+
declare(strict_types = 1);
2626

2727
namespace vennv\vapm;
2828

src/vennv/vapm/InternetRequestResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* SOFTWARE.
2323
*/
2424

25-
declare(strict_types = 1);
25+
declare(strict_types = 1);
2626

2727
namespace vennv\vapm;
2828

src/vennv/vapm/Promise.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,12 @@ public static function all(array $promises): Promise
378378
}
379379
}
380380
}
381-
}
382381

383-
if (count($results) === count($promises))
384-
{
385-
$resolve($results);
386-
$isSolved = true;
382+
if (count($results) === count($promises))
383+
{
384+
$resolve($results);
385+
$isSolved = true;
386+
}
387387
}
388388

389389
if ($isSolved === false)
@@ -425,15 +425,15 @@ public static function allSettled(array $promises): Promise
425425

426426
if ($return !== null)
427427
{
428-
$results[] = $return;
428+
$results[] = $return->getResult();
429429
}
430430
}
431-
}
432431

433-
if (count($results) === count($promises))
434-
{
435-
$resolve($results);
436-
$isSolved = true;
432+
if (count($results) === count($promises))
433+
{
434+
$resolve($results);
435+
$isSolved = true;
436+
}
437437
}
438438

439439
if ($isSolved === false)
@@ -487,12 +487,12 @@ public static function any(array $promises): Promise
487487
}
488488
}
489489
}
490-
}
491490

492-
if (count($results) === count($promises))
493-
{
494-
$reject($results);
495-
$isSolved = true;
491+
if (count($results) === count($promises))
492+
{
493+
$reject($results);
494+
$isSolved = true;
495+
}
496496
}
497497

498498
if ($isSolved === false)

src/vennv/vapm/Settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ final class Settings
3333
* The time in seconds to check should drop the promise if the promise is not resolved or rejected
3434
* in the specified time.
3535
*/
36-
public const TIME_DROP = 5;
36+
public const TIME_DROP = 15;
3737

3838
}

src/vennv/vapm/System.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public static function fetch(string $url, array $options = []) : Promise
120120
{
121121
$resolve($result);
122122
}
123-
}, 0);
123+
}, 500);
124124
});
125125
}
126126

@@ -143,8 +143,8 @@ public static function read(string $path) : Promise
143143
{
144144
$resolve($ch);
145145
}
146-
}, 0);
146+
}, 500);
147147
});
148148
}
149149

150-
}
150+
}

0 commit comments

Comments
 (0)