Conditions | 4 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
34 | public static function createFromGlobals(): PluginInterface |
||
35 | { |
||
36 | $host = getenv('BEANSTALKD_HOST') ?: 'localhost'; |
||
37 | $port = (int)(getenv('BEANSTALKD_PORT') ?: 11300); |
||
38 | $timeout = (int)(getenv('BEANSTALKD_TIMEOUT') ?: 10); |
||
39 | $server = new Pheanstalk( |
||
40 | new Connection(new SocketFactory($host, $port, $timeout)) |
||
41 | ); |
||
42 | return new static($server); |
||
43 | } |
||
54 |