This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
11
{
12
/**
13
* https://github.com/php/php-src/tree/master/sapi
14
* PHP7以前のものは対応しない
15
* @var SAPIリスト
16
*/
17
private $sapis = [
18
'apache2handler' => 'http',
19
'cgi' => 'http',
20
'cli' => 'console',
21
'fpm' => 'http',
22
'embed' => 'unsupported',
23
'litespeed' => 'unsupported',
24
'phpdbg' => 'unsupported',
25
'tests' => 'unsupported'
26
];
27
28
/**
29
* {@inheritdoc}
30
*/
31
public function write($text)
32
{
33
$sapi = php_sapi_name();
34
if (array_key_exists($sapi, $this->sapis) && $this->sapis[$sapi] === 'console') {
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.