src/Composer/Repository/Pear/PackageDependencyParser.php
private function buildDepPackageConstraints($depItem, $depType)
    {
        if ($this->isHash($depItem)) {
            $depItem = array($depItem);
        }

        $result = array();
        foreach ($depItem as $subDepItem) {
            if (!array_key_exists('channel', $subDepItem)) {
                $subDepItem['channel'] = $subDepItem['uri'];
            }
            $depChannelName = $subDepItem['channel'];
            $depPackageName = $subDepItem['name'];
            $depVersionConstraint = $this->parse20VersionConstraint($subDepItem);
            if (isset($subDepItem['conflicts'])) {
                $depType = 'conflicts';
            }

            $result[] = new DependencyConstraint(
                $depType,
                $depVersionConstraint,
                $depChannelName,
                $depPackageName
            );
        }

        return $result;
    }
private function buildDepPackageConstraints($depItem, $depType)
    {
        if ($this->isHash($depItem)) {
            $depItem = array($depItem);
        }

        $result = array();
        foreach ($depItem as $subDepItem) {
            if (!array_key_exists('channel', $subDepItem)) {
                $subDepItem['channel'] = $subDepItem['uri'];
            }
            $depChannelName = $subDepItem['channel'];
            $depPackageName = $subDepItem['name'];
            $depVersionConstraint = $this->parse20VersionConstraint($subDepItem);
            if (isset($subDepItem['conflicts'])) {
                $depType = 'conflicts';
            }

            $result[] = new DependencyConstraint(
                $depType,
                $depVersionConstraint,
                $depChannelName,
                $depPackageName
            );
        }

        return $result;
    }
Builds dependency constraint of 'package' type

@param array $depItem dependency constraint or array of dependency constraints
@param string $depType target type of building constraint.
@return DependencyConstraint[]