Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Make a string's first character uppercase
<?php ucfirst(string $string): string
<?php     {

        $title = $title ?: $linkType;

        $io = $this->getIO();

        if ($links = $package->{'get'.ucfirst($linkType)}()) {

            $io->write("\n<info>" . $title . "</info>");



            foreach ($links as $link) {
<?php     private function appendLink($json, CompletePackageInterface $package, $linkType)

    {

        $links = $package->{'get' . ucfirst($linkType)}();



        if ($links) {

            $json[$linkType] = array();
<?php             ->then(function () use ($devMode, $repo) {

                $repo->write($devMode, $this);

            }, function ($e) use ($opType, $package, $io) {

                $io->writeError('    <error>' . ucfirst($opType) .' of '.$package->getPrettyName().' failed</error>');



                throw $e;

            });
<?php         $this->dev = $this->stability === 'dev';



        foreach (Link::$TYPES as $type) {

            $links = $aliasOf->{'get' . ucfirst($type)}();

            $this->$type = $this->replaceSelfVersionDependencies($links, $type);

        }

    }
<?php         }



        foreach (BasePackage::$supportedLinkTypes as $type => $opts) {

            if ($links = $package->{'get'.ucfirst($opts['method'])}()) {

                foreach ($links as $link) {

                    $data[$type][$link->getTarget()] = $link->getPrettyConstraint();

                }
<?php                 $method = $key;

            }



            $getter = 'get'.ucfirst($method);

            $value = $package->$getter();



            if (null !== $value && !(\is_array($value) && 0 === \count($value))) {
<?php         foreach (BasePackage::$supportedLinkTypes as $type => $opts) {

            if (isset($config[$type])) {

                $method = 'set'.ucfirst($opts['method']);

                $package->{$method}(

                    $this->parseLinks(

                        $package->getName(),
<?php         foreach (BasePackage::$supportedLinkTypes as $type => $opts) {

            if (isset($config[$type])) {

                $method = 'set'.ucfirst($opts['method']);



                $links = array();

                foreach ($config[$type] as $prettyTarget => $constraint) {
<?php         foreach (array('require', 'require-dev') as $linkType) {

            if (isset($config[$linkType])) {

                $linkInfo = BasePackage::$supportedLinkTypes[$linkType];

                $method = 'get'.ucfirst($linkInfo['method']);

                $links = array();

                foreach ($realPackage->$method() as $link) {

                    $links[$link->getTarget()] = $link->getConstraint()->getPrettyString();
<?php                 }

            }



            $io->writeError('<'.$type.'>'.ucfirst($type).' from '.Url::sanitize($url).': '.$data[$type].'</'.$type.'>');

        }
<?php                     continue;

                }



                $io->writeError('<'.$type.'>'.ucfirst($type).' from '.Url::sanitize($url).': '.$spec['message'].'</'.$type.'>');

            }

        }

    }
<?php     {

        $this->package = $this->getMockBuilder('Composer\Package\RootPackageInterface')->getMock();



        $this->packageExpects('get'.ucfirst($method ?: $key), $value);

        $this->packageExpects('isAbandoned', $value);



        if ($method !== 'transportOptions') {
<?php         foreach (BasePackage::$supportedLinkTypes as $type => $opts) {

            if (isset($config[$type])) {

                $method = 'set'.ucfirst($opts['method']);

                $package->{$method}(

                    $arrayLoader->parseLinks(

                        $package->getName(),