diff --git a/README.md b/README.md index 2986585..011f26c 100644 --- a/README.md +++ b/README.md @@ -48,10 +48,10 @@ Your module controllers (by default go into the `Http/Controllers` folder) shoul ## Creating Modules To create a new module, you can use the artisan command ``` -php artisan modules:make {id} {name} [--url={url}] +php artisan modules:make {id} [{name}] [--url={url}] ``` -Values of `id`, `name`, and `url` are strings, and the URL part is optional and will be used to generate make the - URLs of the module more human friendly. +Values of `id`, `name`, and `url` are strings. The name and URL parts are optional. URL will be used to generate the + URLs of the module more human friendly. Name is used for human identification and readability only. This command will create the basic folder structure inside the modules folder, along with the base module and a sample routes (inside `Http/routes.php`), controller (inside `Http/Controllers/`), and view (inside `Views`). diff --git a/src/Commands/MakeModule.php b/src/Commands/MakeModule.php index 7bdcd73..8b30181 100644 --- a/src/Commands/MakeModule.php +++ b/src/Commands/MakeModule.php @@ -9,7 +9,7 @@ class MakeModule extends \Illuminate\Console\Command implements SelfHandling { protected $signature = 'make:module {id : the ID of the module. Should be unique across modules} - {name : the display name of the module} + {name? : the display name of the module} {--url= : the URL/route-names part for the module} '; protected $description = 'Makes a new module'; @@ -36,7 +36,7 @@ public function __construct(Filesystem $fileSystem) { public function handle() { //input $id = $this->argument('id'); - $name = $this->argument('name'); + $name = $this->argument('name') ? : $id; $url = $this->option('url') ?: str_slug($id); //subs diff --git a/tests/Cases/MakeModuleTest.php b/tests/Cases/MakeModuleTest.php index ee44c0f..b10cf8d 100644 --- a/tests/Cases/MakeModuleTest.php +++ b/tests/Cases/MakeModuleTest.php @@ -26,6 +26,14 @@ public function testSimpleCommand() $this->assertEquals(\App\Modules\Test\Module::make()->routePrefix(), "test"); } + public function testDefaultValues() + { + $this->artisan('make:module', ["id" => "Test2"]); + $this->loadModuleFiles("Test2"); + $this->assertEquals(\App\Modules\Test2\Module::make()->id(), "Test2"); + $this->assertEquals(\App\Modules\Test2\Module::make()->name(), "Test2"); + } + public function testCompoundName() { $this->artisan('make:module', ["id" => "TestModule", "name" => "Test Module"]); diff --git a/tests/codeCoverage/Commands/InitiateDatabaseTable.php.html b/tests/codeCoverage/Commands/InitiateDatabaseTable.php.html index 6fd3f8e..ba21ebb 100644 --- a/tests/codeCoverage/Commands/InitiateDatabaseTable.php.html +++ b/tests/codeCoverage/Commands/InitiateDatabaseTable.php.html @@ -165,8 +165,8 @@
17
     */
18
    public function __construct()
19
    { -
20
        parent::__construct(); -
21
    } +
20
        parent::__construct(); +
21
    }
22
23
    /**
24
     * Execute the command. @@ -199,7 +199,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/Commands/MakeModule.php.html b/tests/codeCoverage/Commands/MakeModule.php.html index 0145fd7..e8f5276 100644 --- a/tests/codeCoverage/Commands/MakeModule.php.html +++ b/tests/codeCoverage/Commands/MakeModule.php.html @@ -88,7 +88,7 @@
100.00%
5 / 5
- 8 + 9
100.00% covered (success) @@ -130,7 +130,7 @@
100.00%
1 / 1
- 2 + 3
100.00% covered (success) @@ -220,7 +220,7 @@
9
10
    protected $signature = 'make:module
11
                                {id : the ID of the module. Should be unique across modules} -
12
                                {name : the display name of the module} +
12
                                {name? : the display name of the module}
13
                                {--url= : the URL/route-names part for the module}
14
                                ';
15
    protected $description = 'Makes a new module'; @@ -235,9 +235,9 @@
24
     * @param Filesystem $fileSystem
25
     */
