Code Duplication    Length = 7-10 lines in 2 locations

Zewa/Model.php 1 location

@@ 29-38 (lines=10) @@
26
    /**
27
     * Load up some basic configuration settings.
28
     */
29
    public function __construct($name = 'default')
30
    {
31
        // This abstract is strictly to establish inheritance from a global registery.
32
        $app                 = App::getInstance();
33
        $this->configuration = $app->getConfiguration();
34
        if ($this->configuration->database !== false) {
35
            $database  = $app->getService('database');
36
            $this->dbh = $database->fetchConnection($name);
37
        }
38
    }
39
40
    //@TODO: add these to Database, and then set a $this->db here,
41
    protected function preparePlaceHolders($arguments)

Zewa/View.php 1 location

@@ 63-69 (lines=7) @@
60
    /**
61
     * Load up some basic configuration settings.
62
     */
63
    public function __construct()
64
    {
65
        $app = App::getInstance();
66
        $this->configuration = $app->getConfiguration();
67
        $this->request = $app->getService('request');
68
        $this->router = $app->getService('router');
69
    }
70
71
    /**
72
     * Returns base URL for app