Install
docker run -v $(pwd):/usr/src/app -w /usr/src/app node:9 npm install
let formatter = new Intl.NumberFormat('pt-BR', { | |
style: 'currency', | |
currency: 'BRL', | |
currencyDisplay: "symbol", | |
minimumFractionDigits: 2, | |
}); | |
formatter.format('123456.90')); // R$ 123.456,90 | |
formatter.format('12.3456.90')); // NaN | |
formatter.format('12,3456.90')); // NaN |
Install
docker run -v $(pwd):/usr/src/app -w /usr/src/app node:9 npm install
phpcs --standard=PSR2 --colors --error-severity=1 --ignore='*blade.php*,*twig.php*' --tab-width=4 --encoding=utf-8 --extensions=php -d memory_limit=32M -n -s --report=full --report-width=auto app/ | |
phpcbf --standard=PSR2 --colors --error-severity=1 --ignore='*blade.php*,*twig.php*' --tab-width=4 --encoding=utf-8 --extensions=php -d memory_limit=32M -n app/ | |
php-cs-fixer --diff -v --using-cache=no --rules=@PSR2,@Symfony fix app/ | |
phpmd app/ html cleancode,codesize,controversial,design,naming,unusedcode --suffixes php > phpmd.html | |
phpcpd --no-interaction --progress --min-lines=4 --min-tokens=40 app/ |
php artisan clear-compiled | |
php artisan cache:clear | |
php artisan config:clear | |
php artisan config:cache | |
php artisan view:cache | |
php artisan route:cache | |
php artisan optimize |
# EditorConfig is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# all files | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 4 |
## Optional: if you've been playing around with permissions consider resetting all files and directories to the default. | |
sudo find ./ -type d -exec chmod 755 {} \; | |
sudo find ./ -type f -exec chmod 644 {} \; | |
## Give users part of the laravel group the standard RW and RWX permissions for the existing files and folders respectively. | |
sudo find ./storage -type d -exec chmod 775 {} \; | |
sudo find ./bootstrap/cache -type d -exec chmod 775 {} \; | |
sudo find ./storage -type f -exec chmod 664 {} \; | |
sudo find ./bootstrap/cache -type f -exec chmod 664 {} \; |
# ########################## | |
# PHP Coding Standards Fixer | |
# ########################## | |
php-cs-fixer fix Controller.php --rules=@PSR2 --dry-run --diff - | |
php-cs-fixer fix Controller.php --rules=@PSR2 -v | |
php-cs-fixer fix app/Http/Controllers --dry-run --verbose --diff --using-cache=no | |
php-cs-fixer --dry-run --diff --using-cache=no --rules=@PSR2,@Symfony fix Controller.php | |
php-cs-fixer --dry-run --diff --using-cache=no --rules=@PSR2,@Symfony fix Controller.php ResponseController.php |
composer global require phpunit/phpunit @stable | |
composer global require phpunit/dbunit @stable | |
composer global require "phpunit/php-invoker=~1.1." | |
composer global require sebastian/phpcpd | |
composer global require friendsofphp/php-cs-fixer | |
composer global require "squizlabs/php_codesniffer=*" | |
composer global require phpmd/phpmd:@stable | |
composer global require phploc/phploc:@stable | |
composer global require phpstan/phpstan |
De acordo com o próprio criador, Eric Evans, DDD não é uma tecnologia e nem uma metodologia. DDD é um estilo de arquitetura orientado a objetos, focado em modelar o domínio do negócio e a lógica do domínio com o uso de técnicas, práticas e padrões de projeto.