Debian Codegraph @

lib/3rdParty/composer/illuminate/support/Testing/Fakes/ChainedBatchTruthTest.php

raw symbols SCIP
1 <?php
2
3 namespace Illuminate\Support\Testing\Fakes;
4
5 use Closure;
6
7 class ChainedBatchTruthTest
8 {
9 /**
10 * The underlying truth test.
11 *
12 * @var \Closure(\Illuminate\Bus\PendingBatch): bool
13 */
14 protected $callback;
15
16 /**
17 * Create a new truth test instance.
18 *
19 * @param \Closure(\Illuminate\Bus\PendingBatch): bool $callback
20 */
21 public function __construct(Closure $callback)
22 {
23 $this->callback = $callback;
24 }
25
26 /**
27 * Invoke the truth test with the given pending batch.
28 *
29 * @param \Illuminate\Bus\PendingBatch $pendingBatch
30 * @return bool
31 */
32 public function __invoke($pendingBatch)
33 {
34 return call_user_func($this->callback, $pendingBatch);
35 }
36 }