mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	Improve tests for php 7.2
This commit is contained in:
		
							parent
							
								
									b5f181bb18
								
							
						
					
					
						commit
						7860fea425
					
				@ -143,6 +143,9 @@ class DeployCommand extends AbstractCommand
 | 
				
			|||||||
    protected function runOnHosts(OutputInterface $output, $tasks)
 | 
					    protected function runOnHosts(OutputInterface $output, $tasks)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $hosts = $this->runtime->getEnvOption('hosts');
 | 
					        $hosts = $this->runtime->getEnvOption('hosts');
 | 
				
			||||||
 | 
					        if (!is_array($hosts) && !$hosts instanceof \Countable) {
 | 
				
			||||||
 | 
					            $hosts = [];
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        if (count($hosts) == 0) {
 | 
					        if (count($hosts) == 0) {
 | 
				
			||||||
            $output->writeln(sprintf('    No hosts defined, skipping %s tasks', $this->getStageName()));
 | 
					            $output->writeln(sprintf('    No hosts defined, skipping %s tasks', $this->getStageName()));
 | 
				
			||||||
            $output->writeln('');
 | 
					            $output->writeln('');
 | 
				
			||||||
 | 
				
			|||||||
@ -74,6 +74,9 @@ class ListCommand extends AbstractCommand
 | 
				
			|||||||
            $output->writeln('');
 | 
					            $output->writeln('');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $hosts = $this->runtime->getEnvOption('hosts');
 | 
					            $hosts = $this->runtime->getEnvOption('hosts');
 | 
				
			||||||
 | 
					            if (!is_array($hosts) && !$hosts instanceof \Countable) {
 | 
				
			||||||
 | 
					                $hosts = [];
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            if (count($hosts) == 0) {
 | 
					            if (count($hosts) == 0) {
 | 
				
			||||||
                $output->writeln('No hosts defined');
 | 
					                $output->writeln('No hosts defined');
 | 
				
			||||||
                $output->writeln('');
 | 
					                $output->writeln('');
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user