26
    public function __construct(Filesystem $fileSystem) { -
27
        parent::__construct(); -
28
        $this->fileSystem = $fileSystem; -
29
    } +
27
        parent::__construct(); +
28
        $this->fileSystem = $fileSystem; +
29
    }
30
31
    /**
32
     * Execute the command. @@ -246,52 +246,52 @@
35
     */
36
    public function handle() {
37
        //input -
38
        $id = $this->argument('id'); -
39
        $name = $this->argument('name'); -
40
        $url = $this->option('url') ?: str_slug($id); +
38
        $id = $this->argument('id'); +
39
        $name = $this->argument('name') ? : $id; +
40
        $url = $this->option('url') ?: str_slug($id);
41
42
        //subs -
43
        $path = rtrim(config('modules.directory'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $id . DIRECTORY_SEPARATOR; -
44
        $className = config('modules.class_name'); -
45
        $ds = DIRECTORY_SEPARATOR; +
43
        $path = rtrim(config('modules.directory'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $id . DIRECTORY_SEPARATOR; +
44
        $className = config('modules.class_name'); +
45
        $ds = DIRECTORY_SEPARATOR;
46
47
        //stub data
48
        $stubData = [ -
49
            "id" => $id, -
50
            "name" => $name, -
51
            "namespace" => trim(config("modules.namespace"), "\\"), -
52
            "class" => $className, -
53
            "url_name" => $url, -
54
        ]; +
49
            "id" => $id, +
50
            "name" => $name, +
51
            "namespace" => trim(config("modules.namespace"), "\\"), +
52
            "class" => $className, +
53
            "url_name" => $url, +
54
        ];
55
-
56
        $this->makeDirectory($path); -
57
        $this->makeDirectory("{$path}Views"); -
58
        $this->makeDirectory("{$path}Migrations"); -
59
        $this->makeDirectory("{$path}Models"); -
60
        $this->makeDirectory("{$path}Http{$ds}Controllers"); -
61
        $this->copyStub("Module.php.stub", "{$path}{$className}.php", $stubData + []); -
62
        $this->copyStub("routes.php.stub", "{$path}Http{$ds}routes.php", $stubData + []); -
63
        $this->copyStub("Controller.php.stub", "{$path}Http{$ds}Controllers{$ds}WelcomeController.php", $stubData + []); -
64
        $this->copyStub("index.blade.php.stub", "{$path}Views{$ds}index.blade.php", $stubData + []); +
56
        $this->makeDirectory($path); +
57
        $this->makeDirectory("{$path}Views"); +
58
        $this->makeDirectory("{$path}Migrations"); +
59
        $this->makeDirectory("{$path}Models"); +
60
        $this->makeDirectory("{$path}Http{$ds}Controllers"); +
61
        $this->copyStub("Module.php.stub", "{$path}{$className}.php", $stubData + []); +
62
        $this->copyStub("routes.php.stub", "{$path}Http{$ds}routes.php", $stubData + []); +
63
        $this->copyStub("Controller.php.stub", "{$path}Http{$ds}Controllers{$ds}WelcomeController.php", $stubData + []); +
64
        $this->copyStub("index.blade.php.stub", "{$path}Views{$ds}index.blade.php", $stubData + []);
65
-
66
        $this->info("Module {$id} has been created in {$path}"); -
67
    } +
66
        $this->info("Module {$id} has been created in {$path}"); +
67
    }
68
69
    protected function makeDirectory($path, $mode = 0777) { -
70
        if (!$this->fileSystem->isDirectory($path)) { -
71
            $this->fileSystem->makeDirectory($path, $mode, true, true); -
72
        } -
73
    } +
70
        if (!$this->fileSystem->isDirectory($path)) { +
71
            $this->fileSystem->makeDirectory($path, $mode, true, true); +
72
        } +
73
    }
74
75
    protected function copyStub($stubName, $filePath, array $values) { -
76
        $path = __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'MakeModule' . DIRECTORY_SEPARATOR . $stubName; +
76
        $path = __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'MakeModule' . DIRECTORY_SEPARATOR . $stubName;
77
        $content = preg_replace_callback("/\{\{([a-zA-Z_\-]+)\}\}/", function ($matches) use ($values) { -
78
            return $values[$matches[1]]; -
79
        }, file_get_contents($path)); -
80
        if (!$this->fileSystem->exists($filePath)) { -
81
            $this->fileSystem->put($filePath, $content); -
82
        } -
83
    } +
78
            return $values[$matches[1]]; +
79
        }, file_get_contents($path)); +
