Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ bootstrap/cache/
# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer
.rocketeer/
.idea/
nbproject/
37 changes: 22 additions & 15 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<phpunit
backupGlobals="false"
backupStaticAttributes="false"
cacheTokens="false"
bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
strict="false"
verbose="false"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">./tests/Cases</directory>
</testsuite>
</testsuites>
<logging>
<log type="coverage-html" target="./tests/codeCoverage" charset="UTF-8"/>
</logging>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<whitelist>
<directory suffix=".php">./src</directory>
</whitelist>
<blacklist>
<directory>./vendor</directory>
<directory>./config</directory>
<directory>./tests</directory>
</blacklist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
Expand Down
5 changes: 3 additions & 2 deletions src/Commands/MakeModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
class MakeModule extends \Illuminate\Console\Command implements SelfHandling
{

protected $signature = 'modules:make
{id : the ID of the module. Should be unique across modules}
protected $signature = 'make:module
{id : the ID of the module. Should be unique across modules}
{name : the display name of the module}
{--url= : the URL/route-names part for the module}
';
Expand Down Expand Up @@ -58,6 +58,7 @@ public function handle()

$this->makeDirectory($path);
$this->makeDirectory("{$path}Views");
$this->makeDirectory("{$path}Migrations");
$this->makeDirectory("{$path}Models");
$this->makeDirectory("{$path}Http{$ds}Controllers");
$this->copyStub("Module.php.stub", "{$path}{$className}.php", $stubData + []);
Expand Down
8 changes: 4 additions & 4 deletions src/Commands/stubs/MakeModule/Module.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use ItvisionSy\Laravel\Modules\Module as BaseModule;
class {{class}} extends BaseModule
{

protected $moduleId='{{id}}';
protected $moduleName='{{name}}';
protected $moduleRouteNamePrefix='{{url_name}}';
protected $moduleUrlPrefix='{{url_name}}';
static protected $moduleId='{{id}}';
static protected $moduleName='{{name}}';
static protected $moduleRouteNamePrefix='{{url_name}}';
static protected $moduleUrlPrefix='{{url_name}}';

}
2 changes: 1 addition & 1 deletion src/Commands/stubs/MakeModule/index.blade.php.stub
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php /** @var {{namespace}}\{{id}}\{{class}} $this_module */ ?>
<?php /* @var $this_module {{namespace}}\{{id}}\{{class}} */ ?>
Module {{$this_module->name()}}
Loading