| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function execute(ConsumerEvent $event, $directory) |
||
| 38 | { |
||
| 39 | $this->triggerNewStep($event, ['message' => 'Checking vulnerability']); |
||
| 40 | |||
| 41 | try { |
||
| 42 | $alerts = $this->securityChecker->check($this->workingTempPath.'/'.$directory.'/composer.lock'); |
||
| 43 | } catch (\RuntimeException $e) { |
||
| 44 | $this->triggerError($event, ['message' => $e->getMessage()]); |
||
| 45 | |||
| 46 | return 1; |
||
| 47 | } |
||
| 48 | |||
| 49 | $vulnerabilityCount = $this->securityChecker->getLastVulnerabilityCount(); |
||
|
|
|||
| 50 | if ($vulnerabilityCount > 0) { |
||
| 51 | $this->triggerStepError($event, ['message' => 'Vulnerability found : '.$vulnerabilityCount]); |
||
| 52 | $this->triggerVulnerabilities($event, ['message' => json_encode($alerts)]); |
||
| 53 | } |
||
| 54 | |||
| 55 | return 0; |
||
| 56 | } |
||
| 57 | } |
||
| 58 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.