80
        if (!$this->fileSystem->exists($filePath)) { +
81
            $this->fileSystem->put($filePath, $content); +
82
        } +
83
    }
84
85
} @@ -306,7 +306,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/Commands/dashboard.html b/tests/codeCoverage/Commands/dashboard.html index d745ab4..3c8e515 100644 --- a/tests/codeCoverage/Commands/dashboard.html +++ b/tests/codeCoverage/Commands/dashboard.html @@ -141,7 +141,7 @@

Project Risks

@@ -230,7 +230,7 @@

Project Risks

chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[80,4,"InitiateDatabaseTable<\/a>"],[100,8,"MakeModule<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[80,4,"InitiateDatabaseTable<\/a>"],[100,9,"MakeModule<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -254,7 +254,7 @@

Project Risks

chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"
InitiateDatabaseTable::__construct<\/a>"],[75,3,"InitiateDatabaseTable::handle<\/a>"],[100,1,"MakeModule::__construct<\/a>"],[100,2,"MakeModule::handle<\/a>"],[100,2,"MakeModule::makeDirectory<\/a>"],[100,2,"MakeModule::copyStub<\/a>"],[100,1,"MakeModule::anonymous function<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"InitiateDatabaseTable::__construct<\/a>"],[75,3,"InitiateDatabaseTable::handle<\/a>"],[100,1,"MakeModule::__construct<\/a>"],[100,3,"MakeModule::handle<\/a>"],[100,2,"MakeModule::makeDirectory<\/a>"],[100,2,"MakeModule::copyStub<\/a>"],[100,1,"MakeModule::anonymous function<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/tests/codeCoverage/Commands/index.html b/tests/codeCoverage/Commands/index.html index 51f89f5..6297fee 100644 --- a/tests/codeCoverage/Commands/index.html +++ b/tests/codeCoverage/Commands/index.html @@ -137,7 +137,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/Controller.php.html b/tests/codeCoverage/Controller.php.html index c434119..1eaaaac 100644 --- a/tests/codeCoverage/Controller.php.html +++ b/tests/codeCoverage/Controller.php.html @@ -210,7 +210,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/Interfaces/KeyValueStoreInterface.php.html b/tests/codeCoverage/Interfaces/KeyValueStoreInterface.php.html index e8f4d5f..ad82c63 100644 --- a/tests/codeCoverage/Interfaces/KeyValueStoreInterface.php.html +++ b/tests/codeCoverage/Interfaces/KeyValueStoreInterface.php.html @@ -90,7 +90,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/Interfaces/StaticAndInstanceAccessInterface.php.html b/tests/codeCoverage/Interfaces/StaticAndInstanceAccessInterface.php.html index 6b1db97..9b94432 100644 --- a/tests/codeCoverage/Interfaces/StaticAndInstanceAccessInterface.php.html +++ b/tests/codeCoverage/Interfaces/StaticAndInstanceAccessInterface.php.html @@ -93,7 +93,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/Interfaces/dashboard.html b/tests/codeCoverage/Interfaces/dashboard.html index 341dc48..923cadb 100644 --- a/tests/codeCoverage/Interfaces/dashboard.html +++ b/tests/codeCoverage/Interfaces/dashboard.html @@ -137,7 +137,7 @@

Project Risks

diff --git a/tests/codeCoverage/Interfaces/index.html b/tests/codeCoverage/Interfaces/index.html index 9496335..700f9bd 100644 --- a/tests/codeCoverage/Interfaces/index.html +++ b/tests/codeCoverage/Interfaces/index.html @@ -92,7 +92,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/Module.php.html b/tests/codeCoverage/Module.php.html index de26e3f..9da63f6 100644 --- a/tests/codeCoverage/Module.php.html +++ b/tests/codeCoverage/Module.php.html @@ -693,18 +693,18 @@
42
    }
