-
-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
/**
* @param string $name Package name to find the dependents of
* @param int|null $type One of Dependent::TYPE_*
* @return int<0, max>
*/
public function getDependentCount(string $name, ?int $type = null): int
{
$sql = 'SELECT COUNT(*) count FROM dependent WHERE packageName = :name';
$args = ['name' => $name];
if (null !== $type) {
$sql .= ' AND type = :type';
$args['type'] = $type;
}
return (int) $this->getEntityManager()->getConnection()->fetchOne($sql, $args);
}leads to
Query expects 1 placeholder, but 2 values are given.
no error expected
Metadata
Metadata
Assignees
Labels
No labels