@@ -13,29 +13,29 @@ |
||
13 | 13 | |
14 | 14 | class ReturnByReferenceException extends DoubleException |
15 | 15 | { |
16 | - private $classname; |
|
17 | - private $methodName; |
|
16 | + private $classname; |
|
17 | + private $methodName; |
|
18 | 18 | |
19 | - /** |
|
20 | - * @param string $message |
|
21 | - * @param string $classname |
|
22 | - * @param string $methodName |
|
23 | - */ |
|
24 | - public function __construct($message, $classname, $methodName) |
|
25 | - { |
|
26 | - parent::__construct($message); |
|
19 | + /** |
|
20 | + * @param string $message |
|
21 | + * @param string $classname |
|
22 | + * @param string $methodName |
|
23 | + */ |
|
24 | + public function __construct($message, $classname, $methodName) |
|
25 | + { |
|
26 | + parent::__construct($message); |
|
27 | 27 | |
28 | - $this->classname = $classname; |
|
29 | - $this->methodName = $methodName; |
|
30 | - } |
|
28 | + $this->classname = $classname; |
|
29 | + $this->methodName = $methodName; |
|
30 | + } |
|
31 | 31 | |
32 | - public function getClassname() |
|
33 | - { |
|
34 | - return $this->classname; |
|
35 | - } |
|
32 | + public function getClassname() |
|
33 | + { |
|
34 | + return $this->classname; |
|
35 | + } |
|
36 | 36 | |
37 | - public function getMethodName() |
|
38 | - { |
|
39 | - return $this->methodName; |
|
40 | - } |
|
37 | + public function getMethodName() |
|
38 | + { |
|
39 | + return $this->methodName; |
|
40 | + } |
|
41 | 41 | } |
@@ -13,48 +13,48 @@ |
||
13 | 13 | |
14 | 14 | class MethodNotFoundException extends DoubleException |
15 | 15 | { |
16 | - /** |
|
17 | - * @var string|object |
|
18 | - */ |
|
19 | - private $classname; |
|
20 | - |
|
21 | - /** |
|
22 | - * @var string |
|
23 | - */ |
|
24 | - private $methodName; |
|
25 | - |
|
26 | - /** |
|
27 | - * @var array |
|
28 | - */ |
|
29 | - private $arguments; |
|
30 | - |
|
31 | - /** |
|
32 | - * @param string $message |
|
33 | - * @param string|object $classname |
|
34 | - * @param string $methodName |
|
35 | - * @param null|Argument\ArgumentsWildcard|array $arguments |
|
36 | - */ |
|
37 | - public function __construct($message, $classname, $methodName, $arguments = null) |
|
38 | - { |
|
39 | - parent::__construct($message); |
|
40 | - |
|
41 | - $this->classname = $classname; |
|
42 | - $this->methodName = $methodName; |
|
43 | - $this->arguments = $arguments; |
|
44 | - } |
|
45 | - |
|
46 | - public function getClassname() |
|
47 | - { |
|
48 | - return $this->classname; |
|
49 | - } |
|
50 | - |
|
51 | - public function getMethodName() |
|
52 | - { |
|
53 | - return $this->methodName; |
|
54 | - } |
|
55 | - |
|
56 | - public function getArguments() |
|
57 | - { |
|
58 | - return $this->arguments; |
|
59 | - } |
|
16 | + /** |
|
17 | + * @var string|object |
|
18 | + */ |
|
19 | + private $classname; |
|
20 | + |
|
21 | + /** |
|
22 | + * @var string |
|
23 | + */ |
|
24 | + private $methodName; |
|
25 | + |
|
26 | + /** |
|
27 | + * @var array |
|
28 | + */ |
|
29 | + private $arguments; |
|
30 | + |
|
31 | + /** |
|
32 | + * @param string $message |
|
33 | + * @param string|object $classname |
|
34 | + * @param string $methodName |
|
35 | + * @param null|Argument\ArgumentsWildcard|array $arguments |
|
36 | + */ |
|
37 | + public function __construct($message, $classname, $methodName, $arguments = null) |
|
38 | + { |
|
39 | + parent::__construct($message); |
|
40 | + |
|
41 | + $this->classname = $classname; |
|
42 | + $this->methodName = $methodName; |
|
43 | + $this->arguments = $arguments; |
|
44 | + } |
|
45 | + |
|
46 | + public function getClassname() |
|
47 | + { |
|
48 | + return $this->classname; |
|
49 | + } |
|
50 | + |
|
51 | + public function getMethodName() |
|
52 | + { |
|
53 | + return $this->methodName; |
|
54 | + } |
|
55 | + |
|
56 | + public function getArguments() |
|
57 | + { |
|
58 | + return $this->arguments; |
|
59 | + } |
|
60 | 60 | } |
@@ -1,41 +1,41 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | - namespace Prophecy\Exception\Doubler; |
|
4 | - |
|
5 | - class MethodNotExtendableException extends DoubleException |
|
6 | - { |
|
7 | - private $methodName; |
|
8 | - |
|
9 | - private $className; |
|
10 | - |
|
11 | - /** |
|
12 | - * @param string $message |
|
13 | - * @param string $className |
|
14 | - * @param string $methodName |
|
15 | - */ |
|
16 | - public function __construct($message, $className, $methodName) |
|
17 | - { |
|
18 | - parent::__construct($message); |
|
19 | - |
|
20 | - $this->methodName = $methodName; |
|
21 | - $this->className = $className; |
|
22 | - } |
|
23 | - |
|
24 | - |
|
25 | - /** |
|
26 | - * @return string |
|
27 | - */ |
|
28 | - public function getMethodName() |
|
29 | - { |
|
30 | - return $this->methodName; |
|
31 | - } |
|
32 | - |
|
33 | - /** |
|
34 | - * @return string |
|
35 | - */ |
|
36 | - public function getClassName() |
|
37 | - { |
|
38 | - return $this->className; |
|
39 | - } |
|
40 | - |
|
41 | - } |
|
3 | + namespace Prophecy\Exception\Doubler; |
|
4 | + |
|
5 | + class MethodNotExtendableException extends DoubleException |
|
6 | + { |
|
7 | + private $methodName; |
|
8 | + |
|
9 | + private $className; |
|
10 | + |
|
11 | + /** |
|
12 | + * @param string $message |
|
13 | + * @param string $className |
|
14 | + * @param string $methodName |
|
15 | + */ |
|
16 | + public function __construct($message, $className, $methodName) |
|
17 | + { |
|
18 | + parent::__construct($message); |
|
19 | + |
|
20 | + $this->methodName = $methodName; |
|
21 | + $this->className = $className; |
|
22 | + } |
|
23 | + |
|
24 | + |
|
25 | + /** |
|
26 | + * @return string |
|
27 | + */ |
|
28 | + public function getMethodName() |
|
29 | + { |
|
30 | + return $this->methodName; |
|
31 | + } |
|
32 | + |
|
33 | + /** |
|
34 | + * @return string |
|
35 | + */ |
|
36 | + public function getClassName() |
|
37 | + { |
|
38 | + return $this->className; |
|
39 | + } |
|
40 | + |
|
41 | + } |
@@ -16,17 +16,17 @@ |
||
16 | 16 | |
17 | 17 | class UnexpectedCallsException extends MethodProphecyException implements PredictionException |
18 | 18 | { |
19 | - private $calls = array(); |
|
19 | + private $calls = array(); |
|
20 | 20 | |
21 | - public function __construct($message, MethodProphecy $methodProphecy, array $calls) |
|
22 | - { |
|
23 | - parent::__construct($message, $methodProphecy); |
|
21 | + public function __construct($message, MethodProphecy $methodProphecy, array $calls) |
|
22 | + { |
|
23 | + parent::__construct($message, $methodProphecy); |
|
24 | 24 | |
25 | - $this->calls = $calls; |
|
26 | - } |
|
25 | + $this->calls = $calls; |
|
26 | + } |
|
27 | 27 | |
28 | - public function getCalls() |
|
29 | - { |
|
30 | - return $this->calls; |
|
31 | - } |
|
28 | + public function getCalls() |
|
29 | + { |
|
30 | + return $this->calls; |
|
31 | + } |
|
32 | 32 | } |
@@ -15,17 +15,17 @@ |
||
15 | 15 | |
16 | 16 | class UnexpectedCallsCountException extends UnexpectedCallsException |
17 | 17 | { |
18 | - private $expectedCount; |
|
18 | + private $expectedCount; |
|
19 | 19 | |
20 | - public function __construct($message, MethodProphecy $methodProphecy, $count, array $calls) |
|
21 | - { |
|
22 | - parent::__construct($message, $methodProphecy, $calls); |
|
20 | + public function __construct($message, MethodProphecy $methodProphecy, $count, array $calls) |
|
21 | + { |
|
22 | + parent::__construct($message, $methodProphecy, $calls); |
|
23 | 23 | |
24 | - $this->expectedCount = intval($count); |
|
25 | - } |
|
24 | + $this->expectedCount = intval($count); |
|
25 | + } |
|
26 | 26 | |
27 | - public function getExpectedCount() |
|
28 | - { |
|
29 | - return $this->expectedCount; |
|
30 | - } |
|
27 | + public function getExpectedCount() |
|
28 | + { |
|
29 | + return $this->expectedCount; |
|
30 | + } |
|
31 | 31 | } |
@@ -15,37 +15,37 @@ |
||
15 | 15 | |
16 | 16 | class AggregateException extends \RuntimeException implements PredictionException |
17 | 17 | { |
18 | - private $exceptions = array(); |
|
19 | - private $objectProphecy; |
|
20 | - |
|
21 | - public function append(PredictionException $exception) |
|
22 | - { |
|
23 | - $message = $exception->getMessage(); |
|
24 | - $message = strtr($message, array("\n" => "\n "))."\n"; |
|
25 | - $message = empty($this->exceptions) ? $message : "\n" . $message; |
|
26 | - |
|
27 | - $this->message = rtrim($this->message.$message); |
|
28 | - $this->exceptions[] = $exception; |
|
29 | - } |
|
30 | - |
|
31 | - /** |
|
32 | - * @return PredictionException[] |
|
33 | - */ |
|
34 | - public function getExceptions() |
|
35 | - { |
|
36 | - return $this->exceptions; |
|
37 | - } |
|
38 | - |
|
39 | - public function setObjectProphecy(ObjectProphecy $objectProphecy) |
|
40 | - { |
|
41 | - $this->objectProphecy = $objectProphecy; |
|
42 | - } |
|
43 | - |
|
44 | - /** |
|
45 | - * @return ObjectProphecy |
|
46 | - */ |
|
47 | - public function getObjectProphecy() |
|
48 | - { |
|
49 | - return $this->objectProphecy; |
|
50 | - } |
|
18 | + private $exceptions = array(); |
|
19 | + private $objectProphecy; |
|
20 | + |
|
21 | + public function append(PredictionException $exception) |
|
22 | + { |
|
23 | + $message = $exception->getMessage(); |
|
24 | + $message = strtr($message, array("\n" => "\n "))."\n"; |
|
25 | + $message = empty($this->exceptions) ? $message : "\n" . $message; |
|
26 | + |
|
27 | + $this->message = rtrim($this->message.$message); |
|
28 | + $this->exceptions[] = $exception; |
|
29 | + } |
|
30 | + |
|
31 | + /** |
|
32 | + * @return PredictionException[] |
|
33 | + */ |
|
34 | + public function getExceptions() |
|
35 | + { |
|
36 | + return $this->exceptions; |
|
37 | + } |
|
38 | + |
|
39 | + public function setObjectProphecy(ObjectProphecy $objectProphecy) |
|
40 | + { |
|
41 | + $this->objectProphecy = $objectProphecy; |
|
42 | + } |
|
43 | + |
|
44 | + /** |
|
45 | + * @return ObjectProphecy |
|
46 | + */ |
|
47 | + public function getObjectProphecy() |
|
48 | + { |
|
49 | + return $this->objectProphecy; |
|
50 | + } |
|
51 | 51 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | $message = $exception->getMessage(); |
24 | 24 | $message = strtr($message, array("\n" => "\n "))."\n"; |
25 | - $message = empty($this->exceptions) ? $message : "\n" . $message; |
|
25 | + $message = empty($this->exceptions) ? $message : "\n".$message; |
|
26 | 26 | |
27 | 27 | $this->message = rtrim($this->message.$message); |
28 | 28 | $this->exceptions[] = $exception; |
@@ -16,25 +16,25 @@ |
||
16 | 16 | |
17 | 17 | class UnexpectedCallException extends ObjectProphecyException |
18 | 18 | { |
19 | - private $methodName; |
|
20 | - private $arguments; |
|
21 | - |
|
22 | - public function __construct($message, ObjectProphecy $objectProphecy, |
|
23 | - $methodName, array $arguments) |
|
24 | - { |
|
25 | - parent::__construct($message, $objectProphecy); |
|
26 | - |
|
27 | - $this->methodName = $methodName; |
|
28 | - $this->arguments = $arguments; |
|
29 | - } |
|
30 | - |
|
31 | - public function getMethodName() |
|
32 | - { |
|
33 | - return $this->methodName; |
|
34 | - } |
|
35 | - |
|
36 | - public function getArguments() |
|
37 | - { |
|
38 | - return $this->arguments; |
|
39 | - } |
|
19 | + private $methodName; |
|
20 | + private $arguments; |
|
21 | + |
|
22 | + public function __construct($message, ObjectProphecy $objectProphecy, |
|
23 | + $methodName, array $arguments) |
|
24 | + { |
|
25 | + parent::__construct($message, $objectProphecy); |
|
26 | + |
|
27 | + $this->methodName = $methodName; |
|
28 | + $this->arguments = $arguments; |
|
29 | + } |
|
30 | + |
|
31 | + public function getMethodName() |
|
32 | + { |
|
33 | + return $this->methodName; |
|
34 | + } |
|
35 | + |
|
36 | + public function getArguments() |
|
37 | + { |
|
38 | + return $this->arguments; |
|
39 | + } |
|
40 | 40 | } |
@@ -15,20 +15,20 @@ |
||
15 | 15 | |
16 | 16 | class ObjectProphecyException extends \RuntimeException implements ProphecyException |
17 | 17 | { |
18 | - private $objectProphecy; |
|
18 | + private $objectProphecy; |
|
19 | 19 | |
20 | - public function __construct($message, ObjectProphecy $objectProphecy) |
|
21 | - { |
|
22 | - parent::__construct($message); |
|
20 | + public function __construct($message, ObjectProphecy $objectProphecy) |
|
21 | + { |
|
22 | + parent::__construct($message); |
|
23 | 23 | |
24 | - $this->objectProphecy = $objectProphecy; |
|
25 | - } |
|
24 | + $this->objectProphecy = $objectProphecy; |
|
25 | + } |
|
26 | 26 | |
27 | - /** |
|
28 | - * @return ObjectProphecy |
|
29 | - */ |
|
30 | - public function getObjectProphecy() |
|
31 | - { |
|
32 | - return $this->objectProphecy; |
|
33 | - } |
|
27 | + /** |
|
28 | + * @return ObjectProphecy |
|
29 | + */ |
|
30 | + public function getObjectProphecy() |
|
31 | + { |
|
32 | + return $this->objectProphecy; |
|
33 | + } |
|
34 | 34 | } |
@@ -15,20 +15,20 @@ |
||
15 | 15 | |
16 | 16 | class MethodProphecyException extends ObjectProphecyException |
17 | 17 | { |
18 | - private $methodProphecy; |
|
18 | + private $methodProphecy; |
|
19 | 19 | |
20 | - public function __construct($message, MethodProphecy $methodProphecy) |
|
21 | - { |
|
22 | - parent::__construct($message, $methodProphecy->getObjectProphecy()); |
|
20 | + public function __construct($message, MethodProphecy $methodProphecy) |
|
21 | + { |
|
22 | + parent::__construct($message, $methodProphecy->getObjectProphecy()); |
|
23 | 23 | |
24 | - $this->methodProphecy = $methodProphecy; |
|
25 | - } |
|
24 | + $this->methodProphecy = $methodProphecy; |
|
25 | + } |
|
26 | 26 | |
27 | - /** |
|
28 | - * @return MethodProphecy |
|
29 | - */ |
|
30 | - public function getMethodProphecy() |
|
31 | - { |
|
32 | - return $this->methodProphecy; |
|
33 | - } |
|
27 | + /** |
|
28 | + * @return MethodProphecy |
|
29 | + */ |
|
30 | + public function getMethodProphecy() |
|
31 | + { |
|
32 | + return $this->methodProphecy; |
|
33 | + } |
|
34 | 34 | } |