Fixes the boolean in optional dependencies

@param  $deps
@return
490602
private function fixDeps($deps)
    {
        foreach (array_keys($deps) as $dep) {
            if (isset($deps[$dep]['optional']) && $deps[$dep]['optional']) {
                $deps[$dep]['optional'] = "yes";
            }
        }

        return $deps;
    }
1261832
private function setDependencies(array $packages): self
    {
        $dependencies = [];
        foreach ($packages as $package) {
            foreach ($package->getRequires() as $link) {
                $dependencies[$link->getTarget()][$link->getSource()] = $link->getSource();
            }
        }

        $this->dependencies = $dependencies;

        return $this;
    }
953620
protected function resolveDependencies( array $dependencies, array $parameters ) {

		$args = [];

		foreach ( $dependencies as $dependency ) {

			// If a dependency is set via the parameters passed in, use it.
			if ( isset( $parameters[ $dependency->getName() ] ) ) {

				$args[] = $parameters[ $dependency->getName() ];

			// If the parameter is a class, resolve it.
			} elseif ( ! is_null( $dependency->getClass() ) ) {

				$args[] = $this->resolve( $dependency->getClass()->getName() );

			// Else, use the default parameter value.
			} elseif ( $dependency->isDefaultValueAvailable() ) {

				$args[] = $dependency->getDefaultValue();
			}
		}

		return $args;
	}
539607
protected function resolveDependencies(array $dependencies, array $parameters = [])
    {
        $results = [];
        foreach ($dependencies as $dependency) {
            if (array_key_exists($dependency->name, $parameters)) { // Parameter value is given
                $results[] = $parameters[$dependency->name];
            } else { // Parameter value is not given
                $results[] = is_null($class = $dependency->getClass())
                    ? $dependency->getDefaultValue()
                    : $this->getInstance($dependency->getClass()->name);
            }
        }

        return $results;
    }
1205346
protected function validateDependencies($fixtureClass, $dependenciesClasses)
    {
        if (!is_array($dependenciesClasses) || empty($dependenciesClasses)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Method "%s" in class "%s" must return an array of classes which are'
                    . ' dependencies for the fixture, and it must be NOT empty.',
                    'getDependencies',
                    $fixtureClass
                )
            );
        }

        if (in_array($fixtureClass, $dependenciesClasses)) {
            throw new \InvalidArgumentException(
                sprintf('Class "%s" can\'t have itself as a dependency', $fixtureClass)
            );
        }

        $loadedFixtureClasses = array_keys($this->fixtures);
        foreach ($dependenciesClasses as $class) {
            if (!in_array($class, $loadedFixtureClasses)) {
                throw new \RuntimeException(
                    sprintf(
                        'Fixture "%s" was declared as a dependency, but it should be added in fixture loader first.',
                        $class
                    )
                );
            }
        }

        return true;
    }
310195
private function getDependencies(array $results)
    {
        $dependencies = [];
        $doubles = [];

        foreach ($results as $name => $result) {
            $type = $this->recursive ? Dependency::PROHIBITS : Dependency::DEPENDS;
            $dependency = Dependency::create($name, $type, $result);
            $unique = (string) $dependency->getLink();
            if (isset($doubles[$unique])) {
                continue;
            }
            $doubles[$unique] = true;
            $dependencies[] = $dependency;
        }

        return $dependencies;
    }
413460
def remove_deps(self, deps):
        
        if not isinstance(deps, (list, tuple)):
            deps = [deps]

        assert all(isinstance(d, Dependency) for d in deps)

        self._deps = [d for d in self._deps if d not in deps]

        if self.is_work:
            # remove the same list of dependencies from the task in the work
            for task in self:
                task.remove_deps(deps)
573694
def update_deps(self):
        
        for dep in self.dependencies:
            deps = Utils().dimensional_list(Dependencies(
                self.repo, self.blacklist).binary(
                    dep, self.flag))
            self.deps_dict[dep] = deps
854150
public static function classes($classes = [])
    {
        if (!isset(static::$_dependencies[static::class])) {
            static::$_dependencies[static::class] = static::$_classes;
        }
        if (func_num_args()) {
            static::$_dependencies[static::class] = Set::extend(static::$_dependencies[static::class], $classes);
        }
        return static::$_dependencies[static::class];
    }
