original_string: public function setCreatedAtAttribute($createdAt)
      {
          if (!$createdAt) {
              return;
          }
  
          if (!$createdAt instanceof DateTime) {
              $createdAt = Carbon::parse($createdAt);
          }
  
          $timestamp = $createdAt->format('U');
          $timestamp = 30 * round($timestamp / 30);
  
          $date = Carbon::createFromFormat('U', $timestamp)->toDateTimeString();
  
          $this->attributes['created_at'] = $date;
  
          return $date;
      }
code: public function setCreatedAtAttribute($createdAt)
      {
          if (!$createdAt) {
              return;
          }
  
          if (!$createdAt instanceof DateTime) {
              $createdAt = Carbon::parse($createdAt);
          }
  
          $timestamp = $createdAt->format('U');
          $timestamp = 30 * round($timestamp / 30);
  
          $date = Carbon::createFromFormat('U', $timestamp)->toDateTimeString();
  
          $this->attributes['created_at'] = $date;
  
          return $date;
      }
code_tokens: public function setCreatedAtAttribute ( $ createdAt ) { if ( ! $ createdAt ) { return ; } if ( ! $ createdAt instanceof DateTime ) { $ createdAt = Carbon :: parse ( $ createdAt ) ; } $ timestamp = $ createdAt -> format ( 'U' ) ; $ timestamp = 30 * round ( $ timestamp / 30 ) ; $ date = Carbon :: createFromFormat ( 'U' , $ timestamp ) -> toDateTimeString ( ) ; $ this -> attributes [ 'created_at' ] = $ date ; return $ date ; }
docstring: Round the created at value into intervals of 30 seconds.
  
  @param string $createdAt
  
  @return string|void
docstring_tokens: Round the created at value into intervals of 30 seconds .