Skip to content

Rector removes use Statement used in multi line comment #9879

Description

@raphaelincert

Bug Report

Subject Details
Rector version 2.6.4

Rector removes use statement used in multi line comment

Minimal PHP Code Causing Issue

<?php

namespace Incert\Common\Auth2FA\Model;

use Doctrine\ORM\Mapping as ORM;
use Incert\Common\Auth2FA\Enum\Auth2FATypeEnum;
use Incert\Common\Auth2FA\Interfaces\Auth2FATypeInterface;
use JMS\Serializer\Annotation as Serializer;

/**
 * @ORM\Table(name="user_2fa")
 * @ORM\Entity()
 * @ORM\InheritanceType("SINGLE_TABLE")
 * @ORM\DiscriminatorColumn(name="2fa_type", type="string")
 * @ORM\DiscriminatorMap({
 *     Auth2FATypeEnum::TOTP           = User2FATotp::class,
 *     Auth2FATypeEnum::GOOGLE_AUTH    = User2FAGoogleAuth::class,
 *     Auth2FATypeEnum::EMAIL          = User2FAEmail::class,
 *     Auth2FATypeEnum::TRUSTED_DEVICE = User2FATrustedDevice::class,
 *     Auth2FATypeEnum::BACKUP_CODE    = User2FABackupCode::class
 * })
 * @ORM\HasLifecycleCallbacks()
 */
class User2FA implements Auth2FATypeInterface
{ }
./vendor/bin/rector --clear-cache Common/Auth2FA/Model/User2FA.php
 1/1 100%
1 file with changes
===================

1) Common/Auth2FA/Model/User2FA.php:5

    ---------- begin diff ----------
@@ Line 5 @@
 use DateTime;
 use Exception;
 use Doctrine\ORM\Mapping as ORM;
-use Incert\Common\Auth2FA\Enum\Auth2FATypeEnum;
 use Incert\Common\Auth2FA\Interfaces\Auth2FATypeInterface;
 use Incert\Common\Model\Customer;
 use JMS\Serializer\Annotation as Serializer;
    ----------- end diff -----------

Applied rules:



 [OK] 1 file has been changed by Rector

Expected Behaviour

No change

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions