1 | <?php |
||||||
2 | |||||||
3 | /* |
||||||
4 | * @copyright 2016 Mautic Contributors. All rights reserved |
||||||
5 | * @author Mautic, Inc. |
||||||
6 | * |
||||||
7 | * @link https://mautic.org |
||||||
8 | * |
||||||
9 | * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html |
||||||
10 | */ |
||||||
11 | |||||||
12 | namespace Mautic\ChannelBundle\Controller; |
||||||
13 | |||||||
14 | use Mautic\CoreBundle\Controller\AjaxController as CommonAjaxController; |
||||||
15 | use Mautic\CoreBundle\Controller\AjaxLookupControllerTrait; |
||||||
16 | use Symfony\Component\HttpFoundation\Request; |
||||||
17 | |||||||
18 | class AjaxController extends CommonAjaxController |
||||||
19 | { |
||||||
20 | use AjaxLookupControllerTrait; |
||||||
21 | |||||||
22 | /** |
||||||
23 | * @param $eventId |
||||||
24 | * @param $contactId |
||||||
25 | * |
||||||
26 | * @return LeadEventLog|\Symfony\Component\HttpFoundation\JsonResponse |
||||||
0 ignored issues
–
show
|
|||||||
27 | * |
||||||
28 | * @throws \Exception |
||||||
29 | */ |
||||||
30 | public function cancelQueuedMessageEventAction(Request $request) |
||||||
31 | { |
||||||
32 | $dataArray = ['success' => 0]; |
||||||
33 | $messageQueueId = (int) $request->request->get('channelId'); |
||||||
34 | $queueModel = $this->getModel('channel.queue'); |
||||||
35 | $queuedMessage = $queueModel->getEntity($messageQueueId); |
||||||
36 | if ($queuedMessage) { |
||||||
37 | $queuedMessage->setStatus('cancelled'); |
||||||
38 | $queueModel->saveEntity($queuedMessage); |
||||||
0 ignored issues
–
show
The method
saveEntity() does not exist on Mautic\CoreBundle\Model\AbstractCommonModel . It seems like you code against a sub-type of Mautic\CoreBundle\Model\AbstractCommonModel such as Mautic\CampaignBundle\Model\EventLogModel or Mautic\CoreBundle\Model\FormModel .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
39 | $dataArray = ['success' => 1]; |
||||||
40 | } |
||||||
41 | |||||||
42 | return $this->sendJsonResponse($dataArray); |
||||||
43 | } |
||||||
44 | } |
||||||
45 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths