src/Extensions.php
public static function addHook($point, $handler)
    {
        if (! $handler instanceof \Closure and ! in_array(Hook::class, class_implements($handler), false)) {
            throw new \InvalidArgumentException("Failed adding hook. Provided handler for [{$point}] is not valid. Either provider a \\Closure or classpath that impelments \\Docit\\Docit\\Contracts\\Hook");
        }

        static::ensureHookPoint($point);
        static::$hooks[ $point ][] = $handler;
    }
public static function addHook($point, $handler)
    {
        if (! $handler instanceof \Closure and ! in_array(Hook::class, class_implements($handler), false)) {
            throw new \InvalidArgumentException("Failed adding hook. Provided handler for [{$point}] is not valid. Either provider a \\Closure or classpath that impelments \\Docit\\Docit\\Contracts\\Hook");
        }

        static::ensureHookPoint($point);
        static::$hooks[ $point ][] = $handler;
    }
public static function addHook ( $ point , $ handler ) { if ( ! $ handler instanceof \ Closure and ! in_array ( Hook :: class , class_implements ( $ handler ) , false ) ) { throw new \ InvalidArgumentException ( "Failed adding hook. Provided handler for [{$point}] is not valid. Either provider a \\Closure or classpath that impelments \\Docit\\Docit\\Contracts\\Hook" ) ; } static :: ensureHookPoint ( $ point ) ; static :: $ hooks [ $ point ] [ ] = $ handler ; }
Register a hook instance.

@param  string          $point
@param  string|\Closure $handler
@return void
Register a hook instance .