Skip to content

Commit

Permalink
Restoring checks removed in #11 (makes Phing ci fail)
Browse files Browse the repository at this point in the history
  • Loading branch information
jawira committed Apr 21, 2021
1 parent 5e89d22 commit 864e8d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/VisualizerTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
use SimpleXMLElement;
use XSLTProcessor;
use function array_reduce;
use function filter_var;
use function reset;
use function simplexml_load_string;
use const FILTER_VALIDATE_URL;

/**
* Class VisualizerTask
Expand Down Expand Up @@ -354,6 +356,11 @@ public function getServer(): string
*/
public function setServer(string $server): VisualizerTask
{
if (!filter_var($server, FILTER_VALIDATE_URL)) {
$exceptionMessage = 'Invalid PlantUml server';
$this->log($exceptionMessage, Project::MSG_ERR);
throw new BuildException($exceptionMessage);
}
$this->server = $server;

return $this;
Expand Down

0 comments on commit 864e8d1

Please sign in to comment.