ExistCommandHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php
2
3
namespace diecoding\aws\s3\handlers;
4
5
use diecoding\aws\s3\base\handlers\Handler;
6
use diecoding\aws\s3\commands\ExistCommand;
7
8
/**
9
 * Class ExistCommandHandler
10
 *
11
 * @package diecoding\aws\s3\handlers
12
 */
13
final class ExistCommandHandler extends Handler
14
{
15
    /**
16
     * @param \diecoding\aws\s3\commands\ExistCommand $command
17
     *
18
     * @return bool
19
     */
20
    public function handle(ExistCommand $command): bool
21
    {
22
        return $this->s3Client->doesObjectExist(
23
            $command->getBucket(),
24
            $command->getFilename(),
25
            $command->getOptions()
26
        );
27
    }
28
}
29