original_string: public function getRequiredParams(): array
  	{
  		$regex = '/\[[^\[]+?\]/';
  		$path = $this->getPath();
  
  		while (preg_match($regex, $path)) {
  			$path = preg_replace($regex, '', $path);
  		}
  
  		$required = [];
  
  		preg_replace_callback('/<(\w+)>/', function ($item) use (&$required) {
  			$required[] = end($item);
  		}, $path);
  
  		return $required;
  	}
code: public function getRequiredParams(): array
  	{
  		$regex = '/\[[^\[]+?\]/';
  		$path = $this->getPath();
  
  		while (preg_match($regex, $path)) {
  			$path = preg_replace($regex, '', $path);
  		}
  
  		$required = [];
  
  		preg_replace_callback('/<(\w+)>/', function ($item) use (&$required) {
  			$required[] = end($item);
  		}, $path);
  
  		return $required;
  	}
code_tokens: public function getRequiredParams ( ) : array { $ regex = '/\[[^\[]+?\]/' ; $ path = $ this -> getPath ( ) ; while ( preg_match ( $ regex , $ path ) ) { $ path = preg_replace ( $ regex , '' , $ path ) ; } $ required = [ ] ; preg_replace_callback ( '/<(\w+)>/' , function ( $ item ) use ( & $ required ) { $ required [ ] = end ( $ item ) ; } , $ path ) ; return $ required ; }
docstring: Get required parameters from url mask
docstring_tokens: Get required parameters from url mask