Conditions | 5 |
Paths | 5 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function exists($params) |
||
30 | { |
||
31 | if(empty($params)) { |
||
32 | return false; |
||
33 | } |
||
34 | |||
35 | $query = 'SELECT Id, OwnerId FROM ' . $this->getType() . ' WHERE RecordTypeId = \'' . config('laravel-salesforce.record_type.account') . '\''; |
||
36 | |||
37 | foreach($params as $fieldName => $fieldValue) { |
||
38 | $query .= ' AND ' . $fieldName . '=\'' . addslashes(trim($fieldValue)) . '\''; |
||
39 | } |
||
40 | |||
41 | $response = $this->query($query); |
||
42 | |||
43 | if ($response && $response->totalSize > 0) { |
||
44 | return array_shift($response->records); |
||
45 | } |
||
46 | |||
47 | return false; |
||
48 | } |
||
49 | } |
||
50 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.