| Conditions | 2 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php namespace JobApis\JobsToMail\Filters; |
||
| 15 | 2 | public function getJobsFromCollections($collectionsArray = [], $max = 50) |
|
| 16 | { |
||
| 17 | 2 | $jobs = []; |
|
| 18 | 2 | array_walk_recursive( |
|
| 19 | $collectionsArray, |
||
| 20 | 2 | function (Collection $collection) use (&$jobs, $max) { |
|
| 21 | 2 | $this->logErrorsFromCollection($collection); |
|
| 22 | 2 | $jobListings = array_slice($collection->all(), 0, $max); |
|
| 23 | 2 | foreach ($jobListings as $jobListing) { |
|
| 24 | 2 | $jobs[] = $jobListing; |
|
| 25 | } |
||
| 26 | 2 | } |
|
| 27 | ); |
||
| 28 | 2 | return $jobs; |
|
| 29 | } |
||
| 30 | |||
| 47 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.