Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns the name of the class of an object
<?php get_class(object $object = ?): string
<?php         }



        if (!$package instanceof CompletePackageInterface) {

            throw new \LogicException('Expected a CompletePackageInterface instance but found '.get_class($package));

        }



        return $package;
<?php                 }

            }



            $result[] = '<error>[' . get_class($e) . '] ' . $e->getMessage() . '</error>';

        }



        if (isset($tlsWarning)) {
<?php         $hadError = false;

        $hadWarning = false;

        if ($result instanceof \Exception) {

            $result = '<error>['.get_class($result).'] '.$result->getMessage().'</error>';

        }



        if (!$result) {
<?php     public function run(InputInterface $input, OutputInterface $output): int

    {

        if (!method_exists($input, '__toString')) {

            throw new \LogicException('Expected an Input instance that is stringable, got '.get_class($input));

        }
<?php             try {

                foreach ($this->getPluginCommands() as $command) {

                    if ($this->has($command->getName())) {

                        $io->writeError('<warning>Plugin command '.$command->getName().' ('.get_class($command).') would override a Composer command and has been skipped</warning>');

                    } else {

                        $this->add($command);

                    }
<?php             foreach ($pm->getPluginCapabilities('Composer\Plugin\Capability\CommandProvider', array('composer' => $composer, 'io' => $this->io)) as $capability) {

                $newCommands = $capability->getCommands();

                if (!is_array($newCommands)) {

                    throw new \UnexpectedValueException('Plugin capability '.get_class($capability).' failed to return an array from getCommands');

                }

                foreach ($newCommands as $command) {

                    if (!$command instanceof Command\BaseCommand) {
<?php                 }

                foreach ($newCommands as $command) {

                    if (!$command instanceof Command\BaseCommand) {

                        throw new \UnexpectedValueException('Plugin capability '.get_class($capability).' returned an invalid value, we expected an array of Composer\Command\BaseCommand objects');

                    }

                }

                $commands = array_merge($commands, $newCommands);
<?php         if ($installationSource !== $downloader->getInstallationSource()) {

            throw new \LogicException(sprintf(

                'Downloader "%s" is a %s type downloader and can not be used to download %s for package %s',

                get_class($downloader),

                $downloader->getInstallationSource(),

                $installationSource,

                $package
<?php             array_shift($urls);

            if ($urls) {

                if ($io->isDebug()) {

                    $io->writeError('    Failed downloading '.$package->getName().': ['.get_class($e).'] '.$e->getCode().': '.$e->getMessage());

                    $io->writeError('    Trying the next URL for '.$package->getName());

                } else {

                    $io->writeError('    Failed downloading '.$package->getName().', trying the next URL ('.$e->getCode().': '.$e->getMessage().')');
<?php                     throw $e;

                }

                if ($this->io->isDebug()) {

                    $this->io->writeError('Failed: ['.get_class($e).'] '.$e->getMessage());

                } elseif (count($urls)) {

                    $this->io->writeError('    Failed, trying the next URL');

                }
<?php                     throw $e;

                }

                if ($this->io->isDebug()) {

                    $this->io->writeError('Failed: ['.get_class($e).'] '.$e->getMessage());

                } elseif (count($urls)) {

                    $this->io->writeError('    Failed, trying the next URL');

                }
<?php                     throw $exception;

                }

                if ($this->io->isDebug()) {

                    $this->io->writeError('Failed: ['.get_class($exception).'] '.$exception->getMessage());

                } elseif (count($urls)) {

                    $this->io->writeError('    Failed, trying the next URL');

                }
<?php                 if (!is_string($callable)) {

                    if (!is_callable($callable)) {

                        $className = is_object($callable[0]) ? get_class($callable[0]) : $callable[0];



                        throw new \RuntimeException('Subscriber '.$className.'::'.$callable[1].' for event '.$event->getName().' is not callable, make sure the function is defined and public');

                    }
<?php                         throw new \RuntimeException('Subscriber '.$className.'::'.$callable[1].' for event '.$event->getName().' is not callable, make sure the function is defined and public');

                    }

                    if (is_array($callable) && (is_string($callable[0]) || is_object($callable[0])) && is_string($callable[1])) {

                        $this->io->writeError(sprintf('> %s: %s', $event->getName(), (is_object($callable[0]) ? get_class($callable[0]) : $callable[0]).'->'.$callable[1]), true, IOInterface::VERBOSE);

                    }

                    $return = false === call_user_func($callable, $event) ? 1 : 0;

                } elseif ($this->isComposerScript($callable)) {
<?php         foreach ($packages as $key => $package) {

            if ($package instanceof AliasPackage) {

                $alias = (string) $package->getAliasOf();

                $className = get_class($package);

                $packages[$key] = new $className($packages[$alias], $package->getVersion(), $package->getPrettyVersion());

            }

        }