-
Notifications
You must be signed in to change notification settings - Fork 176
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
10 changed files
with
38 additions
and
49 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 |
---|---|---|
|
@@ -9,13 +9,12 @@ | |
|
||
/** | ||
* @author William DURAND <[email protected]> | ||
* | ||
* @final | ||
*/ | ||
class BazingaJsTranslationBundle extends Bundle | ||
{ | ||
/** | ||
* @return void | ||
*/ | ||
public function build(ContainerBuilder $container) | ||
public function build(ContainerBuilder $container): void | ||
{ | ||
parent::build($container); | ||
|
||
|
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 |
---|---|---|
|
@@ -12,6 +12,8 @@ | |
/** | ||
* @author Adrien Russo <[email protected]> | ||
* @author Hugo Monteiro <[email protected]> | ||
* | ||
* @final | ||
*/ | ||
class DumpCommand extends Command | ||
{ | ||
|
@@ -42,10 +44,7 @@ public function __construct(TranslationDumper $dumper, $projectDir) | |
parent::__construct(); | ||
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
protected function configure() | ||
protected function configure(): void | ||
{ | ||
$this | ||
->setName('bazinga:js-translation:dump') | ||
|
@@ -79,20 +78,14 @@ protected function configure() | |
); | ||
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
protected function initialize(InputInterface $input, OutputInterface $output) | ||
protected function initialize(InputInterface $input, OutputInterface $output): void | ||
{ | ||
parent::initialize($input, $output); | ||
|
||
$this->targetPath = $input->getArgument('target') ?: sprintf('%s/../web/js', $this->kernelRootDir); | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
protected function execute(InputInterface $input, OutputInterface $output): int | ||
{ | ||
$formats = $input->getOption('format'); | ||
$merge = (object) array( | ||
|
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 |
---|---|---|
|
@@ -17,6 +17,8 @@ | |
|
||
/** | ||
* @author William DURAND <[email protected]> | ||
* | ||
* @final | ||
*/ | ||
class Controller | ||
{ | ||
|
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 |
---|---|---|
|
@@ -11,15 +11,12 @@ | |
/** | ||
* @author William DURAND <[email protected]> | ||
* @author Hugo Monteiro <[email protected]> | ||
* | ||
* @final | ||
*/ | ||
class BazingaJsTranslationExtension extends Extension | ||
{ | ||
/** | ||
* Load configuration. | ||
* | ||
* @return void | ||
*/ | ||
public function load(array $configs, ContainerBuilder $container) | ||
public function load(array $configs, ContainerBuilder $container): void | ||
{ | ||
$processor = new Processor(); | ||
$configuration = new Configuration($container->getParameter('kernel.debug')); | ||
|
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 |
---|---|---|
|
@@ -8,13 +8,12 @@ | |
|
||
/** | ||
* @author William DURAND <[email protected]> | ||
* | ||
* @internal | ||
*/ | ||
class AddLoadersPass implements CompilerPassInterface | ||
{ | ||
/** | ||
* @return void | ||
*/ | ||
public function process(ContainerBuilder $container) | ||
public function process(ContainerBuilder $container): void | ||
{ | ||
if (!$container->hasDefinition('bazinga.jstranslation.controller')) { | ||
return; | ||
|
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 |
---|---|---|
|
@@ -8,13 +8,12 @@ | |
|
||
/** | ||
* @author Hugo MONTEIRO <[email protected]> | ||
* | ||
* @internal | ||
*/ | ||
class TranslationResourceFilesPass implements CompilerPassInterface | ||
{ | ||
/** | ||
* @return void | ||
*/ | ||
public function process(ContainerBuilder $container) | ||
public function process(ContainerBuilder $container): void | ||
{ | ||
if (!$container->has('translator.default')) { | ||
return; | ||
|
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 |
---|---|---|
|
@@ -7,15 +7,12 @@ | |
|
||
/** | ||
* @author William DURAND <[email protected]> | ||
* | ||
* @final | ||
*/ | ||
class Configuration implements ConfigurationInterface | ||
{ | ||
/** | ||
* Generates the configuration tree builder. | ||
* | ||
* @return TreeBuilder The tree builder | ||
*/ | ||
public function getConfigTreeBuilder() | ||
public function getConfigTreeBuilder(): TreeBuilder | ||
{ | ||
$treeBuilder = new TreeBuilder('bazinga_js_translation'); | ||
|
||
|
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 |
---|---|---|
|
@@ -11,6 +11,8 @@ | |
/** | ||
* @author Adrien Russo <[email protected]> | ||
* @author Hugo Monteiro <[email protected]> | ||
* | ||
* @internal | ||
*/ | ||
class TranslationDumper | ||
{ | ||
|
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 |
---|---|---|
|
@@ -8,6 +8,8 @@ | |
* @author William DURAND <[email protected]> | ||
* @author Markus Poerschke <[email protected]> | ||
* @author Hugo MONTEIRO <[email protected]> | ||
* | ||
* @internal | ||
*/ | ||
class TranslationFinder | ||
{ | ||
|
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