@param string $name

@return Closure
512207
protected function primaryInt(string $name): Closure
    {
        return function (Table $table) use ($name) {
            $table->addColumn($name, Type::INTEGER)->setAutoincrement(true)->setUnsigned(true)->setNotnull(true);
            $table->setPrimaryKey([$name]);
        };
    }
601792
public function getRelease($name)
	{
		$key = strtolower($name);
		if ( ! $this->hasRelease($key))
		{
			return null;
		}

		return $this->releases[$key];
	}
955911
public static function override(string $name, \Closure $closure, string $appName = null) : ServiceLocator
    {
        $service = self::determineService($appName);
        if (isset($service[$name])) {
            unset($service[$name]);
        }
        $service[$name] = $closure;
        return $service;
    }
1002738
public function extend($name, Closure $extender) {
		$name = $this->getAlias($name);
		$component = &$this->components[$name];

		if (!isset($component['extender'])) {
			$component['extender'] = [];
		}

		if ($this->isSingleton($name)) {
			$component = $this->make($name);

			$component = $this->resolveExtend($name, $component);

			return $this->instance($name, $component);
		}

		array_push($component['extender'], $extender);
	}
1151088
public function delete(string $name): self
    {
        if (isset($this->data[$name])) {
            unset($this->data[$name]);
        }
        return $this;
    }
1305866
protected function cacheResults($name, Closure $callback)
    {
        return Cache::remember('cache::' . $name, $this->minutes, $callback);
    }
1230294
public function get(string $name): Closure
    {
        if ( ! $this->has($name)) {
            throw new DefinitionNotFoundException("No breadcrumbs defined for route [{$name}].");
        }

        return $this->definitions[$name];
    }
76062
public function getFunction($name)
    {
        if (!$this->initialized) {
            $this->initialize();
        }

        return isset($this->functions[$name]) ? $this->functions[$name] : null;
    }
856711
protected function getCachedProperty($name, \Closure $factory)
    {
        $name = (string) $name;
        if (!array_key_exists($name, $this->gettersCache)) {
            $this->gettersCache[$name] = call_user_func($factory);
        }

        return $this->gettersCache[$name];
    }
893673
public function spawn(string $name): Scope
    {
        $scope = new Scope($name);
        $scope->parent = $this;
        $this->children[]= $scope;

        return $scope;
    }
317643
protected function float(string $name): Closure
    {
        // precision and scale both seems to be ignored in Doctrine so not much sense to have them as inputs

        return function (Table $table) use ($name) {
            $table->addColumn($name, Type::FLOAT)->setNotnull(true);
        };
    }
154028
public function unregisterFunction($name)
    {
        if(isset($this->_functions[$name])) {
            unset($this->_functions[$name]);
        }

        return $this;
    }
1210719
public function item($name, Closure $callback = null)
    {
        if ($this->items->has($name)) {
            $item = $this->items->get($name);
        } else {
            $item = $this->container->make('Maatwebsite\Sidebar\Item');
            $item->name($name);
        }

        $this->call($callback, $item);

        $this->addItem($item);

        return $item;
    }
590483
public function wrap($name)
    {
        if (!isset($this->_definitions[$name])) {
            throw new BoxException("Unexisting `{$name}` definition dependency.");
        }
        if (!$this->_definitions[$name]['definition'] instanceof Closure) {
            throw new BoxException("Error `{$name}` is not a closure definition dependency can't be wrapped.");
        }

        $params = func_get_args();
        array_shift($params);

        $wrapper = $this->_classes['wrapper'];
        return new $wrapper([
            'box'    => $this,
            'name'   => $name,
            'params' => $params
        ]);
    }
359855
public function unregisterFunction($name)
    {
        parent::unregisterFunction($name);

        $functions = $this->_twig->getFunctions();

        if(isset($functions[$name])) {
            unset($functions[$name]);
        }

        return $this;
    }
942082
public function resolveCallable(?string $name, callable $closure, ?array $parameters = null)
    {
        $definitions = isset($name) && $this->container->isDefined($name)
            ? $this->container->getDefiniition($name) : null;

        $callable = $this->getCallable($closure);
        $parameters = $parameters ?? $this->resolveParameters($callable->getParameters() ?? null, $definitions);

        return $callable->invokeArgs($parameters);
    }
966639
public function on($name, $key, Closure $fn = null)
    {
        $name = strtolower($name);
        if ($key instanceof Closure) {
            $this->rules['event'][$name][''] = $key;
        } else {
            $this->rules['event'][$name][$key] = $fn;
        }
        return $this;
    }