What are common pitfalls to avoid when documenting PHP classes?

One common pitfall to avoid when documenting PHP classes is not providing enough detail or clarity in the documentation. To solve this, make sure to include thorough explanations of each class property, method, and parameter, as well as any relevant examples or use cases.

/**
 * Class User
 * Represents a user object with basic information.
 */
class User {
    /**
     * @var string The username of the user.
     */
    public $username;

    /**
     * @var string The email address of the user.
     */
    public $email;

    /**
     * Constructor for creating a new User object.
     * 
     * @param string $username The username of the user.
     * @param string $email The email address of the user.
     */
    public function __construct($username, $email) {
        $this->username = $username;
        $this->email = $email;
    }

    /**
     * Get the username of the user.
     * 
     * @return string The username of the user.
     */
    public function getUsername() {
        return $this->username;
    }

    /**
     * Get the email address of the user.
     * 
     * @return string The email address of the user.
     */
    public function getEmail() {
        return $this->email;
    }
}