Skip to content

Commit b394020

Browse files
committed
Moved PHP-CS-Fixer to dev dependency
1 parent 5fca531 commit b394020

File tree

6 files changed

+57
-45
lines changed

6 files changed

+57
-45
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.idea
2-
.php_cs
3-
.php_cs.cache
2+
.php-cs-fixer.php
3+
.php-cs-fixer.cache
44
.phpunit.result.cache
55
build
66
composer.lock

.php-cs-fixer.dist.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
use PhpCsFixer\Config;
4+
use PhpCsFixer\Finder;
5+
6+
$rules = [
7+
'@PSR2' => true,
8+
'array_indentation' => true,
9+
'array_syntax' => ['syntax' => 'short'],
10+
'binary_operator_spaces' => true,
11+
'blank_line_before_statement' => [
12+
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
13+
],
14+
'class_attributes_separation' => [
15+
'elements' => ['const' => 'one','method' => 'one','property' => 'one'],
16+
],
17+
'concat_space' => ['spacing' => 'one'],
18+
'method_argument_space' => [
19+
'on_multiline' => 'ensure_fully_multiline',
20+
'keep_multiple_spaces_after_comma' => true,
21+
],
22+
'method_chaining_indentation' => true,
23+
'no_unused_imports' => true,
24+
'not_operator_with_successor_space' => false,
25+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
26+
'phpdoc_scalar' => true,
27+
'phpdoc_single_line_var_spacing' => true,
28+
'phpdoc_var_without_name' => true,
29+
'return_type_declaration' => true,
30+
'single_quote' => true,
31+
'single_trait_insert_per_statement' => true,
32+
'trailing_comma_in_multiline' => true,
33+
'unary_operator_spaces' => true,
34+
];
35+
36+
$finder = Finder::create()
37+
->in([
38+
__DIR__ . '/src',
39+
__DIR__ . '/tests',
40+
])
41+
->name('*.php')
42+
->notName('*.blade.php')
43+
->ignoreDotFiles(true)
44+
->ignoreVCS(true);
45+
46+
return (new Config())
47+
->setRules($rules)
48+
->setFinder($finder);

.php_cs.dist

Lines changed: 0 additions & 40 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `laravel-twilio-verify` will be documented in this file.
44

5+
## 0.0.1 - 2021-06-28
6+
7+
- Moved PHP-CS-Fixer to dev dependency.
8+
59
## 0.0.0 - 2021-04-26
610

7-
- initial release
11+
- Initial release.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
],
1919
"require": {
2020
"php": "^8.0",
21-
"friendsofphp/php-cs-fixer": "^2.18",
2221
"guzzlehttp/guzzle": "^7.0.1",
2322
"illuminate/contracts": "^8.0",
2423
"spatie/laravel-package-tools": "^1.4.3"
2524
},
2625
"require-dev": {
2726
"brianium/paratest": "^6.2",
27+
"friendsofphp/php-cs-fixer": "3.0.0",
2828
"nunomaduro/collision": "^5.3",
2929
"orchestra/testbench": "^6.15",
3030
"phpunit/phpunit": "^9.3",

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function setUp(): void
1313
parent::setUp();
1414

1515
Factory::guessFactoryNamesUsing(
16-
fn (string $modelName) => 'Spatie\\TwilioVerify\\Database\\Factories\\'.class_basename($modelName).'Factory'
16+
fn (string $modelName) => 'Spatie\\TwilioVerify\\Database\\Factories\\' . class_basename($modelName) . 'Factory'
1717
);
1818
}
1919

0 commit comments

Comments
 (0)