1 | <?php |
||
22 | class Check implements Iface |
||
23 | { |
||
24 | private $object; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * Initializes the object |
||
29 | * |
||
30 | * @param Aimeos\MW\Process\Iface $object Parallel processing object |
||
|
|||
31 | */ |
||
32 | public function __construct( \Aimeos\MW\Process\Iface $object ) |
||
36 | |||
37 | |||
38 | /** |
||
39 | * Checks if processing tasks in parallel is available |
||
40 | * |
||
41 | * @return boolean True if available, false if not |
||
42 | */ |
||
43 | public function isAvailable() |
||
47 | |||
48 | |||
49 | /** |
||
50 | * Starts a new task by executing the given anonymous function |
||
51 | * |
||
52 | * @param \Closure $fcn Anonymous function to execute |
||
53 | * @param array $data List of parameters that is passed to the closure function |
||
54 | * @param boolean $restart True if the task should be restarted if it fails (only once) |
||
55 | * @return void |
||
56 | * @throws \Aimeos\MW\Process\Exception If starting the new task failed |
||
57 | */ |
||
58 | public function start( \Closure $fcn, array $data, $restart = false ) |
||
68 | |||
69 | |||
70 | /** |
||
71 | * Waits for the running tasks until all have finished |
||
72 | * |
||
73 | * @return void |
||
74 | */ |
||
75 | public function wait() |
||
83 | } |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.