public function addClassDependency(string $class, string $package, bool $required = true, bool $devDependency = false)
    {
        if ($devDependency) {
            $this->devDependencies[] = [
                'class' => $class,
                'name' => $package,
                'required' => $required,
            ];
        } else {
            $this->dependencies[] = [
                'class' => $class,
                'name' => $package,
                'required' => $required,
            ];
        }
    }
public function addClassDependency(string $class, string $package, bool $required = true, bool $devDependency = false)
    {
        if ($devDependency) {
            $this->devDependencies[] = [
                'class' => $class,
                'name' => $package,
                'required' => $required,
            ];
        } else {
            $this->dependencies[] = [
                'class' => $class,
                'name' => $package,
                'required' => $required,
            ];
        }
    }
public function addClassDependency ( string $ class , string $ package , bool $ required = true , bool $ devDependency = false ) { if ( $ devDependency ) { $ this -> devDependencies [ ] = [ 'class' => $ class , 'name' => $ package , 'required' => $ required , ] ; } else { $ this -> dependencies [ ] = [ 'class' => $ class , 'name' => $ package , 'required' => $ required , ] ; } }
Add a dependency that will be reported if the given class is missing.

If the dependency is *optional*, then it will only be reported to
the user if other required dependencies are missing. An example
is the "validator" when trying to work with forms.
Add a dependency that will be reported if the given class is missing .