| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 15 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 8 | 
| CRAP Score | 2 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 24 | 2 | public function pushDirectoryContentToRepository(string $outputDirectory, string $githubRepository) | |
| 25 |     { | ||
| 26 | 2 | $this->ensureDirectoryExists($outputDirectory); | |
| 27 | |||
| 28 | 1 | $this->runScript( | |
| 29 | 1 | 'git init && git add . && git commit -m "Regenerate output"', | |
| 30 | $outputDirectory | ||
| 31 | ); | ||
| 32 | |||
| 33 | 1 |         if (getenv('TRAVIS')) { | |
| 34 | 1 | $this->runScript(sprintf( | |
| 35 | 1 |                 'git push --force --quiet "${%s}" master:gh-pages > /dev/null 2>&1', $githubRepository | |
| 36 | ), $outputDirectory); | ||
| 37 | } | ||
| 38 | 1 | } | |
| 39 | |||
| 59 | 
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: