Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds whether a variable is an array
<?php is_array(mixed $value): bool
<?php public function parseAutoloads(array $packageMap, PackageInterface $rootPackage, $filteredDevPackages = false)
{
$rootPackageMap = array_shift($packageMap);
if (is_array($filteredDevPackages)) {
$packageMap = array_filter($packageMap, function ($item) use ($filteredDevPackages) {
return !in_array($item[0]->getName(), $filteredDevPackages, true);
});
<?php }
if (!isset($autoload[$type]) || !is_array($autoload[$type])) {
continue;
}
if (null !== $package->getTargetDir() && $package !== $rootPackage) {
<?php throw new \RuntimeException($settingKey.' is not defined');
}
if (is_array($value)) {
$value = json_encode($value);
}
<?php $multiConfigValues = array(
'github-protocols' => array(
function ($vals) {
if (!is_array($vals)) {
return 'array expected';
}
<?php ),
'github-domains' => array(
function ($vals) {
if (!is_array($vals)) {
return 'array expected';
}
<?php ),
'gitlab-domains' => array(
function ($vals) {
if (!is_array($vals)) {
return 'array expected';
}
<?php $multiProps = array(
'keywords' => array(
function ($vals) {
if (!is_array($vals)) {
return 'array expected';
}
<?php ),
'license' => array(
function ($vals) {
if (!is_array($vals)) {
return 'array expected';
}
<?php foreach ($bits as $bit) {
$currentValue = isset($currentValue[$bit]) ? $currentValue[$bit] : null;
}
if (is_array($currentValue)) {
$value = array_merge($currentValue, $value);
}
}
<?php $rawVal = isset($rawContents[$key]) ? $rawContents[$key] : null;
if (is_array($value) && (!is_numeric(key($value)) || ($key === 'repositories' && null === $k))) {
$k .= Preg::replace('{^config\.}', '', $key . '.');
$this->listConfiguration($value, $rawVal, $output, $k, $showSource);
$k = $origK;
<?php continue;
}
if (is_array($value)) {
$value = array_map(function ($val) {
return is_array($val) ? json_encode($val) : $val;
}, $value);
<?php if (is_array($value)) {
$value = array_map(function ($val) {
return is_array($val) ? json_encode($val) : $val;
}, $value);
$value = '['.implode(', ', $value).']';
<?php {
$oldCwd = getcwd();
if ($repositories !== null && !is_array($repositories)) {
$repositories = (array) $repositories;
}
<?php $io->write('Checking github.com rate limit: ', false);
try {
$rate = $this->getGithubRateLimit('github.com');
if (!is_array($rate)) {
$this->outputResult($rate);
} elseif (10 > $rate['remaining']) {
$io->write('<warning>WARNING</warning>');
<?php $hadError = true;
} else {
if (!is_array($result)) {
$result = array($result);
}
foreach ($result as $message) {