original_string: protected function addProtectedAttributesToArray(array $attributes)
      {
          if ($this->protectedView) {
              foreach ($this->getProtectable() as $key) {
                  if (isset($attributes[$key])) {
                      $attributes[$key] = $this->protectionMask;
                  }
              }
          }
  
          return $attributes;
      }
code: protected function addProtectedAttributesToArray(array $attributes)
      {
          if ($this->protectedView) {
              foreach ($this->getProtectable() as $key) {
                  if (isset($attributes[$key])) {
                      $attributes[$key] = $this->protectionMask;
                  }
              }
          }
  
          return $attributes;
      }
code_tokens: protected function addProtectedAttributesToArray ( array $ attributes ) { if ( $ this -> protectedView ) { foreach ( $ this -> getProtectable ( ) as $ key ) { if ( isset ( $ attributes [ $ key ] ) ) { $ attributes [ $ key ] = $ this -> protectionMask ; } } } return $ attributes ; }
docstring: Replace all protected attributes in the given array with the mask
  
  @param array $attributes
  @return array
docstring_tokens: Replace all protected attributes in the given array with the mask