Code Duplication    Length = 6-9 lines in 2 locations

src/Utils/Normalizer.php 2 locations

@@ 36-44 (lines=9) @@
33
            }
34
            // We decide to call data method on widget object.
35
            $this->widget->controller = [$this->widget, 'data'];
36
        } else {
37
            // If the user has specified the controller class path
38
            if (!class_exists($this->widget->controller)) {
39
                throw new \InvalidArgumentException("Controller class: [{$this->widget->controller}] not found.");
40
            }
41
42
            // we decide to call data method on that.
43
            $this->widget->controller = ($this->widget->controller) . '@data';
44
        }
45
    }
46
47
    /**
@@ 61-66 (lines=6) @@
58
            } else {
59
                $this->widget->presenter = null;
60
            }
61
        } else {
62
            if (class_exists($this->widget->presenter) === false) {
63
                throw new \InvalidArgumentException("Presenter Class [{$this->widget->presenter}] not found.");
64
            }
65
            $this->widget->presenter = $this->widget->presenter . '@present';
66
        }
67
68
    }
69