Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit f5efb42

Browse files
author
Brian Faust
committed
docs: graham-campbell/analyzer usage
1 parent f1e6ad3 commit f5efb42

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,35 @@
1212
2. Publish all configurations with `php artisan vendor:publish --provider="ARKEcosystem\Stan\StanServiceProvider" --tag=config`.
1313
3. Publish all workflows with `php artisan vendor:publish --provider="ARKEcosystem\Stan\StanServiceProvider" --tag=workflows`.
1414
4. Start tweaking the configurations as needed for your project.
15+
16+
## File Analysis
17+
18+
When working on larger projects it can happen that you move files on a regular basis and forget to update a reference. We use [graham-campbell/analyzer](https://github.com/GrahamCampbell/Analyzer) to avoid this. Create the file `tests/Analysis/AnalysisTest.php` and the test suite will fail if any references don't match a file.
19+
20+
```php
21+
<?php
22+
23+
declare(strict_types=1);
24+
25+
namespace Tests\Analysis;
26+
27+
use GrahamCampbell\Analyzer\AnalysisTrait;
28+
use PHPUnit\Framework\TestCase;
29+
30+
final class AnalysisTest extends TestCase
31+
{
32+
use AnalysisTrait;
33+
34+
public function getPaths(): array
35+
{
36+
return [
37+
__DIR__.'/../../app',
38+
];
39+
}
40+
41+
public function getIgnored(): array
42+
{
43+
return ['Laravel\Scout\Builder'];
44+
}
45+
}
46+
```

0 commit comments

Comments
 (0)