Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | public function formatBatch(array $records) |
||
40 | { |
||
41 | $bulk = ['body' => []]; |
||
42 | |||
43 | foreach ($records as $record) { |
||
44 | $bulk['body'][] = [ |
||
45 | 'index' => [ |
||
46 | '_index' => $this->index, |
||
47 | '_type' => $this->type, |
||
48 | ] |
||
49 | ]; |
||
50 | |||
51 | $bulk['body'][] = parent::format($record); |
||
|
|||
52 | } |
||
53 | |||
54 | return $bulk; |
||
55 | } |
||
56 | } |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.