Code Duplication    Length = 28-37 lines in 2 locations

src/Prophecy/Exception/Doubler/MethodNotExtendableException.php 1 location

@@ 11-47 (lines=37) @@
8
9
    namespace Prophecy\Exception\Doubler;
10
11
    class MethodNotExtendableException extends DoubleException
12
    {
13
        private $methodName;
14
15
        private $className;
16
17
        /**
18
         * @param string $message
19
         * @param string $className
20
         * @param string $methodName
21
         */
22
        public function __construct($message, $className, $methodName)
23
        {
24
            parent::__construct($message);
25
26
            $this->methodName = $methodName;
27
            $this->className = $className;
28
        }
29
30
31
        /**
32
         * @return string
33
         */
34
        public function getMethodName()
35
        {
36
            return $this->methodName;
37
        }
38
39
        /**
40
         * @return string
41
         */
42
        public function getClassName()
43
        {
44
            return $this->className;
45
        }
46
47
    }
48

src/Prophecy/Exception/Doubler/ReturnByReferenceException.php 1 location

@@ 14-41 (lines=28) @@
11
12
namespace Prophecy\Exception\Doubler;
13
14
class ReturnByReferenceException extends DoubleException
15
{
16
    private $classname;
17
    private $methodName;
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);
27
28
        $this->classname  = $classname;
29
        $this->methodName = $methodName;
30
    }
31
32
    public function getClassname()
33
    {
34
        return $this->classname;
35
    }
36
37
    public function getMethodName()
38
    {
39
        return $this->methodName;
40
    }
41
}
42