original_string: public function isRequired() : Group
      {
          foreach ((array)$this as $el) {
              if (!is_object($el)) {
                  continue;
              }
              $el->getElement()->attribute('required', 1);
          }
          return $this->addTest('required', function ($value) {
              foreach ($value as $option) {
                  if ($option->getElement() instanceof Radio
                      && $option->getElement()->checked()
                  ) {
                      return true;
                  }
              }
              return false;
          });
      }
code: public function isRequired() : Group
      {
          foreach ((array)$this as $el) {
              if (!is_object($el)) {
                  continue;
              }
              $el->getElement()->attribute('required', 1);
          }
          return $this->addTest('required', function ($value) {
              foreach ($value as $option) {
                  if ($option->getElement() instanceof Radio
                      && $option->getElement()->checked()
                  ) {
                      return true;
                  }
              }
              return false;
          });
      }
code_tokens: public function isRequired ( ) : Group { foreach ( ( array ) $ this as $ el ) { if ( ! is_object ( $ el ) ) { continue ; } $ el -> getElement ( ) -> attribute ( 'required' , 1 ) ; } return $ this -> addTest ( 'required' , function ( $ value ) { foreach ( $ value as $ option ) { if ( $ option -> getElement ( ) instanceof Radio && $ option -> getElement ( ) -> checked ( ) ) { return true ; } } return false ; } ) ; }
docstring: Marks the group as required.
  
  @return self
docstring_tokens: Marks the group as required .