Skip to content

Commit

Permalink
Fixed static method call and added return type hints. (#940)
Browse files Browse the repository at this point in the history
  • Loading branch information
siad007 authored Jun 30, 2018
1 parent 1dec446 commit c552aef
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions classes/phing/types/CommandlineArgument.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,26 @@ public function setValue($value)
* Line to split into several commandline arguments.
*
* @param string $line line to split into several commandline arguments
* @throws \BuildException
*/
public function setLine($line)
{
if ($line === null) {
return;
}
$this->parts = $this->outer->translateCommandline($line);
$this->parts = $this->outer::translateCommandline($line);
}

/**
* Sets a single commandline argument and treats it like a
* PATH - ensures the right separator for the local platform
* is used.
*
* @param string $value a single commandline argument
* @param Path $value a single commandline argument
*/
public function setPath($value)
public function setPath(Path $value): void
{
$this->parts = [(string)$value];
$this->parts = [(string) $value];
}

/**
Expand All @@ -69,7 +70,7 @@ public function setPath($value)
* @param PhingFile $value
* @internal param a $value single commandline argument.
*/
public function setFile(PhingFile $value)
public function setFile(PhingFile $value): void
{
$this->parts = [$value->getAbsolutePath()];
}
Expand All @@ -78,7 +79,7 @@ public function setFile(PhingFile $value)
* Returns the parts this Argument consists of.
* @return array string[]
*/
public function getParts()
public function getParts(): array
{
return $this->parts;
}
Expand Down

0 comments on commit c552aef

Please sign in to comment.