Skip to content

Commit 9d9c184

Browse files
committed
[Rector] Remove @var from class constant
1 parent b0cf1f3 commit 9d9c184

13 files changed

+126
-305
lines changed

rector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Rector\CodeQuality\Rector\Return_\SimplifyUselessVariableRector;
1313
use Rector\CodeQuality\Rector\Ternary\UnnecessaryTernaryExpressionRector;
1414
use Rector\CodeQualityStrict\Rector\Variable\MoveVariableDeclarationNearReferenceRector;
15-
use Rector\CodingStyle\Rector\ClassConst\VarConstantCommentRector;
1615
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
1716
use Rector\Core\Configuration\Option;
1817
use Rector\Core\ValueObject\PhpVersion;
@@ -32,6 +31,7 @@
3231
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
3332
use Utils\Rector\PassStrictParameterToFunctionParameterRector;
3433
use Utils\Rector\RemoveErrorSuppressInTryCatchStmtsRector;
34+
use Utils\Rector\RemoveVarTagFromClassConstantRector;
3535
use Utils\Rector\UnderscoreToCamelCaseVariableNameRector;
3636

3737
return static function (ContainerConfigurator $containerConfigurator): void {
@@ -93,5 +93,5 @@
9393
$services->set(TernaryToNullCoalescingRector::class);
9494
$services->set(ListToArrayDestructRector::class);
9595
$services->set(MoveVariableDeclarationNearReferenceRector::class);
96-
$services->set(VarConstantCommentRector::class);
96+
$services->set(RemoveVarTagFromClassConstantRector::class);
9797
};

system/Cache/Handlers/BaseHandler.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,11 @@ abstract class BaseHandler implements CacheInterface
2424
/**
2525
* Reserved characters that cannot be used in a key or tag.
2626
* From https://github.com/symfony/cache-contracts/blob/c0446463729b89dd4fa62e9aeecc80287323615d/ItemInterface.php#L43
27-
*
28-
* @var string
2927
*/
3028
public const RESERVED_CHARACTERS = '{}()/\@:';
3129

3230
/**
3331
* Maximum key length.
34-
*
35-
* @var int
3632
*/
3733
public const MAX_KEY_LENGTH = PHP_INT_MAX;
3834

system/Cache/Handlers/FileHandler.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ class FileHandler extends BaseHandler
2222
{
2323
/**
2424
* Maximum key length.
25-
*
26-
* @var int
2725
*/
2826
public const MAX_KEY_LENGTH = 255;
2927

system/CodeIgniter.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,9 @@ class CodeIgniter
4343
{
4444
/**
4545
* The current version of CodeIgniter Framework
46-
*
47-
* @var string
4846
*/
4947
const CI_VERSION = '4.1.2';
5048

51-
/**
52-
* @var string
53-
*/
5449
private const MIN_PHP_VERSION = '7.3';
5550

5651
/**

system/Cookie/CookieInterface.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,25 @@ interface CookieInterface
2222
* Cookies will be sent in all contexts, i.e in responses to both
2323
* first-party and cross-origin requests. If `SameSite=None` is set,
2424
* the cookie `Secure` attribute must also be set (or the cookie will be blocked).
25-
*
26-
* @var string
2725
*/
2826
public const SAMESITE_NONE = 'none';
2927

3028
/**
3129
* Cookies are not sent on normal cross-site subrequests (for example to
3230
* load images or frames into a third party site), but are sent when a
3331
* user is navigating to the origin site (i.e. when following a link).
34-
*
35-
* @var string
3632
*/
3733
public const SAMESITE_LAX = 'lax';
3834

3935
/**
4036
* Cookies will only be sent in a first-party context and not be sent
4137
* along with requests initiated by third party websites.
42-
*
43-
* @var string
4438
*/
4539
public const SAMESITE_STRICT = 'strict';
4640

4741
/**
4842
* RFC 6265 allowed values for the "SameSite" attribute.
4943
*
50-
* @var string[]
51-
*
5244
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
5345
*/
5446
public const ALLOWED_SAMESITE_VALUES = [
@@ -60,8 +52,6 @@ interface CookieInterface
6052
/**
6153
* Expires date format.
6254
*
63-
* @var string
64-
*
6555
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date
6656
* @see https://tools.ietf.org/html/rfc7231#section-7.1.1.2
6757
*/

0 commit comments

Comments
 (0)