comparison vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php @ 2:5311817fb629

Theme updates
author Chris Cannam
date Tue, 10 Jul 2018 13:19:18 +0000
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
1:0b0e5f3b1e83 2:5311817fb629
39 { 39 {
40 return new self(sprintf('Your proxy directory "%s" must be writable', $proxyDirectory)); 40 return new self(sprintf('Your proxy directory "%s" must be writable', $proxyDirectory));
41 } 41 }
42 42
43 /** 43 /**
44 * @param string $className 44 * @param string $className
45 * @param string $methodName 45 * @param string $methodName
46 * @param string $parameterName 46 * @param string $parameterName
47 * @param \Exception $previous 47 * @param \Exception|null $previous
48 * 48 *
49 * @return self 49 * @return self
50 */ 50 */
51 public static function invalidParameterTypeHint($className, $methodName, $parameterName, \Exception $previous) 51 public static function invalidParameterTypeHint(
52 { 52 $className,
53 $methodName,
54 $parameterName,
55 \Exception $previous = null
56 ) {
53 return new self( 57 return new self(
54 sprintf( 58 sprintf(
55 'The type hint of parameter "%s" in method "%s" in class "%s" is invalid.', 59 'The type hint of parameter "%s" in method "%s" in class "%s" is invalid.',
56 $parameterName, 60 $parameterName,
57 $methodName, 61 $methodName,
59 ), 63 ),
60 0, 64 0,
61 $previous 65 $previous
62 ); 66 );
63 } 67 }
68
69 /**
70 * @param $className
71 * @param $methodName
72 * @param \Exception|null $previous
73 *
74 * @return self
75 */
76 public static function invalidReturnTypeHint($className, $methodName, \Exception $previous = null)
77 {
78 return new self(
79 sprintf(
80 'The return type of method "%s" in class "%s" is invalid.',
81 $methodName,
82 $className
83 ),
84 0,
85 $previous
86 );
87 }
64 } 88 }