original_string: public function getErrors($attribute = null)
      {
          $itemErrors = [];
  
          foreach ($this->getItems() as $item) {
              if ($item->hasErrors($attribute)) {
                  $itemErrors[$this->getItemId($item)] = $item->getErrors($attribute);
              }
          }
  
          return array_merge(
              $this->_traitGetErrors($attribute),
              $itemErrors
          );
      }
code: public function getErrors($attribute = null)
      {
          $itemErrors = [];
  
          foreach ($this->getItems() as $item) {
              if ($item->hasErrors($attribute)) {
                  $itemErrors[$this->getItemId($item)] = $item->getErrors($attribute);
              }
          }
  
          return array_merge(
              $this->_traitGetErrors($attribute),
              $itemErrors
          );
      }
code_tokens: public function getErrors ( $ attribute = null ) { $ itemErrors = [ ] ; foreach ( $ this -> getItems ( ) as $ item ) { if ( $ item -> hasErrors ( $ attribute ) ) { $ itemErrors [ $ this -> getItemId ( $ item ) ] = $ item -> getErrors ( $ attribute ) ; } } return array_merge ( $ this -> _traitGetErrors ( $ attribute ) , $ itemErrors ) ; }
docstring: Merge errors from all
  @inheritdoc
docstring_tokens: Merge errors from all