Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
PwdCommand
0.00% covered (danger)
0.00%
0 / 3
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 / 3
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 PwdCommand implements CommandInterface
9{
10    public function run(ApieContext $apieContext, string $arg = ''): ApieContext
11    {
12        $conn = $apieContext->getContext(ConnectionInterface::class);
13        $conn->write('257 "' . $apieContext->getContext(FtpConstants::CURRENT_PWD) . '" is current directory' . "\r\n");
14        return $apieContext;
15    }
16}