Skip to content

Commit 50f4215

Browse files
committed
phpstan fixes
1 parent a8b5e80 commit 50f4215

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/phpDocumentor/GraphViz/Graph.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
namespace phpDocumentor\GraphViz;
1717

18+
use \InvalidArgumentException;
19+
1820
/**
1921
* Class representing a graph; this may be a main graph but also a subgraph.
2022
*
@@ -127,7 +129,7 @@ public function getName(): string
127129
public function setType(string $type): self
128130
{
129131
if (!in_array($type, ['digraph', 'graph', 'subgraph'], true)) {
130-
throw new \InvalidArgumentException(
132+
throw new InvalidArgumentException(
131133
'The type for a graph must be either "digraph", "graph" or '
132134
. '"subgraph"'
133135
);
@@ -324,7 +326,7 @@ public function export(string $type, string $filename): self
324326
$filename = escapeshellarg($filename);
325327

326328
// write the dot file to a temporary file
327-
$tmpfile = tempnam(sys_get_temp_dir(), 'gvz');
329+
$tmpfile = (string) tempnam(sys_get_temp_dir(), 'gvz');
328330
file_put_contents($tmpfile, (string) $this);
329331

330332
// escape the temp file for use as argument

0 commit comments

Comments
 (0)