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...
25
if (@symlink($src, $dst) === false) {
26
if (!file_exists($dst)) {
27
$event->getIO()->write(sprintf('Failed to symlink %s from %s.', $src, $dst));
The expression $matches of type integer|null is loosely compared to true; this is ambiguous if the integer can be zero. You might want to explicitly use !== null instead.
In PHP, under loose comparison (like ==, or !=, or switch conditions),
values of different types might be equal.
For integer values, zero is a special case, in particular the following
results might be unexpected:
0==false// true0==null// true123==false// false123==null// false// It is often better to use strict comparison0===false// false0===null// false
Loading history...
46
file_put_contents($file, $content, LOCK_EX);
47
$event->getIO()->write('Updated spacing for incenteev parameters');
If you suppress an error, we recommend checking for the error condition explicitly: