Skip to content

Commit 8159cd9

Browse files
committed
cs fix
1 parent 4028ea4 commit 8159cd9

File tree

2 files changed

+96
-95
lines changed

2 files changed

+96
-95
lines changed

src/Source/CommitDiffSource.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Butschster\ContextGenerator\Source;
66

77
use Butschster\ContextGenerator\Fetcher\FilterableSourceInterface;
8+
use Butschster\ContextGenerator\Modifier\Modifier;
89

910
/**
1011
* Source for git commit diffs with simplified commit range support
@@ -21,7 +22,7 @@ class CommitDiffSource extends BaseSource implements FilterableSourceInterface,
2122
* @param string|array<string> $contains Patterns to include files containing specific content
2223
* @param string|array<string> $notContains Patterns to exclude files containing specific content
2324
* @param bool $showStats Whether to show commit stats in output
24-
* @param array<string> $modifiers Identifiers for content modifiers to apply
25+
* @param array<Modifier> $modifiers Identifiers for content modifiers to apply
2526
*/
2627
public function __construct(
2728
public readonly string $repository = '.',

tests/src/Modifier/PhpContentFilterTest.php

Lines changed: 94 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -9,100 +9,100 @@
99

1010
class PhpContentFilterTest extends TestCase
1111
{
12-
private const SAMPLE_CLASS = <<<'PHP'
13-
<?php
14-
namespace App\Example;
15-
16-
use App\SomeClass;
17-
use App\OtherClass;
18-
19-
/**
20-
* Sample class for testing the PHP content filter
21-
*/
22-
#[SomeAttribute]
23-
class SampleClass
24-
{
25-
public const PUBLIC_CONST = 'public';
26-
protected const PROTECTED_CONST = 'protected';
27-
private const PRIVATE_CONST = 'private';
28-
29-
/**
30-
* @var string
31-
*/
32-
#[Property]
33-
public string $publicProperty = 'public';
34-
35-
/**
36-
* @var string
37-
*/
38-
protected string $protectedProperty = 'protected';
39-
40-
/**
41-
* @var string
42-
*/
43-
private string $privateProperty = 'private';
44-
45-
/**
46-
* Constructor
47-
*/
48-
public function __construct(
49-
public readonly string $name,
50-
protected readonly int $age,
51-
private readonly bool $active,
52-
) {
53-
// Constructor implementation
54-
}
55-
56-
/**
57-
* Public method
58-
*/
59-
#[Route('/')]
60-
public function publicMethod(string $param): string
61-
{
62-
return "Public method with param: {$param}";
63-
}
64-
65-
/**
66-
* Protected method
67-
*/
68-
protected function protectedMethod(): void
69-
{
70-
// Protected method implementation
71-
}
72-
73-
/**
74-
* Private method
75-
*/
76-
private function privateMethod(): bool
77-
{
78-
return true;
79-
}
80-
81-
/**
82-
* Getter method
83-
*/
84-
public function getName(): string
85-
{
86-
return $this->name;
87-
}
88-
89-
/**
90-
* Getter method
91-
*/
92-
public function getAge(): int
93-
{
94-
return $this->age;
95-
}
96-
97-
/**
98-
* Getter method
99-
*/
100-
public function isActive(): bool
101-
{
102-
return $this->active;
103-
}
104-
}
105-
PHP;
12+
private const SAMPLE_CLASS = <<<'PHP_WRAP'
13+
<?php
14+
namespace App\Example;
15+
16+
use App\SomeClass;
17+
use App\OtherClass;
18+
19+
/**
20+
* Sample class for testing the PHP content filter
21+
*/
22+
#[SomeAttribute]
23+
class SampleClass
24+
{
25+
public const PUBLIC_CONST = 'public';
26+
protected const PROTECTED_CONST = 'protected';
27+
private const PRIVATE_CONST = 'private';
28+
29+
/**
30+
* @var string
31+
*/
32+
#[Property]
33+
public string $publicProperty = 'public';
34+
35+
/**
36+
* @var string
37+
*/
38+
protected string $protectedProperty = 'protected';
39+
40+
/**
41+
* @var string
42+
*/
43+
private string $privateProperty = 'private';
44+
45+
/**
46+
* Constructor
47+
*/
48+
public function __construct(
49+
public readonly string $name,
50+
protected readonly int $age,
51+
private readonly bool $active,
52+
) {
53+
// Constructor implementation
54+
}
55+
56+
/**
57+
* Public method
58+
*/
59+
#[Route('/')]
60+
public function publicMethod(string $param): string
61+
{
62+
return "Public method with param: {$param}";
63+
}
64+
65+
/**
66+
* Protected method
67+
*/
68+
protected function protectedMethod(): void
69+
{
70+
// Protected method implementation
71+
}
72+
73+
/**
74+
* Private method
75+
*/
76+
private function privateMethod(): bool
77+
{
78+
return true;
79+
}
80+
81+
/**
82+
* Getter method
83+
*/
84+
public function getName(): string
85+
{
86+
return $this->name;
87+
}
88+
89+
/**
90+
* Getter method
91+
*/
92+
public function getAge(): int
93+
{
94+
return $this->age;
95+
}
96+
97+
/**
98+
* Getter method
99+
*/
100+
public function isActive(): bool
101+
{
102+
return $this->active;
103+
}
104+
}
105+
PHP_WRAP;
106106

107107
public function testKeepOnlyPublicMethods(): void
108108
{

0 commit comments

Comments
 (0)