File tree Expand file tree Collapse file tree 4 files changed +58
-2
lines changed Expand file tree Collapse file tree 4 files changed +58
-2
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ $ finder = PhpCsFixer \Finder::create ()->in (__DIR__ );
4
+
5
+ $ config = new PhpCsFixer \Config ();
6
+ return $ config
7
+ ->setFinder ($ finder )
8
+ ->setUsingCache (true )
9
+ ->setRules ([
10
+ '@PSR2 ' => true ,
11
+ 'blank_line_after_opening_tag ' => true ,
12
+ 'ordered_imports ' => true ,
13
+ 'no_unused_imports ' => true ,
14
+ 'array_syntax ' => ['syntax ' => 'short ' ],
15
+ ]);
Original file line number Diff line number Diff line change
1
+ .PHONY : help
2
+ help : # ! Show this help message
3
+ @echo ' Usage: make [target] ... '
4
+ @echo ' '
5
+ @echo ' Targets:'
6
+ @grep -h -F ' #!' $(MAKEFILE_LIST ) | grep -v grep | sed ' s/:.*#!/:/' | column -t -s" :"
7
+
8
+ .PHONY : test
9
+ test : # ! Run unit tests
10
+ php -d xdebug.mode=coverage vendor/bin/phpunit
11
+
12
+ .PHONY : coverage
13
+ coverage : # ! Run unit tests with test coverage
14
+ php -d xdebug.mode=coverage vendor/bin/phpunit
15
+
16
+ .PHONY : lint
17
+ lint : # ! Run quality control tools (e.g. psalm)
18
+ ./vendor/bin/psalm --no-cache
19
+ composer cs-check
Original file line number Diff line number Diff line change 21
21
],
22
22
"require" : {
23
23
"php" : " >=8.1" ,
24
- "launchdarkly/server-sdk" : " >=6.4 .0 <7.0.0"
24
+ "launchdarkly/server-sdk" : " >=6.3 .0 <7.0.0"
25
25
},
26
26
"require-dev" : {
27
- "phpunit/phpunit" : " ^9"
27
+ "friendsofphp/php-cs-fixer" : " ^3.68" ,
28
+ "phpunit/php-code-coverage" : " ^9" ,
29
+ "phpunit/phpunit" : " ^9" ,
30
+ "vimeo/psalm" : " ^5"
28
31
},
29
32
"autoload" : {
30
33
"psr-4" : {
38
41
},
39
42
"config" : {
40
43
"sort-packages" : true
44
+ },
45
+ "scripts" : {
46
+ "cs-check" : " vendor/bin/php-cs-fixer fix --diff --dry-run --verbose --config=.php-cs-fixer.php" ,
47
+ "cs-fix" : " vendor/bin/php-cs-fixer fix --diff --verbose --config=.php-cs-fixer.php"
41
48
}
42
49
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <psalm
3
+ errorLevel =" 2"
4
+ resolveFromConfigFile =" true"
5
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
6
+ xmlns =" https://getpsalm.org/schema/config"
7
+ xsi : schemaLocation =" https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8
+ >
9
+ <projectFiles >
10
+ <directory name =" src" />
11
+ <ignoreFiles >
12
+ <directory name =" vendor" />
13
+ </ignoreFiles >
14
+ </projectFiles >
15
+ </psalm >
You can’t perform that action at this time.
0 commit comments