Skip to content

Commit 2a5ac8c

Browse files
author
James Inman
committed
PHPCS/DocBlock fixes to Technical Debt plugin.
1 parent 8f5d855 commit 2a5ac8c

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

PHPCI/Plugin/TechnicalDebt.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ class TechnicalDebt implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin
6363
*/
6464
protected $searches;
6565

66+
67+
/**
68+
* Check if this plugin can be executed.
69+
*
70+
* @param $stage
71+
* @param Builder $builder
72+
* @param Build $build
73+
* @return bool
74+
*/
6675
public static function canExecute($stage, Builder $builder, Build $build)
6776
{
6877
if ($stage == 'test') {
@@ -99,6 +108,10 @@ public function __construct(Builder $phpci, Build $build, array $options = array
99108
}
100109
}
101110

111+
/**
112+
* Handle this plugin's options.
113+
* @param $options
114+
*/
102115
protected function setOptions($options)
103116
{
104117
foreach (array('directory', 'path', 'ignore', 'allowed_warnings', 'allowed_errors') as $key) {
@@ -123,7 +136,7 @@ public function execute()
123136
$files = [];
124137

125138
foreach ($iterator as $file) {
126-
$filePath = $file->getRealPath();
139+
$filePath = $file->getRealPath();
127140
$skipFile = false;
128141
foreach ($ignores as $ignore) {
129142
if (stripos($filePath, $ignore) !== false) {
@@ -168,7 +181,7 @@ public function execute()
168181
}
169182
}
170183

171-
$this->phpci->log("Found $errorCount instances of " . implode(', ', $this->searches));
184+
$this->phpci->log("Found $errorCount instances of " . implode(', ', $this->searches));
172185

173186
$this->build->storeMeta('technical_debt-warnings', $errorCount);
174187
$this->build->storeMeta('technical_debt-data', $data);
@@ -180,4 +193,3 @@ public function execute()
180193
return $success;
181194
}
182195
}
183-

0 commit comments

Comments
 (0)