if (!empty($config['authors']) && is_array($config['authors'])) {
if (!empty($config['authors']) &&\is_array($config['authors'])) {
$package->setAuthors($config['authors']);
$package->setAuthors($config['authors']);
}
}
@ -233,7 +233,7 @@ class ArrayLoader implements LoaderInterface
$package->setSupport($config['support']);
$package->setSupport($config['support']);
}
}
if (!empty($config['funding']) && is_array($config['funding'])) {
if (!empty($config['funding']) &&\is_array($config['funding'])) {
$package->setFunding($config['funding']);
$package->setFunding($config['funding']);
}
}
@ -307,8 +307,8 @@ class ArrayLoader implements LoaderInterface
private function createLink($source, $sourceVersion, $description, $target, $prettyConstraint)
private function createLink($source, $sourceVersion, $description, $target, $prettyConstraint)
{
{
if (!is_string($prettyConstraint)) {
if (!\is_string($prettyConstraint)) {
throw new \UnexpectedValueException('Link constraint in '.$source.' '.$description.' > '.$target.' should be a string, got '.gettype($prettyConstraint) . ' (' . var_export($prettyConstraint, true) . ')');
throw new \UnexpectedValueException('Link constraint in '.$source.' '.$description.' > '.$target.' should be a string, got '.\gettype($prettyConstraint) . ' (' . var_export($prettyConstraint, true) . ')');
public function emptyDirectory($dir, $ensureDirectoryExists = true)
public function emptyDirectory($dir, $ensureDirectoryExists = true)
@ -116,7 +116,7 @@ class Filesystem
throw new \RuntimeException('Aborting an attempted deletion of '.$directory.', this was probably not intended, if it is a real use case please report it.');
throw new \RuntimeException('Aborting an attempted deletion of '.$directory.', this was probably not intended, if it is a real use case please report it.');