43
44
    public function __construct() { -
45
        if (array_key_exists(get_called_class(), static::$startedUp) === false) { -
46
            static::startup(); -
47
            static::$startedUp[get_called_class()] = $this; -
48
        } -
49
    } +
45
        if (array_key_exists(get_called_class(), static::$startedUp) === false) { +
46
            static::startup(); +
47
            static::$startedUp[get_called_class()] = $this; +
48
        } +
49
    }
50
51
    /**
52
     * @return mixed Loads helpers and dependencies
53
     */
54
    public static function startup() {
55
-
56
    } +
56
    }
57
58
    /**
59
     * Returns a path to the routes file, or false if no routes is required @@ -719,14 +719,14 @@
68
     * @return string unique identifier of the module
69
     */
70
    public static function id() { -
71
        return static::$moduleId; +
71
        return static::$moduleId;
72
    }
73
74
    /**
75
     * @return string display name of the module
76
     */
77
    public static function name() { -
78
        return static::$moduleName; +
78
        return static::$moduleName;
79
    }
80
81
    /** @@ -911,7 +911,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/Modules.php.html b/tests/codeCoverage/Modules.php.html index 9865ed4..8f79d54 100644 --- a/tests/codeCoverage/Modules.php.html +++ b/tests/codeCoverage/Modules.php.html @@ -576,13 +576,13 @@
135
     * @return array
136
     */
137
    public static function refreshModules() { -
138
        $modules = []; +
138
        $modules = [];
139
        $filtered = [ -
140
            'enabled' => [], -
141
            'disabled' => [] -
142
        ]; -
143
        $modulesPath = static::modulesDirectory(); -
144
        if (is_dir($modulesPath)) { +
140
            'enabled' => [], +
141
            'disabled' => [] +
142
        ]; +
143
        $modulesPath = static::modulesDirectory(); +
144
        if (is_dir($modulesPath)) {
145
            $dir = new DirectoryIterator($modulesPath);
146
            foreach ($dir as $fileInfo) {
147
                /* @var DirectoryIterator $fileInfo */ @@ -633,24 +633,24 @@
192
                }
193
            }
194
        } -
195
        static::$modules = $modules; -
196
        static::$filtered = $filtered; -
197
        return $modules; +
195
        static::$modules = $modules; +
196
        static::$filtered = $filtered; +
197
        return $modules;
198
    }
199
200
    /**
201
     * @return Module[]|array
202
     */
203
    public static function all() { -
204
        return static::$modules ?: static::refreshModules(); +
204
        return static::$modules ?: static::refreshModules();
205
    }
206
207
    /**
208
     * @return Module[]|array
209
     */
210
    public static function enabled() { -
211
        static::all(); -
212
        return @static::$filtered['enabled'] ?: []; +
211
        static::all(); +
212
        return @static::$filtered['enabled'] ?: [];
213
    }
214
215
    /** @@ -665,7 +665,7 @@
224
     * @return string
225
     */
226
    public static function modulesDirectory() { -
227
        return config('modules.directory', app_path('Modules')); +
227
        return config('modules.directory', app_path('Modules'));
228
    }
