| Conditions | 9 |
| Paths | 9 |
| Total Lines | 28 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | protected function parseEntryData($id, $entry) { |
||
| 40 | foreach ($entry as $field => $value) { |
||
| 41 | if (is_string($value) && preg_match('/.*\.(md|jpg|png|json|yml)$/', $value) > 0) { |
||
| 42 | $parser = $this->parserFactory->getParser($value); |
||
|
|
|||
| 43 | |||
| 44 | if (!$parser) { |
||
| 45 | continue; |
||
| 46 | } |
||
| 47 | |||
| 48 | $entry[$field] = $parser->parse(trim($value, '/')); |
||
| 49 | } elseif (is_array($value) && array_key_exists('src', $value)) { |
||
| 50 | $src = $value['src']; |
||
| 51 | $parser = $this->parserFactory->getParser($src); |
||
| 52 | |||
| 53 | if (!$parser) { |
||
| 54 | continue; |
||
| 55 | } |
||
| 56 | |||
| 57 | $entry[$field] = $parser->parse($value); |
||
| 58 | } |
||
| 59 | |||
| 60 | if (!isset($entry['id'])) { |
||
| 61 | $entry['id'] = $id; |
||
| 62 | } |
||
| 63 | } |
||
| 64 | |||
| 65 | return $entry; |
||
| 66 | } |
||
| 67 | |||
| 69 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.