original_string: public function scopeIsVerifiedForComponent(Builder $query, $component_id)
      {
          return $query->select('subscriptions.*')
              ->join('subscribers', 'subscriptions.subscriber_id', '=', 'subscribers.id')
              ->where(function ($query) {
                  $query->where('subscriptions.component_id', '=', $component_id)
                      ->orWhere('subscribers.global');
              })
              ->whereNotNull('subscribers.verified_at');
      }
code: public function scopeIsVerifiedForComponent(Builder $query, $component_id)
      {
          return $query->select('subscriptions.*')
              ->join('subscribers', 'subscriptions.subscriber_id', '=', 'subscribers.id')
              ->where(function ($query) {
                  $query->where('subscriptions.component_id', '=', $component_id)
                      ->orWhere('subscribers.global');
              })
              ->whereNotNull('subscribers.verified_at');
      }
code_tokens: public function scopeIsVerifiedForComponent ( Builder $ query , $ component_id ) { return $ query -> select ( 'subscriptions.*' ) -> join ( 'subscribers' , 'subscriptions.subscriber_id' , '=' , 'subscribers.id' ) -> where ( function ( $ query ) { $ query -> where ( 'subscriptions.component_id' , '=' , $ component_id ) -> orWhere ( 'subscribers.global' ) ; } ) -> whereNotNull ( 'subscribers.verified_at' ) ; }
docstring: Finds all verified subscriptions for a component.
  
  @param \Illuminate\Database\Eloquent\Builder $query
  @param int                                   $component_id
  
  @return \Illuminate\Database\Eloquent\Builder
docstring_tokens: Finds all verified subscriptions for a component .