229
230
    /** @@ -696,7 +696,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/ServiceProvider.php.html b/tests/codeCoverage/ServiceProvider.php.html index 8ce0443..80bd946 100644 --- a/tests/codeCoverage/ServiceProvider.php.html +++ b/tests/codeCoverage/ServiceProvider.php.html @@ -212,30 +212,30 @@
23
    public function register() {
24
25
        //copy config and views to app locations -
26
        $this->publishes([ -
27
            __DIR__ . join(DIRECTORY_SEPARATOR, ['', '..', 'config', 'published.php']) => config_path('modules.php') +
26
        $this->publishes([ +
27
            __DIR__ . join(DIRECTORY_SEPARATOR, ['', '..', 'config', 'published.php']) => config_path('modules.php')
28
                //@TODO:allow publishing and reading the stubs for overriding -
29
        ]); +
29
        ]);
30
31
        //registers console commands -
32
        if ($this->app->runningInConsole()) { -
33
            $this->commands([ -
34
                InitiateDatabaseTable::class, -
35
                MakeModule::class, -
36
            ]); -
37
        } -
38
    } +
32
        if ($this->app->runningInConsole()) { +
33
            $this->commands([ +
34
                InitiateDatabaseTable::class, +
35
                MakeModule::class, +
36
            ]); +
37
        } +
38
    }
39
40
    public function boot() {
41
42
        //merge the config -
43
        $this->mergeConfigFrom(__DIR__ . join(DIRECTORY_SEPARATOR, ['', '..', 'config', 'defaults.php']), 'modules'); +
43
        $this->mergeConfigFrom(__DIR__ . join(DIRECTORY_SEPARATOR, ['', '..', 'config', 'defaults.php']), 'modules');
44
45
        //load the modules -
46
        $modules = Modules::enabled(); -
47
        $publishesMigrations = []; +
46
        $modules = Modules::enabled(); +
47
        $publishesMigrations = [];
48
        /** @var Module[]|array $modules */ -
49
        foreach ($modules as $module) { +
49
        foreach ($modules as $module) {
50
            $routesPath = $module->routesPath();
51
            if ($routesPath) {
52
                if (method_exists($this, 'loadRoutesFrom')) { @@ -250,16 +250,16 @@
61
                } else {
62
                    $module->registerViewsPath($this->app);
63
                } -
64
            } +
64
            }
65
            if (($moduleMigrationsPath = $module->migrationsPath())) {
66
//                $this->thisLoadMigrationsFrom($moduleMigrationsPath);
67
                $publishesMigrations[$moduleMigrationsPath] = database_path('migrations');
68
            } -
69
        } +
69
        }
70
71
        //publishes migration -
72
        $this->publishes($publishesMigrations, 'migrations'); -
73
    } +
72
        $this->publishes($publishesMigrations, 'migrations'); +
73
    }
