Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
PassCommand
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 run
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2namespace Apie\FtpServer\Commands;
3
4use Apie\Core\Context\ApieContext;
5use Apie\FtpServer\FtpConstants;
6use React\Socket\ConnectionInterface;
7
8class PassCommand implements CommandInterface
9{
10    public function run(ApieContext $apieContext, string $arg = ''): ApieContext
11    {
12        $conn = $apieContext->getContext(ConnectionInterface::class);
13        $conn->write("230 User logged in\r\n");
14        return $apieContext
15            ->withContext(FtpConstants::PASSWORD, $arg);
16    }
17}