VKCOM / noverify

Pretty fast linter (code static analysis utility) for PHP
MIT License
673 stars 57 forks source link

Check uninitialized properties #1138

Open i582 opened 3 years ago

i582 commented 3 years ago

PHP Version: 7.4 and 8.0

OS: macOS

The minimal code in which the bug appears:

<?php

class User { 
    public string $firstName; 
    public string $lastName;
}

$user = new User(); 
$firstName = $user->firstName;

Actual Behavior:

No error.

Expected Behavior:

Warning about uninitialized property.