public function display_tasks_and_comments()
    {
        $width = 0;
        $tasks = pakeTask::get_tasks();
        foreach ($tasks as $name => $task) {
            $w = strlen(pakeTask::get_mini_task_name($name));
            if ($w > $width)
                $width = $w;
        }
        $width += mb_strlen(pakeColor::colorize(' ', 'INFO'));

        echo "available ".self::$EXEC_NAME." tasks:\n";

        // display tasks
        $has_alias = false;
        ksort($tasks);
        foreach ($tasks as $name => $task) {
            if ($task->get_alias()) {
                $has_alias = true;
            }

            if (!$task->get_alias() and $task->get_comment()) {
                $mini_name = pakeTask::get_mini_task_name($name);
                printf('  %-'.$width.'s > %s'."\n", pakeColor::colorize($mini_name, 'INFO'), $task->get_comment().($mini_name != $name ? ' ['.$name.']' : ''));
            }
        }

        if ($has_alias) {
            print("\ntask aliases:\n");

            // display aliases
            foreach ($tasks as $name => $task) {
                if ($task->get_alias()) {
                    $mini_name = pakeTask::get_mini_task_name($name);
                    printf('  %-'.$width.'s = '.self::$EXEC_NAME.' %s'."\n", pakeColor::colorize(pakeTask::get_mini_task_name($name), 'INFO'), $task->get_alias().($mini_name != $name ? ' ['.$name.']' : ''));
                }
            }
        }

        echo "\n".'Try "';
        echo pakeColor::colorize(self::$EXEC_NAME.' help taskname', 'INFO');
        echo '" to get detailed information about task'."\n\n";
    }
public function display_tasks_and_comments()
    {
        $width = 0;
        $tasks = pakeTask::get_tasks();
        foreach ($tasks as $name => $task) {
            $w = strlen(pakeTask::get_mini_task_name($name));
            if ($w > $width)
                $width = $w;
        }
        $width += mb_strlen(pakeColor::colorize(' ', 'INFO'));

        echo "available ".self::$EXEC_NAME." tasks:\n";

        // display tasks
        $has_alias = false;
        ksort($tasks);
        foreach ($tasks as $name => $task) {
            if ($task->get_alias()) {
                $has_alias = true;
            }

            if (!$task->get_alias() and $task->get_comment()) {
                $mini_name = pakeTask::get_mini_task_name($name);
                printf('  %-'.$width.'s > %s'."\n", pakeColor::colorize($mini_name, 'INFO'), $task->get_comment().($mini_name != $name ? ' ['.$name.']' : ''));
            }
        }

        if ($has_alias) {
            print("\ntask aliases:\n");

            // display aliases
            foreach ($tasks as $name => $task) {
                if ($task->get_alias()) {
                    $mini_name = pakeTask::get_mini_task_name($name);
                    printf('  %-'.$width.'s = '.self::$EXEC_NAME.' %s'."\n", pakeColor::colorize(pakeTask::get_mini_task_name($name), 'INFO'), $task->get_alias().($mini_name != $name ? ' ['.$name.']' : ''));
                }
            }
        }

        echo "\n".'Try "';
        echo pakeColor::colorize(self::$EXEC_NAME.' help taskname', 'INFO');
        echo '" to get detailed information about task'."\n\n";
    }
public function display_tasks_and_comments ( ) { $ width = 0 ; $ tasks = pakeTask :: get_tasks ( ) ; foreach ( $ tasks as $ name => $ task ) { $ w = strlen ( pakeTask :: get_mini_task_name ( $ name ) ) ; if ( $ w > $ width ) $ width = $ w ; } $ width += mb_strlen ( pakeColor :: colorize ( ' ' , 'INFO' ) ) ; echo "available " . self :: $ EXEC_NAME . " tasks:\n" ; // display tasks $ has_alias = false ; ksort ( $ tasks ) ; foreach ( $ tasks as $ name => $ task ) { if ( $ task -> get_alias ( ) ) { $ has_alias = true ; } if ( ! $ task -> get_alias ( ) and $ task -> get_comment ( ) ) { $ mini_name = pakeTask :: get_mini_task_name ( $ name ) ; printf ( '  %-' . $ width . 's > %s' . "\n" , pakeColor :: colorize ( $ mini_name , 'INFO' ) , $ task -> get_comment ( ) . ( $ mini_name != $ name ? ' [' . $ name . ']' : '' ) ) ; } } if ( $ has_alias ) { print ( "\ntask aliases:\n" ) ; // display aliases foreach ( $ tasks as $ name => $ task ) { if ( $ task -> get_alias ( ) ) { $ mini_name = pakeTask :: get_mini_task_name ( $ name ) ; printf ( '  %-' . $ width . 's = ' . self :: $ EXEC_NAME . ' %s' . "\n" , pakeColor :: colorize ( pakeTask :: get_mini_task_name ( $ name ) , 'INFO' ) , $ task -> get_alias ( ) . ( $ mini_name != $ name ? ' [' . $ name . ']' : '' ) ) ; } } } echo "\n" . 'Try "' ; echo pakeColor :: colorize ( self :: $ EXEC_NAME . ' help taskname' , 'INFO' ) ; echo '" to get detailed information about task' . "\n\n" ; }
Display the tasks and dependencies.
Display the tasks and dependencies .