1 | <?php |
||
11 | class Module extends \yii\base\Module |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var bool Whether the container should attempt to run migrations on launch. |
||
16 | */ |
||
17 | public $runMigrations = false; |
||
18 | |||
19 | /** |
||
20 | * The variables will be populated via the pool config. |
||
21 | * @var string[] List of required environment variables. If one is missing the container will exit. |
||
22 | * |
||
23 | */ |
||
24 | public $environmentVariables = []; |
||
25 | |||
26 | /** |
||
27 | * @var array Pool directives |
||
28 | * @see http://php.net/manual/en/install.fpm.configuration.php |
||
29 | * |
||
30 | */ |
||
31 | public $poolConfig = [ |
||
32 | 'user' => 'nobody', |
||
33 | 'group' => 'nobody', |
||
34 | 'listen' => 9000, |
||
35 | 'pm' => 'dynamic', |
||
36 | 'pm.max_children' => 40, |
||
37 | 'pm.start_servers' => 3, |
||
38 | 'pm.min_spare_servers' => 1, |
||
39 | 'pm.max_spare_servers' => 3, |
||
40 | 'access.log' => '/proc/self/fd/2', |
||
41 | 'clear_env' => 'yes', |
||
42 | |||
43 | ]; |
||
44 | |||
45 | /** |
||
46 | * @var array PHP configuration, supplied via php_admin_value in fpm config. |
||
47 | */ |
||
48 | public $phpConfig = [ |
||
49 | 'upload_max_filesize' => '20M', |
||
50 | 'post_max_size' => '25M' |
||
51 | ]; |
||
52 | |||
53 | /** |
||
54 | * @var array Global directives |
||
55 | * @see http://php.net/manual/en/install.fpm.configuration.php |
||
56 | * |
||
57 | */ |
||
58 | public $fpmConfig = [ |
||
59 | 'error_log' => '/proc/self/fd/2', |
||
60 | 'daemonize' => 'no', |
||
61 | ]; |
||
62 | |||
63 | public $extensions = [ |
||
64 | 'ctype', |
||
65 | 'gd', |
||
66 | 'iconv', |
||
67 | 'intl', |
||
68 | 'json', |
||
69 | 'mbstring', |
||
70 | 'session', |
||
71 | 'pdo_mysql', |
||
72 | 'session', |
||
73 | 'curl' |
||
74 | ]; |
||
75 | |||
76 | /** |
||
77 | * @var Name and optionally tag of the image. |
||
78 | * |
||
79 | */ |
||
80 | public $image; |
||
81 | |||
82 | /** |
||
83 | * @var string Location of composer.json / composer.lock |
||
84 | */ |
||
85 | public $composerFilePath = '@app/../'; |
||
86 | /** |
||
87 | * @return string A PHP-FPM config file. |
||
88 | */ |
||
89 | 1 | protected function createFpmConfig() |
|
119 | |||
120 | /** |
||
121 | * @return string A shell script that checks for existence of (non-empty) variables and runs php-fpm. |
||
122 | */ |
||
123 | 1 | protected function createEntrypoint(): string |
|
159 | |||
160 | 1 | public function createBuildContext(): Context |
|
210 | } |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.