PrintCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 6 1
A execute() 0 7 1
1
<?php
2
3
namespace wapmorgan\UnifiedArchive\Commands;
4
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
use wapmorgan\UnifiedArchive\UnifiedArchive;
8
9
class PrintCommand extends BaseFileCommand
10
{
11
    protected static $defaultName = 'file:print';
12
13
    protected function configure()
14
    {
15
        parent::configure();
16
        $this
17
            ->setDescription('Renders RAW archive file content')
18
            ->setHelp('Renders RAW archive file content.')
19
        ;
20
    }
21
22
    public function execute(InputInterface $input, OutputInterface $output)
23
    {
24
        /** @var $archive UnifiedArchive */
25
        list($archive, $file) = $this->getArchiveAndFile($input, $output);
26
        fpassthru($archive->getFileStream($file));
27
28
        return 0;
29
    }
30
}
31