FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
rector-phpunit/rector.php at main · rectorphp/rector-phpunit · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
rectorphp
/
rector-phpunit
Public
Notifications
You must be signed in to change notification settings
Fork
71
Star
117
Code
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
rector-phpunit
/
rector.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
48 lines (44 loc) · 1.28 KB
Breadcrumbs
rector-phpunit
/
rector.php
Copy path
File metadata and controls
48 lines (44 loc) · 1.28 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
declare
(strict_types=
1
);
use
Rector
\
Config
\
RectorConfig
;
use
Rector
\
Php55
\
Rector
\
String_
\
StringClassNameToClassConstantRector
;
return
RectorConfig::
configure
()
->
withImportNames
(removeUnusedImports:
true
)
->
withPaths
([
__DIR__
.
'
/config
'
,
__DIR__
.
'
/src
'
,
__DIR__
.
'
/tests
'
,
__DIR__
.
'
/rules
'
,
__DIR__
.
'
/rules-tests
'
,
])
->
withRootFiles
()
->
withSkip
([
// for tests
'
*/Source/*
'
,
'
*/Fixture/*
'
,
'
*/Expected/*
'
,
// object types must be string as class might be missing + to keep downgrade safe
StringClassNameToClassConstantRector::class => [
__DIR__
.
'
/config
'
,
__DIR__
.
'
/src/Enum
'
,
],
])
->
withPhpSets
()
->
withAttributesSets
()
->
withPreparedSets
(
deadCode:
true
,
codeQuality:
true
,
codingStyle:
true
,
typeDeclarations:
true
,
privatization:
true
,
naming:
true
,
earlyReturn:
true
,
rectorPreset:
true
,
phpunitCodeQuality:
true
,
symfonyCodeQuality:
true
,
)
->
withConfiguredRule
(StringClassNameToClassConstantRector::class, [
// keep unprefixed to protected from downgrade
'
PHPUnit\Framework\*
'
,
'
Prophecy\Prophet
'
,
]);
Back
|
FazBrowse Home
|
New Git URL