-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
120 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,58 @@ | ||
{ | ||
"name": "dariusiii/illuminate-romans", | ||
"description": "Laravel Illuminate Romans Integration", | ||
"type": "library", | ||
"license": "MIT", | ||
"keywords": ["laravel", "illuminate", "roman", "roman-number", "roman-numeral", "converter", "format", "validator"], | ||
"require": { | ||
"php": ">=7.0", | ||
"wandersonwhcr/romans": "^1.0", | ||
"illuminate/support": "^6.0" | ||
}, | ||
"require-dev": { | ||
"doctrine/instantiator": "^1.0", | ||
"illuminate/container": "^6.0", | ||
"illuminate/contracts": "^6.0", | ||
"jakub-onderka/php-parallel-lint": "^0.9", | ||
"phpmd/phpmd": "^2.6", | ||
"phpunit/phpunit": "^6.3", | ||
"sebastian/phpcpd": "^3.0", | ||
"squizlabs/php_codesniffer": "^2.8" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Illuminate\\Romans\\": "src/" | ||
}, | ||
"files": [ | ||
"src/helpers.php" | ||
] | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"IlluminateTest\\Romans\\": "test/" | ||
} | ||
}, | ||
"scripts": { | ||
"test": [ | ||
"parallel-lint src", | ||
"phpunit", | ||
"phpcpd src", | ||
"phpmd src text phpmd.xml", | ||
"phpcs" | ||
] | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-develop": "1.0.x-dev" | ||
}, | ||
"laravel": { | ||
"providers": [ | ||
"Illuminate\\Romans\\Providers\\RomansProvider" | ||
], | ||
"aliases": { | ||
"IntToRoman": "Illuminate\\Romans\\Support\\Facades\\IntToRoman", | ||
"RomanToInt": "Illuminate\\Romans\\Support\\Facades\\RomanToInt" | ||
} | ||
} | ||
} | ||
} | ||
{ | ||
"name": "dariusiii/illuminate-romans", | ||
"description": "Laravel Illuminate Romans Integration", | ||
"type": "library", | ||
"license": "MIT", | ||
"keywords": ["laravel", "illuminate", "roman", "roman-number", "roman-numeral", "converter", "format", "validator"], | ||
"require": { | ||
"php": ">=7.0", | ||
"wandersonwhcr/romans": "^1.0", | ||
"illuminate/support": "^6.0" | ||
}, | ||
"require-dev": { | ||
"doctrine/instantiator": "^1.0", | ||
"illuminate/container": "^6.0", | ||
"illuminate/contracts": "^6.0", | ||
"jakub-onderka/php-parallel-lint": "^0.9", | ||
"phpmd/phpmd": "^2.6", | ||
"phpunit/phpunit": "^6.3", | ||
"sebastian/phpcpd": "^3.0", | ||
"squizlabs/php_codesniffer": "^2.8" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Illuminate\\Romans\\": "src/" | ||
}, | ||
"files": [ | ||
"src/helpers.php" | ||
] | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"IlluminateTest\\Romans\\": "test/" | ||
} | ||
}, | ||
"scripts": { | ||
"test": [ | ||
"parallel-lint src", | ||
"phpunit", | ||
"phpcpd src", | ||
"phpmd src text phpmd.xml", | ||
"phpcs" | ||
] | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-develop": "1.0.x-dev" | ||
}, | ||
"laravel": { | ||
"providers": [ | ||
"Illuminate\\Romans\\Providers\\RomansProvider" | ||
], | ||
"aliases": { | ||
"IntToRoman": "Illuminate\\Romans\\Support\\Facades\\IntToRoman", | ||
"RomanToInt": "Illuminate\\Romans\\Support\\Facades\\RomanToInt" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
<?php | ||
|
||
namespace Illuminate\Romans\Providers; | ||
|
||
use Illuminate\Contracts\Support\DeferrableProvider; | ||
use Illuminate\Support\ServiceProvider; | ||
use Romans\Filter\IntToRoman as IntToRomanFilter; | ||
use Romans\Filter\RomanToInt as RomanToIntFilter; | ||
use Romans\Grammar\Grammar; | ||
use Romans\Lexer\Lexer; | ||
use Romans\Parser\Parser; | ||
|
||
/** | ||
* Romans Provider | ||
*/ | ||
class RomansProvider extends ServiceProvider implements DeferrableProvider | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected $defer = true; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function provides() | ||
{ | ||
return [ | ||
Grammar::class, | ||
Lexer::class, | ||
Parser::class, | ||
IntToRomanFilter::class, | ||
RomanToIntFilter::class, | ||
]; | ||
} | ||
|
||
/** | ||
* Register Romans Services | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
$this->app->singleton(Grammar::class); | ||
|
||
$this->app->singleton(Lexer::class); | ||
|
||
$this->app->singleton(Parser::class); | ||
|
||
$this->app->singleton(IntToRomanFilter::class); | ||
|
||
$this->app->singleton(RomanToIntFilter::class); | ||
$this->app->resolving(RomanToIntFilter::class, function ($element, $app) { | ||
$element->setLexer($app->make(Lexer::class)); | ||
$element->setParser($app->make(Parser::class)); | ||
return $element; | ||
}); | ||
|
||
$this->app->alias(IntToRomanFilter::class, 'intToRoman'); | ||
$this->app->alias(RomanToIntFilter::class, 'romanToInt'); | ||
} | ||
} | ||
<?php | ||
|
||
namespace Illuminate\Romans\Providers; | ||
|
||
use Illuminate\Contracts\Support\DeferrableProvider; | ||
use Illuminate\Support\ServiceProvider; | ||
use Romans\Filter\IntToRoman as IntToRomanFilter; | ||
use Romans\Filter\RomanToInt as RomanToIntFilter; | ||
use Romans\Grammar\Grammar; | ||
use Romans\Lexer\Lexer; | ||
use Romans\Parser\Parser; | ||
|
||
/** | ||
* Romans Provider | ||
*/ | ||
class RomansProvider extends ServiceProvider implements DeferrableProvider | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected $defer = true; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function provides() | ||
{ | ||
return [ | ||
Grammar::class, | ||
Lexer::class, | ||
Parser::class, | ||
IntToRomanFilter::class, | ||
RomanToIntFilter::class, | ||
]; | ||
} | ||
|
||
/** | ||
* Register Romans Services | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
$this->app->singleton(Grammar::class); | ||
|
||
$this->app->singleton(Lexer::class); | ||
|
||
$this->app->singleton(Parser::class); | ||
|
||
$this->app->singleton(IntToRomanFilter::class); | ||
|
||
$this->app->singleton(RomanToIntFilter::class); | ||
$this->app->resolving(RomanToIntFilter::class, function ($element, $app) { | ||
$element->setLexer($app->make(Lexer::class)); | ||
$element->setParser($app->make(Parser::class)); | ||
return $element; | ||
}); | ||
|
||
$this->app->alias(IntToRomanFilter::class, 'intToRoman'); | ||
$this->app->alias(RomanToIntFilter::class, 'romanToInt'); | ||
} | ||
} |