The expression return shell_exec($this->getConvertCommand($tmp)) could return the type null which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Loading history...
53
}
54
55
/**
56
* Get the executable to use.
57
*
58
* @return string
59
*/
60
3
public function getExecutable(): string
61
{
62
3
return $this->executable;
63
}
64
65
/**
66
* @return string
67
*/
68
2
public function getFormat(): string
69
{
70
2
return $this->format;
71
}
72
73
/**
74
* Change the executable to use.
75
*
76
* @param string $executable
77
*
78
* @return \loophp\phptree\Exporter\Image
79
*/
80
1
public function setExecutable(string $executable): self
81
{
82
1
$this->executable = $executable;
83
84
1
return $this;
85
}
86
87
/**
88
* @param string $format
89
*
90
* @return \loophp\phptree\Exporter\Image
91
*/
92
1
public function setFormat(string $format): self
93
{
94
1
$this->format = $format;
95
96
1
return $this;
97
}
98
99
/**
100
* @param string $path
101
*
102
* @return string
103
*/
104
1
private function getConvertCommand(string $path): string