This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
61 lines (59 loc) · 2.21 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
* IDE-Helper code documentation options.
*
* @see IdeHelperConfig
*/
use Spiral\IdeHelper\Locators;
use Spiral\IdeHelper\Renderer;
use Spiral\IdeHelper\Writers;
return [
// locators are responsible for searching classes and their members
'locators' => [
'containers' => bind(Locators\ContainersLocator::class, [
'targets' => [
\Interop\Container\ContainerInterface::class . '::get',
'spiral',
],
]),
'bindings' => Locators\BindingsLocator::class,
'requests' => Locators\RequestsLocator::class,
/* 'documents' => Locators\DocumentsLocator::class, */
'records' => Locators\RecordsLocator::class,
],
// writers are responsible for storing data collected by locators
'writers' => [
'phpProperty' => bind(Writers\FilePerClassWriter::class, [
'outputDirectory' => directory('application') . 'resources/ide-helper/',
'renderer' => bind(Renderer\ReactorBasedPropertyRenderer::class),
]),
'phpDoc' => bind(Writers\FilePerClassWriter::class, [
'outputDirectory' => directory('application') . 'resources/ide-helper/',
'renderer' => bind(Renderer\ReactorBasedDocRenderer::class),
]),
'meta' => bind(Writers\SingleFileWriter::class, [
'outputFile' => directory('root') . '.phpstorm.meta.php/virtual.meta.php',
'renderer' => bind(Renderer\PhpstormMetaRenderer::class),
]),
],
// each scope is a combination of locators and writers, first each locator is executed to
// collect data, then each writer is executed with all collected data
'scopes' => [
'container' => [
'locators' => ['bindings'],
'writers' => ['phpProperty'],
],
'entity' => [
'locators' => [
'requests',
/* 'documents', */
'records'
],
'writers' => ['phpDoc'],
],
'meta' => [
'locators' => ['containers'],
'writers' => ['meta'],
],
],
];