File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,8 @@ public function __construct(
124
124
int $ asciiIDNAOption = IDNA_DEFAULT ,
125
125
int $ unicodeIDNAOption = IDNA_DEFAULT
126
126
) {
127
- $ this ->setIDNAOptions ($ asciiIDNAOption , $ unicodeIDNAOption );
127
+ $ this ->asciiIDNAOption = $ asciiIDNAOption ;
128
+ $ this ->unicodeIDNAOption = $ unicodeIDNAOption ;
128
129
$ this ->labels = $ this ->setLabels ($ domain , $ asciiIDNAOption , $ unicodeIDNAOption );
129
130
if ([] !== $ this ->labels ) {
130
131
$ this ->domain = implode ('. ' , array_reverse ($ this ->labels ));
@@ -748,11 +749,9 @@ public function getUnicodeIDNAOption(): int
748
749
* @param int $forUnicode
749
750
* @return $this
750
751
*/
751
- public function setIDNAOptions (int $ forAscii , int $ forUnicode )
752
+ public function withIDNAOptions (int $ forAscii , int $ forUnicode )
752
753
{
753
- $ this ->asciiIDNAOption = $ forAscii ;
754
- $ this ->unicodeIDNAOption = $ forUnicode ;
755
- return $ this ;
754
+ return new self ($ this ->domain , $ this ->publicSuffix , $ forAscii , $ forUnicode );
756
755
}
757
756
758
757
/**
You can’t perform that action at this time.
0 commit comments