Passed
Push — webauthn ( 7464d3...2a68c3 )
by Simon
08:56
created

SiteConfiguration::getMediawikiScriptPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/******************************************************************************
3
 * Wikipedia Account Creation Assistance tool                                 *
4
 *                                                                            *
5
 * All code in this file is released into the public domain by the ACC        *
6
 * Development Team. Please see team.json for a list of contributors.         *
7
 ******************************************************************************/
8
9
namespace Waca;
10
11
/**
12
 * Class SiteConfiguration
13
 *
14
 * IMPORTANT: This class must never throw an exception or trigger an error. It's used in the error handler.
15
 *
16
 * @package Waca
17
 */
18
class SiteConfiguration
19
{
20
    private $baseUrl;
21
    private $filePath;
22
    private $schemaVersion = 42;
23
    private $debuggingTraceEnabled;
24
    private $debuggingCssBreakpointsEnabled;
25
    private $dataClearIp = '127.0.0.1';
26
    private $dataClearEmail = '[email protected]';
27
    private $dataClearInterval = '15 DAY';
28
    private $forceIdentification = true;
29
    private $identificationCacheExpiry = '1 DAY';
30
    private $metaWikimediaWebServiceEndpoint = 'https://meta.wikimedia.org/w/api.php';
31
    private $enforceOAuth = true;
32
    private $emailConfirmationEnabled = true;
33
    private $emailConfirmationExpiryDays = 7;
34
    private $miserModeLimit = 25;
35
    private $squidList = array();
36
    private $useStrictTransportSecurity = false;
37
    private $userAgent = 'Wikipedia-ACC Tool/0.1 (+https://accounts.wmflabs.org/internal.php/team)';
38
    private $curlDisableVerifyPeer = false;
39
    private $useOAuthSignup = true;
40
    private $oauthConsumerToken;
41
    /** @var array */
42
    private $oauthLegacyConsumerTokens;
43
    private $oauthConsumerSecret;
44
    private $oauthIdentityGraceTime = '24 hours';
45
    private $oauthMediaWikiCanonicalServer = 'https://en.wikipedia.org';
46
    private $xffTrustedHostsFile = '../TrustedXFF/trusted-hosts.txt';
47
    private $crossOriginResourceSharingHosts = array(
48
        "https://en.wikipedia.org",
49
        "https://meta.wikimedia.org",
50
    );
51
    private $ircNotificationsEnabled = true;
52
    private $ircNotificationsInstance = 'Development';
53
    private $errorLog = 'errorlog';
54
    private $titleBlacklistEnabled = false;
55
    /** @var null|string $locationProviderApiKey */
56
    private $locationProviderApiKey = null;
57
    private $torExitPaths = array();
58
    private $creationBotUsername = '';
59
    private $creationBotPassword = '';
60
    private $curlCookieJar = null;
61
    private $yubicoApiId = 0;
62
    private $yubicoApiKey = "";
63
    private $totpEncryptionKey = "1234";
64
    private $identificationNoticeboardPage = 'Access to nonpublic personal data policy/Noticeboard';
65
    private $identificationNoticeboardWebserviceEndpoint = 'https://meta.wikimedia.org/w/api.php';
66
    private $registrationAllowed = true;
67
    private $cspReportUri = null;
68
    private $resourceCacheEpoch = 1;
69
    private $commonEmailDomains = [];
70
    private $banMaxIpBlockRange = [4 => 20, 6 => 48];
71
    private $banMaxIpRange = [4 => 16, 6 => 32];
72
    private $jobQueueBatchSize = 10;
73
    private $amqpConfiguration = ['host' => 'localhost', 'port' => 5672, 'user' => 'guest', 'password' => 'guest', 'exchange' => ''];
74
    private $emailSender = '[email protected]';
75
76
    /**
77
     * Gets the base URL of the tool
78
     *
79
     * If the internal page of the tool is at http://localhost/path/internal.php, this would be set to
80
     * http://localhost/path
81
     * @return string
82
     */
83
    public function getBaseUrl()
84
    {
85
        return $this->baseUrl;
86
    }
87
88
    /**
89
     * @param string $baseUrl
90
     *
91
     * @return SiteConfiguration
92
     */
93
    public function setBaseUrl($baseUrl)
94
    {
95
        $this->baseUrl = $baseUrl;
96
97
        return $this;
98
    }
99
100
    /**
101
     * Path on disk to the directory containing the tool's code
102
     * @return string
103
     */
104
    public function getFilePath()
105
    {
106
        return $this->filePath;
107
    }
108 1
109
    /**
110 1
     * @param string $filePath
111
     *
112
     * @return SiteConfiguration
113
     */
114
    public function setFilePath($filePath)
115
    {
116
        $this->filePath = $filePath;
117
118 1
        return $this;
119
    }
120 1
121
    /**
122 1
     * @return int
123
     */
124
    public function getSchemaVersion()
125
    {
126
        return $this->schemaVersion;
127
    }
128
129 1
    /**
130
     * @param int $schemaVersion
131 1
     *
132
     * @return SiteConfiguration
133
     */
134
    public function setSchemaVersion($schemaVersion)
135
    {
136
        $this->schemaVersion = $schemaVersion;
137
138
        return $this;
139 1
    }
140
141 1
    /**
142
     * @return mixed
143 1
     */
144
    public function getDebuggingTraceEnabled()
145
    {
146
        return $this->debuggingTraceEnabled;
147
    }
148
149 1
    /**
150
     * @param mixed $debuggingTraceEnabled
151 1
     *
152
     * @return SiteConfiguration
153
     */
154
    public function setDebuggingTraceEnabled($debuggingTraceEnabled)
155
    {
156
        $this->debuggingTraceEnabled = $debuggingTraceEnabled;
157
158
        return $this;
159
    }
160
161
    public function getDebuggingCssBreakpointsEnabled() : bool
162
    {
163
        return $this->debuggingCssBreakpointsEnabled;
164
    }
165
166
    public function setDebuggingCssBreakpointsEnabled(bool $debuggingCssBreakpointsEnabled) : SiteConfiguration
167
    {
168
        $this->debuggingCssBreakpointsEnabled = $debuggingCssBreakpointsEnabled;
169 1
170
        return $this;
171 1
    }
172
173
    /**
174
     * @return string
175
     */
176
    public function getDataClearIp()
177
    {
178
        return $this->dataClearIp;
179 1
    }
180
181 1
    /**
182
     * @param string $dataClearIp
183 1
     *
184
     * @return SiteConfiguration
185
     */
186
    public function setDataClearIp($dataClearIp)
187
    {
188
        $this->dataClearIp = $dataClearIp;
189 1
190
        return $this;
191 1
    }
192
193
    /**
194
     * @return string
195
     */
196
    public function getDataClearEmail()
197
    {
198
        return $this->dataClearEmail;
199 1
    }
200
201 1
    /**
202
     * @param string $dataClearEmail
203 1
     *
204
     * @return SiteConfiguration
205
     */
206
    public function setDataClearEmail($dataClearEmail)
207
    {
208
        $this->dataClearEmail = $dataClearEmail;
209 1
210
        return $this;
211 1
    }
212
213
    /**
214
     * @return boolean
215
     */
216
    public function getForceIdentification()
217
    {
218
        return $this->forceIdentification;
219 1
    }
220
221 1
    /**
222
     * @param boolean $forceIdentification
223 1
     *
224
     * @return SiteConfiguration
225
     */
226
    public function setForceIdentification($forceIdentification)
227
    {
228
        $this->forceIdentification = $forceIdentification;
229 1
230
        return $this;
231 1
    }
232
233
    /**
234
     * @return string
235
     */
236
    public function getIdentificationCacheExpiry()
237
    {
238
        return $this->identificationCacheExpiry;
239 1
    }
240
241 1
    /**
242
     * @param string $identificationCacheExpiry
243 1
     *
244
     * @return SiteConfiguration
245
     */
246
    public function setIdentificationCacheExpiry($identificationCacheExpiry)
247
    {
248
        $this->identificationCacheExpiry = $identificationCacheExpiry;
249 1
250
        return $this;
251 1
    }
252
253
    /**
254
     * @return string
255
     */
256
    public function getMetaWikimediaWebServiceEndpoint()
257
    {
258
        return $this->metaWikimediaWebServiceEndpoint;
259 1
    }
260
261 1
    /**
262
     * @param string $metaWikimediaWebServiceEndpoint
263 1
     *
264
     * @return SiteConfiguration
265
     */
266
    public function setMetaWikimediaWebServiceEndpoint($metaWikimediaWebServiceEndpoint)
267
    {
268
        $this->metaWikimediaWebServiceEndpoint = $metaWikimediaWebServiceEndpoint;
269 1
270
        return $this;
271 1
    }
272
273
    /**
274
     * @return boolean
275
     */
276
    public function getEnforceOAuth()
277
    {
278
        return $this->enforceOAuth;
279 1
    }
280
281 1
    /**
282
     * @param boolean $enforceOAuth
283 1
     *
284
     * @return SiteConfiguration
285
     */
286
    public function setEnforceOAuth($enforceOAuth)
287
    {
288
        $this->enforceOAuth = $enforceOAuth;
289 1
290
        return $this;
291 1
    }
292
293
    /**
294
     * @return boolean
295
     */
296
    public function getEmailConfirmationEnabled()
297
    {
298
        return $this->emailConfirmationEnabled;
299 1
    }
300
301 1
    /**
302
     * @param boolean $emailConfirmationEnabled
303 1
     *
304
     * @return $this
305
     */
306
    public function setEmailConfirmationEnabled($emailConfirmationEnabled)
307
    {
308
        $this->emailConfirmationEnabled = $emailConfirmationEnabled;
309 2
310
        return $this;
311 2
    }
312
313
    /**
314
     * @return int
315
     */
316
    public function getMiserModeLimit()
317
    {
318
        return $this->miserModeLimit;
319 1
    }
320
321 1
    /**
322
     * @param int $miserModeLimit
323 1
     *
324
     * @return SiteConfiguration
325
     */
326
    public function setMiserModeLimit($miserModeLimit)
327
    {
328
        $this->miserModeLimit = $miserModeLimit;
329 1
330
        return $this;
331 1
    }
332
333
    /**
334
     * @return array
335
     */
336
    public function getSquidList()
337
    {
338
        return $this->squidList;
339 1
    }
340
341 1
    /**
342
     * @param array $squidList
343 1
     *
344
     * @return SiteConfiguration
345
     */
346
    public function setSquidList($squidList)
347
    {
348
        $this->squidList = $squidList;
349 1
350
        return $this;
351 1
    }
352
353
    /**
354
     * @return boolean
355
     */
356
    public function getUseStrictTransportSecurity()
357
    {
358
        return $this->useStrictTransportSecurity;
359 1
    }
360
361 1
    /**
362
     * @param boolean $useStrictTransportSecurity
363 1
     *
364
     * @return SiteConfiguration
365
     */
366
    public function setUseStrictTransportSecurity($useStrictTransportSecurity)
367
    {
368
        $this->useStrictTransportSecurity = $useStrictTransportSecurity;
369 1
370
        return $this;
371 1
    }
372
373
    /**
374
     * @return string
375
     */
376
    public function getUserAgent()
377
    {
378
        return $this->userAgent;
379 1
    }
380
381 1
    /**
382
     * @param string $userAgent
383 1
     *
384
     * @return SiteConfiguration
385
     */
386
    public function setUserAgent($userAgent)
387
    {
388
        $this->userAgent = $userAgent;
389 1
390
        return $this;
391 1
    }
392
393
    /**
394
     * @return boolean
395
     */
396
    public function getCurlDisableVerifyPeer()
397
    {
398
        return $this->curlDisableVerifyPeer;
399 1
    }
400
401 1
    /**
402
     * @param boolean $curlDisableVerifyPeer
403 1
     *
404
     * @return SiteConfiguration
405
     */
406
    public function setCurlDisableVerifyPeer($curlDisableVerifyPeer)
407
    {
408
        $this->curlDisableVerifyPeer = $curlDisableVerifyPeer;
409 1
410
        return $this;
411 1
    }
412
413
    /**
414
     * @return boolean
415
     */
416
    public function getUseOAuthSignup()
417
    {
418
        return $this->useOAuthSignup;
419 1
    }
420
421 1
    /**
422
     * @param boolean $useOAuthSignup
423 1
     *
424
     * @return SiteConfiguration
425
     */
426
    public function setUseOAuthSignup($useOAuthSignup)
427
    {
428
        $this->useOAuthSignup = $useOAuthSignup;
429 1
430
        return $this;
431 1
    }
432
433
    /**
434
     * @return mixed
435
     */
436
    public function getOAuthConsumerToken()
437
    {
438
        return $this->oauthConsumerToken;
439 1
    }
440
441 1
    /**
442
     * @param mixed $oauthConsumerToken
443 1
     *
444
     * @return SiteConfiguration
445
     */
446
    public function setOAuthConsumerToken($oauthConsumerToken)
447
    {
448
        $this->oauthConsumerToken = $oauthConsumerToken;
449 1
450
        return $this;
451 1
    }
452
453
    /**
454
     * @return mixed
455
     */
456
    public function getOAuthConsumerSecret()
457
    {
458
        return $this->oauthConsumerSecret;
459 1
    }
460
461 1
    /**
462
     * @param mixed $oauthConsumerSecret
463 1
     *
464
     * @return SiteConfiguration
465
     */
466
    public function setOAuthConsumerSecret($oauthConsumerSecret)
467
    {
468
        $this->oauthConsumerSecret = $oauthConsumerSecret;
469 1
470
        return $this;
471 1
    }
472
473
    /**
474
     * @return string
475
     */
476
    public function getDataClearInterval()
477
    {
478
        return $this->dataClearInterval;
479 1
    }
480
481 1
    /**
482
     * @param string $dataClearInterval
483 1
     *
484
     * @return SiteConfiguration
485
     */
486
    public function setDataClearInterval($dataClearInterval)
487
    {
488
        $this->dataClearInterval = $dataClearInterval;
489 1
490
        return $this;
491 1
    }
492
493
    /**
494
     * @return string
495
     */
496
    public function getXffTrustedHostsFile()
497
    {
498
        return $this->xffTrustedHostsFile;
499 1
    }
500
501 1
    /**
502
     * @param string $xffTrustedHostsFile
503 1
     *
504
     * @return SiteConfiguration
505
     */
506
    public function setXffTrustedHostsFile($xffTrustedHostsFile)
507
    {
508
        $this->xffTrustedHostsFile = $xffTrustedHostsFile;
509 2
510
        return $this;
511 2
    }
512
513
    /**
514
     * @return array
515
     */
516
    public function getCrossOriginResourceSharingHosts()
517
    {
518
        return $this->crossOriginResourceSharingHosts;
519 1
    }
520
521 1
    /**
522
     * @param array $crossOriginResourceSharingHosts
523 1
     *
524
     * @return SiteConfiguration
525
     */
526
    public function setCrossOriginResourceSharingHosts($crossOriginResourceSharingHosts)
527
    {
528
        $this->crossOriginResourceSharingHosts = $crossOriginResourceSharingHosts;
529 2
530
        return $this;
531 2
    }
532
533
    /**
534
     * @return boolean
535
     */
536
    public function getIrcNotificationsEnabled()
537
    {
538
        return $this->ircNotificationsEnabled;
539 2
    }
540
541 2
    /**
542
     * @param boolean $ircNotificationsEnabled
543 2
     *
544
     * @return SiteConfiguration
545
     */
546
    public function setIrcNotificationsEnabled($ircNotificationsEnabled)
547
    {
548
        $this->ircNotificationsEnabled = $ircNotificationsEnabled;
549 1
550
        return $this;
551 1
    }
552
553
    /**
554
     * @param string $errorLog
555
     *
556
     * @return SiteConfiguration
557
     */
558
    public function setErrorLog($errorLog)
559 1
    {
560
        $this->errorLog = $errorLog;
561 1
562
        return $this;
563 1
    }
564
565
    /**
566
     * @return string
567
     */
568
    public function getErrorLog()
569 1
    {
570
        return $this->errorLog;
571 1
    }
572
573
    /**
574
     * @param int $emailConfirmationExpiryDays
575
     *
576
     * @return SiteConfiguration
577
     */
578
    public function setEmailConfirmationExpiryDays($emailConfirmationExpiryDays)
579 1
    {
580
        $this->emailConfirmationExpiryDays = $emailConfirmationExpiryDays;
581 1
582
        return $this;
583 1
    }
584
585
    /**
586
     * @return int
587
     */
588
    public function getEmailConfirmationExpiryDays()
589 1
    {
590
        return $this->emailConfirmationExpiryDays;
591 1
    }
592
593
    /**
594
     * @param string $ircNotificationsInstance
595
     *
596
     * @return SiteConfiguration
597
     */
598
    public function setIrcNotificationsInstance($ircNotificationsInstance)
599 1
    {
600
        $this->ircNotificationsInstance = $ircNotificationsInstance;
601 1
602
        return $this;
603 1
    }
604
605
    /**
606
     * @return string
607
     */
608
    public function getIrcNotificationsInstance()
609 1
    {
610
        return $this->ircNotificationsInstance;
611 1
    }
612
613
    /**
614
     * @param boolean $titleBlacklistEnabled
615
     *
616
     * @return SiteConfiguration
617
     */
618
    public function setTitleBlacklistEnabled($titleBlacklistEnabled)
619 1
    {
620
        $this->titleBlacklistEnabled = $titleBlacklistEnabled;
621 1
622
        return $this;
623 1
    }
624
625
    /**
626
     * @return boolean
627
     */
628
    public function getTitleBlacklistEnabled()
629 1
    {
630
        return $this->titleBlacklistEnabled;
631 1
    }
632
633
    /**
634
     * @param string|null $locationProviderApiKey
635
     *
636
     * @return SiteConfiguration
637
     */
638
    public function setLocationProviderApiKey($locationProviderApiKey)
639 1
    {
640
        $this->locationProviderApiKey = $locationProviderApiKey;
641 1
642
        return $this;
643 1
    }
644
645
    /**
646
     * @return null|string
647
     */
648
    public function getLocationProviderApiKey()
649 1
    {
650
        return $this->locationProviderApiKey;
651 1
    }
652
653
    /**
654
     * @param array $torExitPaths
655
     *
656
     * @return SiteConfiguration
657
     */
658
    public function setTorExitPaths($torExitPaths)
659 1
    {
660
        $this->torExitPaths = $torExitPaths;
661 1
662
        return $this;
663 1
    }
664
665
    /**
666
     * @return array
667
     */
668
    public function getTorExitPaths()
669 1
    {
670
        return $this->torExitPaths;
671 1
    }
672
673
    /**
674
     * @param string $oauthIdentityGraceTime
675
     *
676
     * @return SiteConfiguration
677
     */
678
    public function setOauthIdentityGraceTime($oauthIdentityGraceTime)
679 1
    {
680
        $this->oauthIdentityGraceTime = $oauthIdentityGraceTime;
681 1
682
        return $this;
683 1
    }
684
685
    /**
686
     * @return string
687
     */
688
    public function getOauthIdentityGraceTime()
689 1
    {
690
        return $this->oauthIdentityGraceTime;
691 1
    }
692
693
    /**
694
     * @param string $oauthMediaWikiCanonicalServer
695
     *
696
     * @return SiteConfiguration
697
     */
698
    public function setOauthMediaWikiCanonicalServer($oauthMediaWikiCanonicalServer)
699 1
    {
700
        $this->oauthMediaWikiCanonicalServer = $oauthMediaWikiCanonicalServer;
701 1
702
        return $this;
703 1
    }
704
705
    /**
706
     * @return string
707
     */
708
    public function getOauthMediaWikiCanonicalServer()
709 1
    {
710
        return $this->oauthMediaWikiCanonicalServer;
711 1
    }
712
713
    /**
714
     * @param string $creationBotUsername
715
     *
716
     * @return SiteConfiguration
717
     */
718
    public function setCreationBotUsername($creationBotUsername)
719 1
    {
720
        $this->creationBotUsername = $creationBotUsername;
721 1
722
        return $this;
723 1
    }
724
725
    /**
726
     * @return string
727
     */
728
    public function getCreationBotUsername()
729
    {
730
        return $this->creationBotUsername;
731 1
    }
732
733 1
    /**
734
     * @param string $creationBotPassword
735 1
     *
736
     * @return SiteConfiguration
737
     */
738
    public function setCreationBotPassword($creationBotPassword)
739
    {
740
        $this->creationBotPassword = $creationBotPassword;
741 1
742
        return $this;
743 1
    }
744
745
    /**
746
     * @return string
747
     */
748
    public function getCreationBotPassword()
749
    {
750
        return $this->creationBotPassword;
751 1
    }
752
753 1
    /**
754
     * @param string|null $curlCookieJar
755 1
     *
756
     * @return SiteConfiguration
757
     */
758
    public function setCurlCookieJar($curlCookieJar)
759
    {
760
        $this->curlCookieJar = $curlCookieJar;
761 1
762
        return $this;
763 1
    }
764
765
    /**
766
     * @return string|null
767
     */
768
    public function getCurlCookieJar()
769
    {
770
        return $this->curlCookieJar;
771 1
    }
772
773 1
    public function getYubicoApiId()
774
    {
775 1
        return $this->yubicoApiId;
776
    }
777
778
    public function setYubicoApiId($id)
779
    {
780
        $this->yubicoApiId = $id;
781 1
782
        return $this;
783 1
    }
784
785
    public function getYubicoApiKey()
786
    {
787
        return $this->yubicoApiKey;
788
    }
789
790
    public function setYubicoApiKey($key)
791 1
    {
792
        $this->yubicoApiKey = $key;
793 1
794
        return $this;
795 1
    }
796
797
    /**
798
     * @return string
799
     */
800
    public function getTotpEncryptionKey()
801 1
    {
802
        return $this->totpEncryptionKey;
803 1
    }
804
805
    /**
806
     * @param string $totpEncryptionKey
807
     *
808
     * @return SiteConfiguration
809
     */
810
    public function setTotpEncryptionKey($totpEncryptionKey)
811 1
    {
812
        $this->totpEncryptionKey = $totpEncryptionKey;
813 1
814
        return $this;
815 1
    }
816
817
    /**
818
     * @return string
819
     */
820
    public function getIdentificationNoticeboardPage()
821 1
    {
822
        return $this->identificationNoticeboardPage;
823 1
    }
824
825
    /**
826
     * @param string $identificationNoticeboardPage
827
     *
828
     * @return SiteConfiguration
829
     */
830
    public function setIdentificationNoticeboardPage($identificationNoticeboardPage)
831 1
    {
832
        $this->identificationNoticeboardPage = $identificationNoticeboardPage;
833 1
834
        return $this;
835 1
    }
836
837
    public function setIdentificationNoticeboardWebserviceEndpoint(string $identificationNoticeboardWebserviceEndpoint
838
    ): SiteConfiguration {
839
        $this->identificationNoticeboardWebserviceEndpoint = $identificationNoticeboardWebserviceEndpoint;
840
841 1
        return $this;
842
    }
843 1
844
    public function getIdentificationNoticeboardWebserviceEndpoint(): string
845
    {
846
        return $this->identificationNoticeboardWebserviceEndpoint;
847
    }
848
849
    public function isRegistrationAllowed(): bool
850
    {
851
        return $this->registrationAllowed;
852
    }
853
854
    public function setRegistrationAllowed(bool $registrationAllowed): SiteConfiguration
855
    {
856
        $this->registrationAllowed = $registrationAllowed;
857
858
        return $this;
859
    }
860
861
    /**
862
     * @return string|null
863
     */
864
    public function getCspReportUri()
865
    {
866
        return $this->cspReportUri;
867
    }
868
869
    /**
870
     * @param string|null $cspReportUri
871
     *
872
     * @return SiteConfiguration
873
     */
874
    public function setCspReportUri($cspReportUri)
875
    {
876
        $this->cspReportUri = $cspReportUri;
877
878
        return $this;
879
    }
880
881
    /**
882
     * @return int
883
     */
884
    public function getResourceCacheEpoch(): int
885
    {
886
        return $this->resourceCacheEpoch;
887
    }
888
889
    /**
890
     * @param int $resourceCacheEpoch
891
     *
892
     * @return SiteConfiguration
893
     */
894
    public function setResourceCacheEpoch(int $resourceCacheEpoch): SiteConfiguration
895
    {
896
        $this->resourceCacheEpoch = $resourceCacheEpoch;
897
898
        return $this;
899
    }
900
901
    /**
902
     * @return array
903
     */
904
    public function getCommonEmailDomains(): array
905
    {
906
        return $this->commonEmailDomains;
907
    }
908
909
    /**
910
     * @param array $commonEmailDomains
911
     *
912
     * @return SiteConfiguration
913
     */
914
    public function setCommonEmailDomains(array $commonEmailDomains): SiteConfiguration
915
    {
916
        $this->commonEmailDomains = $commonEmailDomains;
917
918
        return $this;
919
    }
920
921
    /**
922
     * @param int[] $banMaxIpBlockRange
923
     *
924
     * @return SiteConfiguration
925
     */
926
    public function setBanMaxIpBlockRange(array $banMaxIpBlockRange): SiteConfiguration
927
    {
928
        $this->banMaxIpBlockRange = $banMaxIpBlockRange;
929
930
        return $this;
931
    }
932
933
    /**
934
     * @return int[]
935
     */
936
    public function getBanMaxIpBlockRange(): array
937
    {
938
        return $this->banMaxIpBlockRange;
939
    }
940
941
    /**
942
     * @param int[] $banMaxIpRange
943
     *
944
     * @return SiteConfiguration
945
     */
946
    public function setBanMaxIpRange(array $banMaxIpRange): SiteConfiguration
947
    {
948
        $this->banMaxIpRange = $banMaxIpRange;
949
950
        return $this;
951
    }
952
953
    /**
954
     * @return int[]
955
     */
956
    public function getBanMaxIpRange(): array
957
    {
958
        return $this->banMaxIpRange;
959
    }
960
961
    /**
962
     * @param array $oauthLegacyConsumerTokens
963
     *
964
     * @return SiteConfiguration
965
     */
966
    public function setOauthLegacyConsumerTokens(array $oauthLegacyConsumerTokens): SiteConfiguration
967
    {
968
        $this->oauthLegacyConsumerTokens = $oauthLegacyConsumerTokens;
969
970
        return $this;
971
    }
972
973
    /**
974
     * @return array
975
     */
976
    public function getOauthLegacyConsumerTokens(): array
977
    {
978
        return $this->oauthLegacyConsumerTokens;
979
    }
980
981
    /**
982
     * @return int
983
     */
984
    public function getJobQueueBatchSize(): int
985
    {
986
        return $this->jobQueueBatchSize;
987
    }
988
989
    /**
990
     * @param int $jobQueueBatchSize
991
     *
992
     * @return SiteConfiguration
993 1
     */
994
    public function setJobQueueBatchSize(int $jobQueueBatchSize): SiteConfiguration
995 1
    {
996
        $this->jobQueueBatchSize = $jobQueueBatchSize;
997
998
        return $this;
999
    }
1000
1001
    /**
1002
     * @return array
1003
     */
1004
    public function getAmqpConfiguration(): array
1005
    {
1006
        return $this->amqpConfiguration;
1007
    }
1008
1009
    /**
1010
     * @param array $amqpConfiguration
1011
     *
1012
     * @return SiteConfiguration
1013
     */
1014
    public function setAmqpConfiguration(array $amqpConfiguration): SiteConfiguration
1015
    {
1016
        $this->amqpConfiguration = $amqpConfiguration;
1017
1018
        return $this;
1019
    }
1020
1021
    /**
1022
     * @return string
1023
     */
1024
    public function getEmailSender(): string
1025
    {
1026
        return $this->emailSender;
1027
    }
1028
1029
    /**
1030
     * @param string $emailSender
1031
     *
1032
     * @return SiteConfiguration
1033
     */
1034
    public function setEmailSender(string $emailSender): SiteConfiguration
1035
    {
1036
        $this->emailSender = $emailSender;
1037
1038
        return $this;
1039
}
1040
}
1041