Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
cesargb committed Oct 20, 2023
1 parent 892c559 commit e91d7f6
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 45 deletions.
28 changes: 1 addition & 27 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,5 @@
->ignoreVCS(true);

return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
],
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
],
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
],
'single_trait_insert_per_statement' => true,
'php_unit_method_casing' => ['case' => 'camel_case'],
])
->setRules(Descom\Common\CsFixer::rules())
->setFinder($finder);
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Via Composer

```bash
composer require descom/package_name
composer require descom/common
```

## Usage
Expand Down
16 changes: 7 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "descom/skeleton",
"description": "package_description",
"name": "descom/common",
"description": "Package to PHP projects in Descom.es",
"type": "library",
"require": {
"php": "^8.0"
},
"homepage": "https://github.com/descom/skeleton",
"homepage": "https://github.com/descom-es/php-common",
"license": "MIT",
"authors": [
{
Expand All @@ -22,18 +22,16 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.4",
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^1.9"
"friendsofphp/php-cs-fixer": "^3.35",
"phpunit/phpunit": "^9.5"
},
"autoload": {
"psr-4": {
"Descom\\Skeleton\\": "src"
"Descom\\Common\\": "src"
}
},
"scripts": {
"test": "vendor/bin/phpunit --colors=always",
"style": "vendor/bin/php-cs-fixer fix",
"analyse": "vendor/bin/phpstan analyse"
"style": "vendor/bin/php-cs-fixer fix"
}
}
37 changes: 37 additions & 0 deletions src/CsFixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

namespace Descom\Common;

class CsFixer
{
public static function rules(): array
{
return [
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
],
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
],
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
],
'single_trait_insert_per_statement' => true,
'php_unit_method_casing' => ['case' => 'camel_case'],
];
}
}
8 changes: 0 additions & 8 deletions src/Skeleton.php

This file was deleted.

0 comments on commit e91d7f6

Please sign in to comment.