Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / Output / Statistics / StepStat.php
1 <?php
2
3 /*
4  * This file is part of the Behat.
5  * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 namespace Behat\Behat\Output\Statistics;
12
13 /**
14  * Behat step stat.
15  *
16  * @author Konstantin Kudryashov <ever.zet@gmail.com>
17  *
18  * @deprecated in favour of StepStatV2 and to be removed in 4.0
19  */
20 class StepStat
21 {
22     /**
23      * @var string
24      */
25     private $text;
26     /**
27      * @var string
28      */
29     private $path;
30     /**
31      * @var integer
32      */
33     private $resultCode;
34     /**
35      * @var null|string
36      */
37     private $error;
38     /**
39      * @var null|string
40      */
41     private $stdOut;
42
43     /**
44      * Initializes step stat.
45      *
46      * @param string      $text
47      * @param string      $path
48      * @param integer     $resultCode
49      * @param null|string $error
50      * @param null|string $stdOut
51      */
52     public function __construct($text, $path, $resultCode, $error = null, $stdOut = null)
53     {
54         $this->text = $text;
55         $this->path = $path;
56         $this->resultCode = $resultCode;
57         $this->error = $error;
58         $this->stdOut = $stdOut;
59     }
60
61     /**
62      * Returns step text.
63      *
64      * @return string
65      */
66     public function getText()
67     {
68         return $this->text;
69     }
70
71     /**
72      * Returns step path.
73      *
74      * @return string
75      */
76     public function getPath()
77     {
78         return $this->path;
79     }
80
81     /**
82      * Returns step result code.
83      *
84      * @return integer
85      */
86     public function getResultCode()
87     {
88         return $this->resultCode;
89     }
90
91     /**
92      * Returns step error (if has one).
93      *
94      * @return null|string
95      */
96     public function getError()
97     {
98         return $this->error;
99     }
100
101     /**
102      * Returns step output (if has one).
103      *
104      * @return null|string
105      */
106     public function getStdOut()
107     {
108         return $this->stdOut;
109     }
110
111     /**
112      * Returns string representation for a stat.
113      *
114      * @return string
115      */
116     public function __toString()
117     {
118         return $this->getPath();
119     }
120 }