code: public function setFunctionalities(array $functionalities)
      {
          $this->functionalities = [];
  
          foreach ($functionalities as $item) {
              $this->addFunctionality($item);
          }
  
          return $this;
      }
docs: Sets the "functionalities" of the User.
  
  @param Functionality[] $functionalities
  
  @return User