Skip to content

Commit d967790

Browse files
rizqyhiagissept
authored andcommitted
chore: refactor AddTypeToConstRector
1 parent 40ba777 commit d967790

6 files changed

Lines changed: 15 additions & 39 deletions

File tree

rector.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,5 @@
1010
__DIR__ . '/tests',
1111
])
1212
->withRules([
13-
\Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector::class,
14-
\Rector\Php82\Rector\FuncCall\Utf8DecodeEncodeToMbConvertEncodingRector::class,
15-
\Rector\Php82\Rector\New_\FilesystemIteratorSkipDotsRector::class,
16-
\Rector\Php82\Rector\Class_\ReadOnlyClassRector::class,
17-
\Rector\Php82\Rector\Encapsed\VariableInStringInterpolationFixerRector::class,
13+
\Rector\Php83\Rector\ClassConst\AddTypeToConstRector::class,
1814
]);

src/Illuminate/Auth/Reminders/PasswordBroker.php

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,28 @@ class PasswordBroker {
88

99
/**
1010
* Constant representing a successfully sent reminder.
11-
*
12-
* @var int
1311
*/
14-
final const REMINDER_SENT = 'reminders.sent';
12+
final const string REMINDER_SENT = 'reminders.sent';
1513

1614
/**
1715
* Constant representing a successfully reset password.
18-
*
19-
* @var int
2016
*/
21-
final const PASSWORD_RESET = 'reminders.reset';
17+
final const string PASSWORD_RESET = 'reminders.reset';
2218

2319
/**
2420
* Constant representing the user not found response.
25-
*
26-
* @var int
2721
*/
28-
final const INVALID_USER = 'reminders.user';
22+
final const string INVALID_USER = 'reminders.user';
2923

3024
/**
3125
* Constant representing an invalid password.
32-
*
33-
* @var int
3426
*/
35-
final const INVALID_PASSWORD = 'reminders.password';
27+
final const string INVALID_PASSWORD = 'reminders.password';
3628

3729
/**
3830
* Constant representing an invalid token.
39-
*
40-
* @var int
4131
*/
42-
final const INVALID_TOKEN = 'reminders.token';
32+
final const string INVALID_TOKEN = 'reminders.token';
4333

4434
/**
4535
* The password reminder repository.

src/Illuminate/Foundation/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn
3030
*
3131
* @var string
3232
*/
33-
final const VERSION = '4.2.72';
33+
final const string VERSION = '4.2.72';
3434

3535
/**
3636
* Indicates if the application has "booted".

src/Illuminate/Support/Facades/Password.php

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,28 @@ class Password extends Facade {
77

88
/**
99
* Constant representing a successfully sent reminder.
10-
*
11-
* @var int
1210
*/
13-
final const REMINDER_SENT = 'reminders.sent';
11+
final const string REMINDER_SENT = 'reminders.sent';
1412

1513
/**
1614
* Constant representing a successfully reset password.
17-
*
18-
* @var int
1915
*/
20-
final const PASSWORD_RESET = 'reminders.reset';
16+
final const string PASSWORD_RESET = 'reminders.reset';
2117

2218
/**
2319
* Constant representing the user not found response.
24-
*
25-
* @var int
2620
*/
27-
final const INVALID_USER = 'reminders.user';
21+
final const string INVALID_USER = 'reminders.user';
2822

2923
/**
3024
* Constant representing an invalid password.
31-
*
32-
* @var int
3325
*/
34-
final const INVALID_PASSWORD = 'reminders.password';
26+
final const string INVALID_PASSWORD = 'reminders.password';
3527

3628
/**
3729
* Constant representing an invalid token.
38-
*
39-
* @var int
4030
*/
41-
final const INVALID_TOKEN = 'reminders.token';
31+
final const string INVALID_TOKEN = 'reminders.token';
4232

4333
/**
4434
* Get the registered name of the component.

src/Illuminate/View/FileViewFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class FileViewFinder implements ViewFinderInterface {
4444
*
4545
* @var string
4646
*/
47-
final const HINT_PATH_DELIMITER = '::';
47+
final const string HINT_PATH_DELIMITER = '::';
4848

4949
/**
5050
* Create a new file view loader instance.

tests/Exception/HandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class HandlerTest extends TestCase
1515
{
1616
use ProphecyTrait;
1717

18-
private const DEBUG_ENABLED = true;
19-
private const DEBUG_DISABLED = false;
18+
private const bool DEBUG_ENABLED = true;
19+
private const bool DEBUG_DISABLED = false;
2020

2121
private ObjectProphecy|ResponsePreparerInterface $responsePreparer;
2222
private ObjectProphecy|ExceptionDisplayerInterface $plainDisplayer;

0 commit comments

Comments
 (0)