1 | <?php |
||
15 | trait SnsContextTrait |
||
16 | { |
||
17 | /** @var SnsClient */ |
||
18 | private $snsClient; |
||
19 | |||
20 | /** @var string */ |
||
21 | private $topicArn; |
||
22 | |||
23 | /** |
||
24 | * @return S3Client |
||
25 | */ |
||
26 | abstract public function getS3Client(); |
||
27 | |||
28 | /** |
||
29 | * @return string |
||
30 | */ |
||
31 | abstract public function getBucketName(); |
||
32 | |||
33 | /** |
||
34 | * @return mixed[] |
||
35 | */ |
||
36 | abstract public function getAwsServiceConfig(); |
||
37 | |||
38 | /** |
||
39 | * @return ClaimCheckFactory |
||
40 | */ |
||
41 | abstract public function createClaimCheckFactory(); |
||
42 | |||
43 | /** |
||
44 | * @param string $name |
||
45 | * @return string |
||
46 | */ |
||
47 | abstract public function getQueueUrl($name); |
||
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | abstract public function getMessage(); |
||
53 | |||
54 | /** |
||
55 | * @return SqsClient |
||
56 | */ |
||
57 | abstract public function getSqsClient(); |
||
58 | |||
59 | /** |
||
60 | * @return SqsExtendedClientConfiguration |
||
61 | * @throws ExceptionInterface |
||
62 | */ |
||
63 | abstract public function getSqsExtendedClientConfiguration(); |
||
64 | |||
65 | /** |
||
66 | * @return SnsClient |
||
67 | * @throws \InvalidArgumentException |
||
68 | * @throws ExceptionInterface |
||
69 | */ |
||
70 | public function getSnsClient() |
||
80 | |||
81 | /** |
||
82 | * @return SnsExtendedClientConfiguration |
||
83 | * @throws ExceptionInterface |
||
84 | */ |
||
85 | private function createSnsExtendedClientConfiguration() |
||
93 | |||
94 | /** |
||
95 | * @Given /^a topic named "([^"]*)"$/ |
||
96 | * @param string $name |
||
97 | * @return string |
||
98 | * @throws ExceptionInterface |
||
99 | * @throws \InvalidArgumentException |
||
100 | */ |
||
101 | public function getTopicFixture($name) |
||
107 | |||
108 | /** |
||
109 | * @param string $name |
||
110 | * @return string |
||
111 | * @throws ExceptionInterface |
||
112 | * @throws \InvalidArgumentException |
||
113 | */ |
||
114 | public function createTopicFixture($name) |
||
122 | |||
123 | /** |
||
124 | * @Given /^a queue named "([^"]*)" is subscribed to a topic named "([^"]*)"$/ |
||
125 | * @param string $queueName |
||
126 | * @param string $topicName |
||
127 | * @throws ExceptionInterface |
||
128 | * @throws \InvalidArgumentException |
||
129 | * @throws \Zend\Json\Exception\RuntimeException |
||
130 | */ |
||
131 | public function aQueueNamedIsSubscribedToATopicNamed($queueName, $topicName) |
||
146 | |||
147 | /** |
||
148 | * @When /^I send the message to a topic named "([^"]*)"$/ |
||
149 | * @param string $name |
||
150 | * @return Result |
||
151 | * @throws ExceptionInterface |
||
152 | * @throws \InvalidArgumentException |
||
153 | */ |
||
154 | public function iSendTheMessageToATopicNamed($name) |
||
171 | |||
172 | } |
||
173 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.