potsky / laravel-localization-helpers

🎌 Artisan commands to generate and update lang files automatically
GNU General Public License v3.0
187 stars 39 forks source link

Php >= 5.4 array syntax #34

Closed cdarken closed 8 years ago

cdarken commented 8 years ago

It would be nice if the exported arrays would use the new syntax for arrays. I know var_export still uses array() notation, but I found this http://stackoverflow.com/a/24316457 and it seems to be working in my tests. If it's ok for you I could create a pull request with it.

potsky commented 8 years ago

Hi !

You should take a look at the code_style configuration parameter in your configuration file and use the correct PSR setting according to your array style.

cdarken commented 8 years ago

Ah, didn't know about that setting. I will take a look at it. Thanks. If this fixed my problem, I will close the issue.

cdarken commented 8 years ago

Do you know which fixer will output the array like this (keep opening [ on the same line as => ) ?

'key1' => [
            'key1_1' => 'Translation',
],
cdarken commented 8 years ago

It doesn't seem to be. It's fine like this though. Thanks a lot! Great package, very useful.