php storm не видит переменную
Подскажите пожалуйста, не могу понять почему переменная $gender не определена, в то время когда другие переменные определены таким же способом и при этом видны? https://hostfotos.ru/images/2020/02/15/SNIMOK-EKRANA-2020-02-15-V-11.06.10.png https://hostfotos.ru/images/2020/02/15/SNIMOK-EKRANA-2020-02-15-V-11.05.45.png
MODEL
public static function checkCityExist($from_city)
{
include_once 'config/arrays/citys.php';
if ($from_city != "" and array_key_exists($from_city, $my_city) == $from_city) {
return true;
}
return false;
}
public static function checkVars($password, $name, $gender, $birth_day, $birth_month, $birth_year, $height, $weight, $about){
if ($password != '' and $name != '' and $gender = '' and $birth_day != '' and $birth_month != '' and $birth_year != '' and $height !='' and $weight != '' and $about != '') {
return true;
}
return false;
}
CONTROLLER
include_once(ROOT . '/models/User.php');
class RegController
{
public function actionIndex()
{
if (isset($_POST['password']) and isset($_POST['name']) and isset($_POST['name']) and isset($_POST['gender']) and isset($_POST['birth_day']) and isset($_POST['birth_month']) and isset($_POST['birth_year']) and isset($_POST['height']) and isset($_POST['weight']) and isset($_POST['about'])) {
$password = $_POST['password'];
$name = $_POST['name'];
$gender = $_POST['gender'];
$birth_day = $_POST['birth_day'];
$birth_month = $_POST['birth_month'];
$birth_year = $_POST['birth_year'];
$height = $_POST['height'];
$weight = $_POST['weight'];
$about = $_POST['about'];
$errors = false;
if (!User::checkVars($password, $name, $gender, $birth_day, $birth_month, $birth_year, $height, $weight, $about)) {
$errors = "*Не заполнены обязательные поля!\n";
}
if ($errors == false) {
header("Location: /saved");
exit;
}
}
require_once(ROOT . '/views/users/reg.php');
return true;
}
}