Conditions | 1 |
Paths | 1 |
Total Lines | 50 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function publish($message) |
||
23 | { |
||
24 | $connection = new Connection(); |
||
25 | $channel = $connection->channel(); |
||
26 | |||
27 | $channel->queue_declare( |
||
28 | $this->queue->getName(), |
||
29 | $this->queue->isPassive(), |
||
30 | $this->queue->isDurable(), |
||
31 | $this->queue->isExclusive(), |
||
32 | $this->queue->isAutoDelete() |
||
33 | ); |
||
34 | |||
35 | $message = new AMQPMessage(json_encode(['product_id'=>1,'product_name'=>'deneme'], JSON_UNESCAPED_SLASHES), array('delivery_mode' => 2)); |
||
36 | $channel->basic_publish($message, '', $this->queue->getName()); |
||
37 | |||
38 | // $channel->queue_declare( |
||
39 | // $queue = RABBITMQ_QUEUE_NAME, |
||
40 | // $passive = false, |
||
41 | // $durable = true, |
||
42 | // $exclusive = false, |
||
43 | // $auto_delete = false, |
||
44 | // $nowait = false, |
||
45 | // $arguments = null, |
||
46 | // $ticket = null |
||
47 | // ); |
||
48 | // |
||
49 | // $job_id=0; |
||
50 | // while (true) |
||
51 | // { |
||
52 | // $jobArray = array( |
||
53 | // 'id' => $job_id++, |
||
54 | // 'task' => 'sleep', |
||
55 | // 'sleep_period' => rand(0, 3) |
||
56 | // ); |
||
57 | // |
||
58 | // $msg = new AMQPMessage( |
||
59 | // json_encode($jobArray, JSON_UNESCAPED_SLASHES), |
||
60 | // array('delivery_mode' => 2) # make message persistent |
||
61 | // ); |
||
62 | // |
||
63 | // $channel->basic_publish($msg, '', $this->queue->getName()); |
||
64 | // print 'Job created' . PHP_EOL; |
||
65 | // sleep(1); |
||
66 | // } |
||
67 | |||
68 | |||
69 | |||
70 | $channel->close(); |
||
71 | $connection->close(); |
||
72 | } |
||
74 |
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