74
75
    protected function thisLoadMigrationsFrom($paths) {
76
        if (method_exists($this, 'loadMigrationsFrom')) { @@ -286,7 +286,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/StoreHandlers/DummyStoreHandler.php.html b/tests/codeCoverage/StoreHandlers/DummyStoreHandler.php.html index 1f9af9a..5bae544 100644 --- a/tests/codeCoverage/StoreHandlers/DummyStoreHandler.php.html +++ b/tests/codeCoverage/StoreHandlers/DummyStoreHandler.php.html @@ -186,7 +186,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/StoreHandlers/MySqlSimpleDbStoreHandler.php.html b/tests/codeCoverage/StoreHandlers/MySqlSimpleDbStoreHandler.php.html index d9c9e55..9feb409 100644 --- a/tests/codeCoverage/StoreHandlers/MySqlSimpleDbStoreHandler.php.html +++ b/tests/codeCoverage/StoreHandlers/MySqlSimpleDbStoreHandler.php.html @@ -153,7 +153,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/StoreHandlers/SimpleDbStoreHandler.php.html b/tests/codeCoverage/StoreHandlers/SimpleDbStoreHandler.php.html index a323fdb..b94d874 100644 --- a/tests/codeCoverage/StoreHandlers/SimpleDbStoreHandler.php.html +++ b/tests/codeCoverage/StoreHandlers/SimpleDbStoreHandler.php.html @@ -299,7 +299,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/StoreHandlers/SqliteSimpleDbStoreHandler.php.html b/tests/codeCoverage/StoreHandlers/SqliteSimpleDbStoreHandler.php.html index 3126947..96cf6fa 100644 --- a/tests/codeCoverage/StoreHandlers/SqliteSimpleDbStoreHandler.php.html +++ b/tests/codeCoverage/StoreHandlers/SqliteSimpleDbStoreHandler.php.html @@ -155,7 +155,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/StoreHandlers/dashboard.html b/tests/codeCoverage/StoreHandlers/dashboard.html index 84ea0cf..39c58ec 100644 --- a/tests/codeCoverage/StoreHandlers/dashboard.html +++ b/tests/codeCoverage/StoreHandlers/dashboard.html @@ -139,7 +139,7 @@

Project Risks

diff --git a/tests/codeCoverage/StoreHandlers/index.html b/tests/codeCoverage/StoreHandlers/index.html index 4e6896b..2cc15e2 100644 --- a/tests/codeCoverage/StoreHandlers/index.html +++ b/tests/codeCoverage/StoreHandlers/index.html @@ -193,7 +193,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/Traits/StaticAndInstanceAccessTrait.php.html b/tests/codeCoverage/Traits/StaticAndInstanceAccessTrait.php.html index 0537f97..532e5ca 100644 --- a/tests/codeCoverage/Traits/StaticAndInstanceAccessTrait.php.html +++ b/tests/codeCoverage/Traits/StaticAndInstanceAccessTrait.php.html @@ -191,7 +191,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/Traits/StaticFactory.php.html b/tests/codeCoverage/Traits/StaticFactory.php.html index 14e5fb4..7b13776 100644 --- a/tests/codeCoverage/Traits/StaticFactory.php.html +++ b/tests/codeCoverage/Traits/StaticFactory.php.html @@ -143,7 +143,7 @@
16
     * @return static|$this
17
     */
18
    public static function make(){ -
19
        return new static(); +
19
        return new static();
20
    }
21
22
} @@ -159,7 +159,7 @@

Legend

Dead Code

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/Traits/dashboard.html b/tests/codeCoverage/Traits/dashboard.html index 6fee005..832e479 100644 --- a/tests/codeCoverage/Traits/dashboard.html +++ b/tests/codeCoverage/Traits/dashboard.html @@ -137,7 +137,7 @@

Project Risks

diff --git a/tests/codeCoverage/Traits/index.html b/tests/codeCoverage/Traits/index.html index 90a516c..f297be0 100644 --- a/tests/codeCoverage/Traits/index.html +++ b/tests/codeCoverage/Traits/index.html @@ -137,7 +137,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.

diff --git a/tests/codeCoverage/dashboard.html b/tests/codeCoverage/dashboard.html index ae09324..9555ac9 100644 --- a/tests/codeCoverage/dashboard.html +++ b/tests/codeCoverage/dashboard.html @@ -166,7 +166,7 @@

Project Risks

@@ -255,7 +255,7 @@

Project Risks

chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[80,4,"InitiateDatabaseTable<\/a>"],[100,8,"MakeModule<\/a>"],[84.615384615385,5,"Controller<\/a>"],[79.365079365079,42,"Module<\/a>"],[98.75,40,"Modules<\/a>"],[75.609756097561,14,"ServiceProvider<\/a>"],[100,2,"DummyStoreHandler<\/a>"],[0,1,"MySqlSimpleDbStoreHandler<\/a>"],[100,8,"SimpleDbStoreHandler<\/a>"],[100,1,"SqliteSimpleDbStoreHandler<\/a>"],[100,4,"StaticAndInstanceAccessTrait<\/a>"],[100,1,"StaticFactory<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[80,4,"InitiateDatabaseTable<\/a>"],[100,9,"MakeModule<\/a>"],[84.615384615385,5,"Controller<\/a>"],[79.365079365079,42,"Module<\/a>"],[98.75,40,"Modules<\/a>"],[75.609756097561,14,"ServiceProvider<\/a>"],[100,2,"DummyStoreHandler<\/a>"],[0,1,"MySqlSimpleDbStoreHandler<\/a>"],[100,8,"SimpleDbStoreHandler<\/a>"],[100,1,"SqliteSimpleDbStoreHandler<\/a>"],[100,4,"StaticAndInstanceAccessTrait<\/a>"],[100,1,"StaticFactory<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -279,7 +279,7 @@

Project Risks

chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"
InitiateDatabaseTable::__construct<\/a>"],[75,3,"InitiateDatabaseTable::handle<\/a>"],[100,1,"MakeModule::__construct<\/a>"],[100,2,"MakeModule::handle<\/a>"],[100,2,"MakeModule::makeDirectory<\/a>"],[100,2,"MakeModule::copyStub<\/a>"],[100,1,"MakeModule::anonymous function<\/a>"],[100,1,"Controller::renderView<\/a>"],[83.333333333333,4,"Controller::module<\/a>"],[50,2,"Module::this<\/a>"],[100,1,"Module::grantAccess<\/a>"],[100,2,"Module::__construct<\/a>"],[100,1,"Module::startup<\/a>"],[100,2,"Module::routesPath<\/a>"],[100,1,"Module::id<\/a>"],[100,1,"Module::name<\/a>"],[100,2,"Module::routePrefix<\/a>"],[100,2,"Module::urlPrefix<\/a>"],[100,1,"Module::isEnabled<\/a>"],[100,1,"Module::isDisabled<\/a>"],[100,1,"Module::enableModule<\/a>"],[100,1,"Module::disableModule<\/a>"],[100,2,"Module::modulePath<\/a>"],[100,2,"Module::migrationsPath<\/a>"],[100,2,"Module::viewsPath<\/a>"],[100,1,"Module::getViewName<\/a>"],[100,1,"Module::renderView<\/a>"],[100,1,"Module::getRoutePath<\/a>"],[100,1,"Module::getRouteName<\/a>"],[100,1,"Module::getPathForRoute<\/a>"],[62.5,4,"Module::registerViewsPath<\/a>"],[62.5,4,"Module::registerRoutes<\/a>"],[83.333333333333,3,"Module::registerFrameworkResources<\/a>"],[0,1,"Module::setStoreValue<\/a>"],[0,1,"Module::getStoreValue<\/a>"],[100,1,"Modules::grantAccess<\/a>"],[100,1,"Modules::isModuleEnabled<\/a>"],[100,2,"Modules::disableModule<\/a>"],[100,2,"Modules::enableModule<\/a>"],[100,2,"Modules::getStoredValue<\/a>"],[100,2,"Modules::setStoredValue<\/a>"],[100,8,"Modules::getStoreHandler<\/a>"],[100,1,"Modules::setStoreHandler<\/a>"],[100,2,"Modules::get<\/a>"],[97.058823529412,10,"Modules::refreshModules<\/a>"],[100,2,"Modules::all<\/a>"],[100,2,"Modules::enabled<\/a>"],[100,2,"Modules::disabled<\/a>"],[100,1,"Modules::modulesDirectory<\/a>"],[100,1,"Modules::modulesNamespace<\/a>"],[100,1,"Modules::moduleClassName<\/a>"],[100,2,"ServiceProvider::register<\/a>"],[86.95652173913,7,"ServiceProvider::boot<\/a>"],[0,3,"ServiceProvider::thisLoadMigrationsFrom<\/a>"],[25,2,"ServiceProvider::anonymous function<\/a>"],[100,1,"DummyStoreHandler::set<\/a>"],[100,1,"DummyStoreHandler::get<\/a>"],[0,1,"MySqlSimpleDbStoreHandler::set<\/a>"],[100,2,"SimpleDbStoreHandler::getConnection<\/a>"],[100,1,"SimpleDbStoreHandler::createTable<\/a>"],[100,1,"SimpleDbStoreHandler::statement<\/a>"],[100,1,"SimpleDbStoreHandler::select<\/a>"],[100,1,"SimpleDbStoreHandler::set<\/a>"],[100,2,"SimpleDbStoreHandler::get<\/a>"],[100,1,"SqliteSimpleDbStoreHandler::set<\/a>"],[100,2,"StaticAndInstanceAccessTrait::__call<\/a>"],[100,2,"StaticAndInstanceAccessTrait::__callStatic<\/a>"],[100,1,"StaticFactory::make<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"InitiateDatabaseTable::__construct<\/a>"],[75,3,"InitiateDatabaseTable::handle<\/a>"],[100,1,"MakeModule::__construct<\/a>"],[100,3,"MakeModule::handle<\/a>"],[100,2,"MakeModule::makeDirectory<\/a>"],[100,2,"MakeModule::copyStub<\/a>"],[100,1,"MakeModule::anonymous function<\/a>"],[100,1,"Controller::renderView<\/a>"],[83.333333333333,4,"Controller::module<\/a>"],[50,2,"Module::this<\/a>"],[100,1,"Module::grantAccess<\/a>"],[100,2,"Module::__construct<\/a>"],[100,1,"Module::startup<\/a>"],[100,2,"Module::routesPath<\/a>"],[100,1,"Module::id<\/a>"],[100,1,"Module::name<\/a>"],[100,2,"Module::routePrefix<\/a>"],[100,2,"Module::urlPrefix<\/a>"],[100,1,"Module::isEnabled<\/a>"],[100,1,"Module::isDisabled<\/a>"],[100,1,"Module::enableModule<\/a>"],[100,1,"Module::disableModule<\/a>"],[100,2,"Module::modulePath<\/a>"],[100,2,"Module::migrationsPath<\/a>"],[100,2,"Module::viewsPath<\/a>"],[100,1,"Module::getViewName<\/a>"],[100,1,"Module::renderView<\/a>"],[100,1,"Module::getRoutePath<\/a>"],[100,1,"Module::getRouteName<\/a>"],[100,1,"Module::getPathForRoute<\/a>"],[62.5,4,"Module::registerViewsPath<\/a>"],[62.5,4,"Module::registerRoutes<\/a>"],[83.333333333333,3,"Module::registerFrameworkResources<\/a>"],[0,1,"Module::setStoreValue<\/a>"],[0,1,"Module::getStoreValue<\/a>"],[100,1,"Modules::grantAccess<\/a>"],[100,1,"Modules::isModuleEnabled<\/a>"],[100,2,"Modules::disableModule<\/a>"],[100,2,"Modules::enableModule<\/a>"],[100,2,"Modules::getStoredValue<\/a>"],[100,2,"Modules::setStoredValue<\/a>"],[100,8,"Modules::getStoreHandler<\/a>"],[100,1,"Modules::setStoreHandler<\/a>"],[100,2,"Modules::get<\/a>"],[97.058823529412,10,"Modules::refreshModules<\/a>"],[100,2,"Modules::all<\/a>"],[100,2,"Modules::enabled<\/a>"],[100,2,"Modules::disabled<\/a>"],[100,1,"Modules::modulesDirectory<\/a>"],[100,1,"Modules::modulesNamespace<\/a>"],[100,1,"Modules::moduleClassName<\/a>"],[100,2,"ServiceProvider::register<\/a>"],[86.95652173913,7,"ServiceProvider::boot<\/a>"],[0,3,"ServiceProvider::thisLoadMigrationsFrom<\/a>"],[25,2,"ServiceProvider::anonymous function<\/a>"],[100,1,"DummyStoreHandler::set<\/a>"],[100,1,"DummyStoreHandler::get<\/a>"],[0,1,"MySqlSimpleDbStoreHandler::set<\/a>"],[100,2,"SimpleDbStoreHandler::getConnection<\/a>"],[100,1,"SimpleDbStoreHandler::createTable<\/a>"],[100,1,"SimpleDbStoreHandler::statement<\/a>"],[100,1,"SimpleDbStoreHandler::select<\/a>"],[100,1,"SimpleDbStoreHandler::set<\/a>"],[100,2,"SimpleDbStoreHandler::get<\/a>"],[100,1,"SqliteSimpleDbStoreHandler::set<\/a>"],[100,2,"StaticAndInstanceAccessTrait::__call<\/a>"],[100,2,"StaticAndInstanceAccessTrait::__callStatic<\/a>"],[100,1,"StaticFactory::make<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/tests/codeCoverage/index.html b/tests/codeCoverage/index.html index f160c7a..58eab86 100644 --- a/tests/codeCoverage/index.html +++ b/tests/codeCoverage/index.html @@ -289,7 +289,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 2 11:20:54 UTC 2017. + Generated by php-code-coverage 4.0.7 using PHP 5.6.29 with Xdebug 2.2.5 and PHPUnit 5.7.16 at Sun Apr 9 8:41:16 UTC 2017.