Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / process / Pipes / UnixPipes.php
index c4babcdf5c92c813258c429c299e486bc72f295a..3185fe76ee03fd165f48453de1e8e1ecf26d1faa 100644 (file)
@@ -27,13 +27,13 @@ class UnixPipes extends AbstractPipes
     /** @var bool */
     private $ptyMode;
     /** @var bool */
-    private $disableOutput;
+    private $haveReadSupport;
 
-    public function __construct($ttyMode, $ptyMode, $input, $disableOutput)
+    public function __construct($ttyMode, $ptyMode, $input, $haveReadSupport)
     {
         $this->ttyMode = (bool) $ttyMode;
         $this->ptyMode = (bool) $ptyMode;
-        $this->disableOutput = (bool) $disableOutput;
+        $this->haveReadSupport = (bool) $haveReadSupport;
 
         parent::__construct($input);
     }
@@ -48,7 +48,7 @@ class UnixPipes extends AbstractPipes
      */
     public function getDescriptors()
     {
-        if ($this->disableOutput) {
+        if (!$this->haveReadSupport) {
             $nullstream = fopen('/dev/null', 'c');
 
             return array(
@@ -138,21 +138,16 @@ class UnixPipes extends AbstractPipes
     /**
      * {@inheritdoc}
      */
-    public function areOpen()
+    public function haveReadSupport()
     {
-        return (bool) $this->pipes;
+        return $this->haveReadSupport;
     }
 
     /**
-     * Creates a new UnixPipes instance.
-     *
-     * @param Process         $process
-     * @param string|resource $input
-     *
-     * @return static
+     * {@inheritdoc}
      */
-    public static function create(Process $process, $input)
+    public function areOpen()
     {
-        return new static($process->isTty(), $process->isPty(), $input, $process->isOutputDisabled());
+        return (bool) $this->pipes;
     }
 }