Loading src/UnicaenDbImport/Controller/ConsoleController.php +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ class ConsoleController extends AbstractConsoleController } } $this->getConsole()->writeLine((string)$result); $this->getConsole()->writeLine($result->toString()); $this->getConsole()->writeLine("Synchro terminée.", ColorInterface::NORMAL); $startDate = $result->getStartDate(); Loading src/UnicaenDbImport/Domain/Result.php +1 −28 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ abstract class Result implements ResultInterface $str = ''; foreach ($this->resultsByOperation as $operation => $result) { $str .= "# " . $operation . " : " . PHP_EOL; $str .= "# " . sprintf('%-12s', $operation . " : "); if (is_array($result)) { $str .= $result['count'] . " instructions exécutées."; } elseif ($result instanceof Exception){ Loading @@ -146,33 +146,6 @@ abstract class Result implements ResultInterface return $str; } /** * @param bool $includeDetails * @return string */ public function toStringOld($includeDetails = false) { if ($ex = $this->getFailure()) { return $ex->getMessage() . PHP_EOL . $ex->getTraceAsString(); } if (count($this->resultsByOperation) === 0) { return "Aucune instruction exécutée."; } $str = ''; foreach ($this->resultsByOperation as $operation => $results) { $str .= "# " . $operation . " : " . PHP_EOL; if ($includeDetails && isset($results['details'])) { $str .= $results['details'] . PHP_EOL; } $str .= $results['count'] . " instructions exécutées."; $str .= PHP_EOL; } return $str; } /** * @return string */ Loading Loading
src/UnicaenDbImport/Controller/ConsoleController.php +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ class ConsoleController extends AbstractConsoleController } } $this->getConsole()->writeLine((string)$result); $this->getConsole()->writeLine($result->toString()); $this->getConsole()->writeLine("Synchro terminée.", ColorInterface::NORMAL); $startDate = $result->getStartDate(); Loading
src/UnicaenDbImport/Domain/Result.php +1 −28 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ abstract class Result implements ResultInterface $str = ''; foreach ($this->resultsByOperation as $operation => $result) { $str .= "# " . $operation . " : " . PHP_EOL; $str .= "# " . sprintf('%-12s', $operation . " : "); if (is_array($result)) { $str .= $result['count'] . " instructions exécutées."; } elseif ($result instanceof Exception){ Loading @@ -146,33 +146,6 @@ abstract class Result implements ResultInterface return $str; } /** * @param bool $includeDetails * @return string */ public function toStringOld($includeDetails = false) { if ($ex = $this->getFailure()) { return $ex->getMessage() . PHP_EOL . $ex->getTraceAsString(); } if (count($this->resultsByOperation) === 0) { return "Aucune instruction exécutée."; } $str = ''; foreach ($this->resultsByOperation as $operation => $results) { $str .= "# " . $operation . " : " . PHP_EOL; if ($includeDetails && isset($results['details'])) { $str .= $results['details'] . PHP_EOL; } $str .= $results['count'] . " instructions exécutées."; $str .= PHP_EOL; } return $str; } /** * @return string */ Loading