options = $options + [ 'ignore' => [], 'on-require' => TRUE, ]; } /** * Checks if a package should be ignored. * * @param \Composer\Package\PackageInterface $package * The package. * * @return bool * TRUE if the package should be ignored, FALSE if not. */ public function isIgnored(PackageInterface $package): bool { return in_array($package->getName(), $this->options['ignore'], TRUE); } /** * Creates an unpack options object. * * @param array $extras * The contents of the 'extras' section. * * @return self * The unpack options object representing the provided unpack options */ public static function create(array $extras): self { $options = $extras[self::ID] ?? []; return new self($options); } }