8000 Fluent interface · dirkaholic/symfony@46d358f · GitHub
[go: up one dir, main page]

65F3 Skip to content

Commit 46d358f

Browse files
Bilgefabpot
authored andcommitted
Fluent interface
1 parent 0bfa86c commit 46d358f

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,11 +614,15 @@ public function stop($timeout=10)
614614
public function addOutput($line)
615615
{
616616
$this->stdout .= $line;
617+
618+
return $this;
617619
}
618620

619621
public function addErrorOutput($line)
620622
{
621623
$this->stderr .= $line;
624+
625+
return $this;
622626
}
623627

624628
public function getCommandLine()
@@ -629,6 +633,8 @@ public function getCommandLine()
629633
public function setCommandLine($commandline)
630634
{
631635
$this->commandline = $commandline;
636+
637+
return $this;
632638
}
633639

634640
public function getTimeout()
@@ -648,7 +654,7 @@ public function setTimeout($timeout)
648654
if (null === $timeout) {
649655
$this->timeout = null;
650656

651-
return;
657+
return $this;
652658
}
653659

654660
$timeout = (integer) $timeout;
@@ -658,6 +664,8 @@ public function setTimeout($timeout)
658664
}
659665

660666
$this->timeout = $timeout;
667+
668+
return $this;
661669
}
662670

663671
public function getWorkingDirectory()
@@ -668,6 +676,8 @@ public function getWorkingDirectory()
668676
public function setWorkingDirectory($cwd)
669677
{
670678
$this->cwd = $cwd;
679+
680+
return $this;
671681
}
672682

673683
public function getEnv()
@@ -678,6 +688,8 @@ public function getEnv()
678688
public function setEnv(array $env)
679689
{
680690
$this->env = $env;
691+
692+
return $this;
681693
}
682694

683695
public function getStdin()
@@ -688,6 +700,8 @@ public function getStdin()
688700
public function setStdin($stdin)
689701
{
690702
$this->stdin = $stdin;
703+
704+
return $this;
691705
}
692706

693707
public function getOptions()
@@ -698,6 +712,8 @@ public function getOptions()
698712
public function setOptions(array $options)
699713
{
700714
$this->options = $options;
715+
716+
return $this;
701717
}
702718

703719
public function getEnhanceWindowsCompatibility()
@@ -708,6 +724,8 @@ public function getEnhanceWindowsCompatibility()
708724
public function setEnhanceWindowsCompatibility($enhance)
709725
{
710726
$this->enhanceWindowsCompatibility = (Boolean) $enhance;
727+
728+
return $this;'
711729
}
712730
713731
/**

0 commit comments

Comments
 (0)
0