original_string: public function scopeInProgress(Builder $query)
      {
          return $query->where('scheduled_at', '<=', Carbon::now())->where('status', '<>', self::COMPLETE)->where(function ($query) {
              $query->whereNull('completed_at')->orWhere('completed_at', '>', Carbon::now());
          });
      }
code: public function scopeInProgress(Builder $query)
      {
          return $query->where('scheduled_at', '<=', Carbon::now())->where('status', '<>', self::COMPLETE)->where(function ($query) {
              $query->whereNull('completed_at')->orWhere('completed_at', '>', Carbon::now());
          });
      }
code_tokens: public function scopeInProgress ( Builder $ query ) { return $ query -> where ( 'scheduled_at' , '<=' , Carbon :: now ( ) ) -> where ( 'status' , '<>' , self :: COMPLETE ) -> where ( function ( $ query ) { $ query -> whereNull ( 'completed_at' ) -> orWhere ( 'completed_at' , '>' , Carbon :: now ( ) ) ; } ) ; }
docstring: Scope schedules that are in progress.
  
  @param \Illuminate\Database\Eloquent\Builder $query
  
  @return \Illuminate\Database\Eloquent\Builder
docstring_tokens: Scope schedules that are in progress .