Skip to content

Commit b533f9e

Browse files
committed
Update code issue parameter wording to 'attachment' (i.e., we allow anything here)
1 parent 9a87a00 commit b533f9e

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $git = new Git('/path/to/some/repo-directory');
2121
$lineFilterFactory = new LineFilterFactory($git);
2222
$lineFilter = $lineFilterFactory->makeLineFilter();
2323
24-
// Pass in ci-issues to be filtered
24+
// Pass in ci-issues to be filtered (third parameter 'attachment' can be anything you like)
2525
$issues = [
2626
CodeIssue::make('devops/git/post-merge', 123, 'abc123'),
2727
CodeIssue::make('static/maintenance.html', 456, 'abc456')

src/CodeIssue.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class CodeIssue
88
private $file;
99
/** @var int */
1010
private $line;
11-
/** @var string */
12-
private $uniqueReference;
11+
/** @var mixed */
12+
private $attachment;
1313

1414
/**
1515
* @param RelativeFile $file
@@ -26,17 +26,17 @@ public function __construct(RelativeFile $file, $line)
2626
*
2727
* @param string $file
2828
* @param int $line
29-
* @param null $uniqueRef
29+
* @param mixed|null $attachment
3030
* @return static
3131
*/
32-
public static function make($file, $line, $uniqueRef = null)
32+
public static function make($file, $line, $attachment = null)
3333
{
3434
$instance = new static(
3535
new RelativeFile($file),
3636
$line
3737
);
38-
if ($uniqueRef) {
39-
$instance->setUniqueReference($uniqueRef);
38+
if ($attachment) {
39+
$instance->setAttachment($attachment);
4040
}
4141

4242
return $instance;
@@ -45,17 +45,17 @@ public static function make($file, $line, $uniqueRef = null)
4545
/**
4646
* @return string
4747
*/
48-
public function getUniqueReference()
48+
public function getAttachment()
4949
{
50-
return $this->uniqueReference;
50+
return $this->attachment;
5151
}
5252

5353
/**
54-
* @param string $uniqueReference
54+
* @param string $attachment
5555
*/
56-
public function setUniqueReference($uniqueReference)
56+
public function setAttachment($attachment)
5757
{
58-
$this->uniqueReference = $uniqueReference;
58+
$this->attachment = $attachment;
5959
}
6060

6161
/**

0 commit comments

Comments
 (0)