WordPress at a glance
function is not described

Automattic\Jetpack\Autoloader

CustomAutoloaderPlugin::isRequiredByRoot() private WC 1.0

Checks to see whether or not the root package is the one that required the autoloader.

{} It's a method of the class: CustomAutoloaderPlugin{}

No Hooks.

Return

true|false. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->isRequiredByRoot();

Code of CustomAutoloaderPlugin::isRequiredByRoot() WC 5.2.2

<?php
private function isRequiredByRoot() {
	$package  = $this->composer->getPackage();
	$requires = $package->getRequires();
	if ( ! is_array( $requires ) ) {
		$requires = array();
	}
	$devRequires = $package->getDevRequires();
	if ( ! is_array( $devRequires ) ) {
		$devRequires = array();
	}
	$requires = array_merge( $requires, $devRequires );

	if ( empty( $requires ) ) {
		$this->io->writeError( "\n<error>The package is not required and this should never happen?</error>", true );
		exit();
	}

	foreach ( $requires as $require ) {
		if ( 'automattic/jetpack-autoloader' === $require->getTarget() ) {
			return true;
		}
	}

	return false;
}