Passed
Push — search ( bdb480...5e7f6e )
by Simon
17:14 queued 07:17
created

SiteConfiguration::setOAuthBaseUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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