1 | <?php declare(strict_types=1); |
||
20 | class CloudReporter |
||
21 | { |
||
22 | /** @var PullRequests */ |
||
23 | protected $pullRequests; |
||
24 | |||
25 | /** @var Changesets */ |
||
26 | protected $changeSets; |
||
27 | |||
28 | /** @var string BitBucket account name */ |
||
29 | protected $accountName; |
||
30 | |||
31 | /** @var string BitBucket repository name */ |
||
32 | protected $repoName; |
||
33 | |||
34 | /** @var int BitBucket pull request id */ |
||
35 | protected $pullRequestId; |
||
36 | |||
37 | /** @var ConsoleLogger */ |
||
38 | protected $logger; |
||
39 | |||
40 | /** @var string Pull request author */ |
||
41 | protected $author; |
||
42 | |||
43 | /** @var ReporterInterface[] */ |
||
44 | protected $reporters = []; |
||
45 | |||
46 | public function __construct( |
||
66 | |||
67 | /** |
||
68 | * Add reporter. |
||
69 | * |
||
70 | * @param ReporterInterface $reporter Reporter instance |
||
71 | */ |
||
72 | public function addReporter(ReporterInterface $reporter) |
||
76 | |||
77 | /** |
||
78 | * Report violations to BitBucket pull request. |
||
79 | */ |
||
80 | public function report() |
||
86 | |||
87 | /** |
||
88 | * Get pull request author username. |
||
89 | * |
||
90 | * @return string Pull request author username |
||
91 | */ |
||
92 | public function getPullRequestAuthor() |
||
109 | |||
110 | /** |
||
111 | * Collection of changed files in pull request. |
||
112 | * |
||
113 | * @return string[] Collection of changed files |
||
114 | */ |
||
115 | public function getChangedFiles() |
||
139 | |||
140 | /** |
||
141 | * Create general pull request comment. |
||
142 | * |
||
143 | * @param string $content The comment content |
||
144 | * |
||
145 | * @return MessageInterface |
||
146 | */ |
||
147 | public function createGeneralComment(string $content) |
||
151 | |||
152 | /** |
||
153 | * Add a new comment to pull request. |
||
154 | * |
||
155 | * @param string $content The comment content |
||
156 | * @param null|string $filename File name |
||
157 | * @param int|null $lineFrom Source code line number |
||
158 | * |
||
159 | * @return MessageInterface |
||
160 | */ |
||
161 | public function createFileComment(string $content, string $filename = null, int $lineFrom = null) : MessageInterface |
||
171 | |||
172 | /** |
||
173 | * Low level post request for creating pull request comment. |
||
174 | * |
||
175 | * @param array $commentData Comment data |
||
176 | * |
||
177 | * @return MessageInterface |
||
178 | */ |
||
179 | protected function postComment(array $commentData) |
||
192 | } |
||
193 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.