1 | <?php namespace JobApis\JobsToMail\Jobs\Notifications; |
||
14 | class SearchAndNotifyUser implements ShouldQueue |
||
15 | { |
||
16 | use InteractsWithQueue, Queueable, SerializesModels; |
||
17 | |||
18 | /** |
||
19 | * @var array Jobs collected from providers. |
||
20 | */ |
||
21 | protected $jobs = []; |
||
22 | |||
23 | /** |
||
24 | * @var Recruiter recruiter model |
||
25 | */ |
||
26 | protected $recruiter; |
||
27 | |||
28 | /** |
||
29 | * @var Search search to conduct |
||
30 | */ |
||
31 | protected $search; |
||
32 | |||
33 | /** |
||
34 | * The maximum number of jobs to return |
||
35 | */ |
||
36 | const MAX_JOBS = 25; |
||
37 | |||
38 | /** |
||
39 | * The maximum number of jobs from each provider |
||
40 | */ |
||
41 | const MAX_JOBS_FROM_PROVIDER = 10; |
||
42 | |||
43 | /** |
||
44 | * The maximum age of a job to be included |
||
45 | */ |
||
46 | const MAX_DAYS_OLD = 2; |
||
47 | |||
48 | /** |
||
49 | * Create a new job instance. |
||
50 | */ |
||
51 | 2 | public function __construct(Search $search) |
|
55 | |||
56 | /** |
||
57 | * Collect and sort jobs from multiple APIs using the JobsMulti client. |
||
58 | * |
||
59 | * @param JobsMulti $jobsClient |
||
60 | * @param RecruiterFilter $recruiterFilter |
||
61 | * |
||
62 | * @return array |
||
63 | */ |
||
64 | 2 | public function handle( |
|
93 | } |
||
94 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.