code: public static function fromArray(array $params = [])
      {
          $object = new static();
  
          foreach ($params as $key => $value) {
              $method = 'set' . ucfirst($key);
  
              if (method_exists($object, $method)) {
                  $object->$method($value);
              }
          }
  
          return $object;
      }
docs: @param array $params
  
  @return $this