4 * This file is part of the Prophecy.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6 * Marcello Duarte <marcello.duarte@gmail.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Prophecy\Call;
19 * @author Konstantin Kudryashov <ever.zet@gmail.com>
33 * @param string $methodName
34 * @param array $arguments
35 * @param mixed $returnValue
36 * @param Exception $exception
37 * @param null|string $file
38 * @param null|int $line
40 public function __construct($methodName, array $arguments, $returnValue,
41 Exception $exception = null, $file, $line)
43 $this->methodName = $methodName;
44 $this->arguments = $arguments;
45 $this->returnValue = $returnValue;
46 $this->exception = $exception;
50 $this->line = intval($line);
55 * Returns called method name.
59 public function getMethodName()
61 return $this->methodName;
65 * Returns called method arguments.
69 public function getArguments()
71 return $this->arguments;
75 * Returns called method return value.
79 public function getReturnValue()
81 return $this->returnValue;
85 * Returns exception that call thrown.
87 * @return null|Exception
89 public function getException()
91 return $this->exception;
95 * Returns callee filename.
99 public function getFile()
105 * Returns callee line number.
109 public function getLine()
115 * Returns short notation for callee place.
119 public function getCallPlace()
121 if (null === $this->file) {
125 return sprintf('%s:%d', $this->file, $this->line);