original_string: public function addWidgetConfig(WidgetConfig $widget)
      {
          if ($widget instanceof WidgetContainerConfig) {
              $this->addContainer($widget);
          } elseif (Development::isEnabled()) {
              $this->checkIsValidWidget($widget);
          }
  
          $this->widgets[] = $widget;
      }
code: public function addWidgetConfig(WidgetConfig $widget)
      {
          if ($widget instanceof WidgetContainerConfig) {
              $this->addContainer($widget);
          } elseif (Development::isEnabled()) {
              $this->checkIsValidWidget($widget);
          }
  
          $this->widgets[] = $widget;
      }
code_tokens: public function addWidgetConfig ( WidgetConfig $ widget ) { if ( $ widget instanceof WidgetContainerConfig ) { $ this -> addContainer ( $ widget ) ; } elseif ( Development :: isEnabled ( ) ) { $ this -> checkIsValidWidget ( $ widget ) ; } $ this -> widgets [ ] = $ widget ; }
docstring: Adds a new widget to the widget config. Please make sure the widget is enabled before adding a widget as
  no such checks will be performed.
  
  @param WidgetConfig $widget
docstring_tokens: Adds a new widget to the widget config . Please make sure the widget is enabled before adding a widget as no such checks will be performed .