Code Duplication    Length = 7-7 lines in 2 locations

src/RequestExecutor/Pipeline/AbstractTimeAwareStage.php 2 locations

@@ 40-46 (lines=7) @@
37
     *
38
     * @return double
39
     */
40
    protected function timeoutSetting(RequestDescriptor $operation)
41
    {
42
        $meta = $operation->getMetadata();
43
        return !$this->hasConnected($operation) ?
44
            $meta[ RequestExecutorInterface::META_CONNECTION_TIMEOUT ] :
45
            $meta[ RequestExecutorInterface::META_IO_TIMEOUT ];
46
    }
47
48
    /**
49
     * Return time since last I/O for current socket state
@@ 55-61 (lines=7) @@
52
     *
53
     * @return double|null
54
     */
55
    protected function timeSinceLastIo(RequestDescriptor $operation)
56
    {
57
        $meta = $operation->getMetadata();
58
        return !$this->hasConnected($operation) ?
59
            $meta[ RequestExecutorInterface::META_CONNECTION_START_TIME ] :
60
            $meta[ RequestExecutorInterface::META_LAST_IO_START_TIME ];
61
    }
62
63
    /**
64
     * Set start or finish time in metadata of the socket