original_string: public static function getInstance(Model $model, $attribute)
      {
          foreach ($model->behaviors as $behavior) {
              if ($behavior instanceof self && $behavior->attribute == $attribute) {
                  return $behavior;
              }
          }
  
          throw new InvalidCallException('Missing behavior for attribute ' . VarDumper::dumpAsString($attribute));
      }
code: public static function getInstance(Model $model, $attribute)
      {
          foreach ($model->behaviors as $behavior) {
              if ($behavior instanceof self && $behavior->attribute == $attribute) {
                  return $behavior;
              }
          }
  
          throw new InvalidCallException('Missing behavior for attribute ' . VarDumper::dumpAsString($attribute));
      }
code_tokens: public static function getInstance ( Model $ model , $ attribute ) { foreach ( $ model -> behaviors as $ behavior ) { if ( $ behavior instanceof self && $ behavior -> attribute == $ attribute ) { return $ behavior ; } } throw new InvalidCallException ( 'Missing behavior for attribute ' . VarDumper :: dumpAsString ( $ attribute ) ) ; }
docstring: Returns behavior instance for specified object and attribute
  
  @param Model $model
  @param string $attribute
  @return static
docstring_tokens: Returns behavior instance for specified object and attribute