986945
public function check_dependencies(array $dependencies)
	{
		foreach($dependencies as $dep)
		{
			// get the section name and identifier
			$sections = explode('.', $dep);
			if (count($sections) > 1)
			{
				$identifier = array_pop($sections);
				$sections = '.'.implode('.', $sections);

			}
			else
			{
				$identifier = $dep;
				$sections = '';
			}

			// get the cache index
			$index = xcache_get($this->config['cache_id'].$sections);

			// get the key from the index
			$key = isset($index[$identifier][0]) ? $index[$identifier] : false;

			// key found and newer?
			if ($key === false or $key[1] > $this->created)
			{
				return false;
			}
		}
		return true;
	}
715039
protected function resolveDependency(ReflectionParameter $dep) {
        $depName = $dep->getName();

        if ($dep->getClass()) {
            $depName = $dep->getClass()->name;
        }

        // bound
        if (array_key_exists($depName, $this->bindings)) {
            return $this->resolve($depName);
        }

        // unbound
        if (class_exists('\\' . $depName)) {
            return $this->make($depName);
        }

        // check for default val
        if ($dep->isDefaultValueAvailable()) {
            return $dep->getDefaultValue();
        }

        throw new ResolutionException(
            "Unable to resolve dependency {$depName} for {$dep->getDeclaringClass()->name}"
        );
    }
1212201
protected function resolveDependencies(array $dependencies)
    {
        $results = [];

        foreach ($dependencies as $dependency) {
            // If this dependency has a override for this particular build we will use
            // that instead as the value. Otherwise, we will continue with this run
            // of resolutions and let reflection attempt to determine the result.
            if ($this->hasParameterOverride($dependency)) {
                $results[] = $this->getParameterOverride($dependency);

                continue;
            }

            // If the class is null, it means the dependency is a string or some other
            // primitive type which we can not resolve since it is not a class and
            // we will just bomb out with an error since we have no-where to go.
            $results[] = is_null($dependency->getClass())
                            ? $this->resolvePrimitive($dependency)
                            : $this->resolveClass($dependency);
        }

        return $results;
    }
1136817
protected function checkDeps()
    {
        if ($this->depsPhpExts === null) {
            return;
        }
        $deps = is_array($this->depsPhpExts) ? $this->depsPhpExts : array($this->depsPhpExts);
        foreach ($deps as $dep) {
            if (!extension_loaded($dep)) {
                throw new Dependence('php extension "'.$dep.'"');
            }
        }
    }
929809
public static function setDependencies($dependencies) {
		self::$dependencies = [];
		foreach ($dependencies as $k => $v) {
			self::addDependency($k, $v);
		}
	}
1059988
protected function getDependencies($parameters)
	{
		$dependencies = array();

		foreach ($parameters as $parameter)
		{
			$dependency = $parameter->getClass();

			// If the class is null, it means the dependency is a string or some other
			// primitive type which we can not resolve since it is not a class and
			// we'll just bomb out with an error since we have no-where to go.
			if (is_null($dependency))
			{
				$dependencies[] = $this->resolveNonClass($parameter);
			}
			else
			{
				$dependencies[] = $this->resolveClass($parameter);
			}
		}

		return (array) $dependencies;
	}
732312
def resolving_deps(self):
        
        requires = []
        if (self.meta.rsl_deps in ["on", "ON"] and
                self.flag != "--resolve-off"):
            self.msg.resolving()
        for dep in self.packages:
            status(0.05)
            dependencies = []
            dependencies = Utils().dimensional_list(Dependencies(
                self.repo, self.blacklist).binary(dep, self.flag))
            requires += self._fix_deps_repos(dependencies)
            self.deps_dict[dep] = Utils().remove_dbs(requires)
        return Utils().remove_dbs(requires)
847344
function resolveDeps (args) {
    return deps.map(function (dep) {
      if (args && args.length && typeof dep === 'number') {
        return args[dep];
      }

      dep = that[dep];

      if (dep) {
        return dep;
      }
    });
  }