original_string: public function scopeFilteredByStatus(Builder $query, $status = null)
      {
          $status = is_null($status) ? request('f', 'all') : $status;
  
          if (in_array($status, ['published', 'withheld', 'draft', 'pending', 'archived', 'invisible', 'locked']))
          {
              $query->{$status}();
          }
  
          return $query;
      }
code: public function scopeFilteredByStatus(Builder $query, $status = null)
      {
          $status = is_null($status) ? request('f', 'all') : $status;
  
          if (in_array($status, ['published', 'withheld', 'draft', 'pending', 'archived', 'invisible', 'locked']))
          {
              $query->{$status}();
          }
  
          return $query;
      }
code_tokens: public function scopeFilteredByStatus ( Builder $ query , $ status = null ) { $ status = is_null ( $ status ) ? request ( 'f' , 'all' ) : $ status ; if ( in_array ( $ status , [ 'published' , 'withheld' , 'draft' , 'pending' , 'archived' , 'invisible' , 'locked' ] ) ) { $ query -> { $ status } ( ) ; } return $ query ; }
docstring: Status filter scope
  
  @param Builder $query
  @param string $status
  @return Builder
docstring_tokens: Status filter scope