FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
SimPay-API-php/rector.php at main · SimPaypl/SimPay-API-php · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
SimPaypl
/
SimPay-API-php
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
3
Code
Issues
0
Pull requests
2
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
SimPay-API-php
/
rector.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (30 loc) · 1.59 KB
Breadcrumbs
SimPay-API-php
/
rector.php
Copy path
File metadata and controls
37 lines (30 loc) · 1.59 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
<?php
use
Rector
\
Caching
\
ValueObject
\
Storage
\
FileCacheStorage
;
use
Rector
\
CodeQuality
\
Rector
\
Identical
\
FlipTypeControlToUseExclusiveTypeRector
;
use
Rector
\
CodeQuality
\
Rector
\
Identical
\
SimplifyBoolIdenticalTrueRector
;
use
Rector
\
Config
\
RectorConfig
;
use
Rector
\
Core
\
ValueObject
\
PhpVersion
;
use
Rector
\
DeadCode
\
Rector
\
Property
\
RemoveUnusedPrivatePropertyRector
;
use
Rector
\
Set
\
ValueObject
\
SetList
;
return
static
function
(
RectorConfig
$
rectorConfig
):
void
{
$
rectorConfig
->
import
(SetList::
CODE_QUALITY
);
$
rectorConfig
->
import
(SetList::
DEAD_CODE
);
$
rectorConfig
->
import
(SetList::
PHP_74
);
$
rectorConfig
->
import
(SetList::
TYPE_DECLARATION
);
// Ensure file system caching is used instead of in-memory.
$
rectorConfig
->
cacheClass
(FileCacheStorage::class);
// Specify a path that works locally as well as on CI job runners.
$
rectorConfig
->
cacheDirectory
(
'
.cache/rector
'
);
// paths to refactor; solid alternative to CLI arguments
$
rectorConfig
->
paths
([
__DIR__
.
'
/src
'
,
__DIR__
.
'
/tests
'
,
__DIR__
.
'
/ecs.php
'
,
__DIR__
.
'
/docs/examples
'
]);
$
rectorConfig
->
skip
([
//temporary skip because throw error https://github.com/rectorphp/rector/issues/7480
SimplifyBoolIdenticalTrueRector::class,
FlipTypeControlToUseExclusiveTypeRector::class,
]);
// register single rule
$
rectorConfig
->
rule
(RemoveUnusedPrivatePropertyRector::class);
// is your PHP version different from the one your refactor to? [default: your PHP version], uses PHP_VERSION_ID format
$
rectorConfig
->
phpVersion
(PhpVersion::
PHP_74
);
$
rectorConfig
->
importShortClasses
();
};
Back
|
FazBrowse Home
|
New Git URL