TimeoutException::output()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Acacha\ForgePublish\Exceptions;
4
5
use Exception;
6
7
/**
8
 * Class TimeoutException
9
 * @package Acacha\ForgePublish\Exceptions
10
 */
11
class TimeoutException extends Exception
12
{
13
    /**
14
     * The output returned from the operation.
15
     *
16
     * @var array
17
     */
18
    public $output;
19
20
    /**
21
     * Create a new exception instance.
22
     *
23
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
24
     */
25
    public function __construct($output)
26
    {
27
        parent::__construct('Script timed out while waiting for the process to complete.');
28
29
        $this->output = $output;
30
    }
31
32
    /**
33
     * The output returned from the operation.
34
     *
35
     * @return array
36
     */
37
    public function output()
38
    {
39
        return $this->output;
40
    }
41
}
42