original_string: public function stream($cycles = 0)
      {
          $i_cycles = 0;
          while (true) {
              if ($this->getStop()) {
                  $this->internal_stop();
                  return;
              }
              foreach ($this->getWatches() as $watch) {
                  if ($this->getStop()) {
                      $this->internal_stop();
                      return;
                  }
                  foreach ($watch->stream(1) as $message) {
                      if ($this->getStop()) {
                          $this->internal_stop();
                          return;
                      }
                      yield $message;
                  }
              }
              $i_cycles++;
              if ($cycles > 0 && $cycles >= $i_cycles) {
                  return;
              }
          }
      }
code: public function stream($cycles = 0)
      {
          $i_cycles = 0;
          while (true) {
              if ($this->getStop()) {
                  $this->internal_stop();
                  return;
              }
              foreach ($this->getWatches() as $watch) {
                  if ($this->getStop()) {
                      $this->internal_stop();
                      return;
                  }
                  foreach ($watch->stream(1) as $message) {
                      if ($this->getStop()) {
                          $this->internal_stop();
                          return;
                      }
                      yield $message;
                  }
              }
              $i_cycles++;
              if ($cycles > 0 && $cycles >= $i_cycles) {
                  return;
              }
          }
      }
code_tokens: public function stream ( $ cycles = 0 ) { $ i_cycles = 0 ; while ( true ) { if ( $ this -> getStop ( ) ) { $ this -> internal_stop ( ) ; return ; } foreach ( $ this -> getWatches ( ) as $ watch ) { if ( $ this -> getStop ( ) ) { $ this -> internal_stop ( ) ; return ; } foreach ( $ watch -> stream ( 1 ) as $ message ) { if ( $ this -> getStop ( ) ) { $ this -> internal_stop ( ) ; return ; } yield $ message ; } } $ i_cycles ++ ; if ( $ cycles > 0 && $ cycles >= $ i_cycles ) { return ; } } }
docstring: Generator interface for looping
  
  @param int $cycles
  @return \Generator|void
docstring_tokens: Generator interface for looping