mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	Add info about no help information for the command
This commit is contained in:
		
							parent
							
								
									e4bab08d3f
								
							
						
					
					
						commit
						342a468214
					
				@ -180,6 +180,12 @@ abstract class AbstractCommand
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (empty($output)) {
 | 
			
		||||
            $output .= "\n";
 | 
			
		||||
            $output .= "<red><bold>Sorry, there's no help for this command at the moment.</bold></red>";
 | 
			
		||||
            $output .= "\n";
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return $output;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -229,6 +229,14 @@ class AbstractCommandTest extends BaseTest
 | 
			
		||||
                    . "        <green>mage example</green>\n"
 | 
			
		||||
                    . "    * Runs the command with lights:\n"
 | 
			
		||||
                    . "        <green>mage example light</green>\n"
 | 
			
		||||
            ),
 | 
			
		||||
            "no_info_at_all" => array(
 | 
			
		||||
                'name' => '',
 | 
			
		||||
                'helpMessage' => '',
 | 
			
		||||
                'examples' => array(),
 | 
			
		||||
                'syntax' => '',
 | 
			
		||||
                'output' => "\n"
 | 
			
		||||
                    . "<red><bold>Sorry, there's no help for this command at the moment.</bold></red>\n"
 | 
			
		||||
            )
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user