Skip to content

Commit

Permalink
Merge pull request #6 from hungthai1401/feature/datetime-quote
Browse files Browse the repository at this point in the history
Feature/datetime quote
  • Loading branch information
hungthai1401 committed Jul 5, 2023
2 parents 18a6212 + 4cf0766 commit a56871a
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 2,556 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/vendor
.idea
composer.lock
.php-cs-fixer.cache
49 changes: 49 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$finder = Finder::create()
->in(__DIR__)
->exclude([
'vendor',
'tests/Commands/__snapshots__',
])
;

return (new Config())
->setFinder($finder)
->setRules([
'@PSR2' => true,
// Concatenation should be used with at least one whitespace around.
'concat_space' => ['spacing' => 'one'],
// Unused use statements must be removed.
'ordered_imports' => true,
// Removes extra empty lines.
'no_extra_blank_lines' => true,
// An empty line feed should precede a return statement.
'blank_line_before_statement' => true,
// Unused use statements must be removed.
'no_unused_imports' => true,
// Remove trailing whitespace at the end of blank lines.
'no_whitespace_in_blank_line' => true,
// There MUST be one blank line after the namespace declaration.
'blank_line_after_namespace' => true,
// There should be exactly one blank line before a namespace declaration.
'blank_lines_before_namespace' => true,
// Each namespace use MUST go on its own line and there MUST be one blank line after the use statements block.
'single_line_after_imports' => true,
// Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline.
'blank_line_after_opening_tag' => true,
// Remove duplicated semicolons.
'no_empty_statement' => true,
// PHP multi-line arrays should have a trailing comma.
'trailing_comma_in_multiline' => true,
// There should be no empty lines after class opening brace.
'no_blank_lines_after_class_opening' => true,
// There should not be blank lines between docblock and the documented element.
'no_blank_lines_after_phpdoc' => true,
// Phpdocs should start and end with content, excluding the very first and last line of the docblocks.
'phpdoc_trim' => true,
])
;
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
}
],
"require-dev": {
"laravel/framework": "^5.8"
"laravel/framework": "> 5.8",
"friendsofphp/php-cs-fixer": "^3.20"
},
"autoload": {
"psr-4": {
Expand All @@ -22,6 +23,10 @@
]
}
},
"scripts": {
"lint": "vendor/bin/php-cs-fixer fix --dry-run",
"lint:fix": "vendor/bin/php-cs-fixer fix --verbose"
},
"minimum-stability": "dev",
"prefer-stable": true
}

0 comments on commit a56871a

Please sign in to comment.