It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.
If you suppress an error, we recommend checking for the error condition explicitly:
// For example instead of@mkdir($dir);// Better useif(@mkdir($dir)===false){thrownew\RuntimeException('The directory '.$dir.' could not be created.');}
Loading history...
78
return true;
79
}
80
}
81
82
/**
83
* @param mixed $value
84
* @return bool
85
*/
86
public function match($value): bool
87
{
88
return $this->matchScalar($this->name, $value);
89
}
90
91
/**
92
* @param string $name
93
* @return bool
94
*/
95
private function isBuiltin(string $name): bool
96
{
97
return \function_exists('\\is_' . $name);
98
}
99
100
/**
101
* @param string $name
102
* @param mixed $value
103
* @return bool
104
*/
105
private function matchBuiltin(string $name, $value): bool
If you suppress an error, we recommend checking for the error condition explicitly: