Completed
Push — master ( e67b12...6841f1 )
by Ilias
05:15
created

src/Command/ResponseParser/JobResponseParser.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
4
namespace Beanie\Command\ResponseParser;
5
6
7
use Beanie\Server\Server;
8
9
class JobResponseParser extends AbstractDataResponseParser
10
{
11
    /**
12
     * @inheritDoc
13
     */
14 1
    protected function extractData($responseLine, Server $server)
15
    {
16 1
        list(, $id, $dataLength) = explode(' ', $responseLine);
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $id. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
17
18
        return [
19 1
            'id' => $id,
20 1
            'data' => $server->readData($dataLength)
21 1
        ];
22
    }
23
}
24