original_string: public function toArray()
      {
          if ($this->getMaxItems() != 1) {
              return parent::toArray();
          }
  
          if (!array_key_exists(0, $this->items)) {
              return null;
          }
  
          return $this->get(0)->toArray();
      }
code: public function toArray()
      {
          if ($this->getMaxItems() != 1) {
              return parent::toArray();
          }
  
          if (!array_key_exists(0, $this->items)) {
              return null;
          }
  
          return $this->get(0)->toArray();
      }
code_tokens: public function toArray ( ) { if ( $ this -> getMaxItems ( ) != 1 ) { return parent :: toArray ( ) ; } if ( ! array_key_exists ( 0 , $ this -> items ) ) { return null ; } return $ this -> get ( 0 ) -> toArray ( ) ; }
docstring: As we use a field collection even if we have only one value, we use it that way.
  
  @return array|mixed|null
docstring_tokens: As we use a field collection even if we have only one value we use it that way .