@@ -279,13 +279,13 @@ public function reportOnly(bool $value = true)
279279 * @see http://www.w3.org/TR/CSP/#directive-base-uri
280280 *
281281 * @param string|array $uri
282- * @param boolean|null $override
282+ * @param boolean|null $explicitReporting
283283 *
284284 * @return $this
285285 */
286- public function addBaseURI ($ uri , ?bool $ override = null )
286+ public function addBaseURI ($ uri , ?bool $ explicitReporting = null )
287287 {
288- $ this ->addOption ($ uri , 'baseURI ' , $ override ?? $ this ->reportOnly );
288+ $ this ->addOption ($ uri , 'baseURI ' , $ explicitReporting ?? $ this ->reportOnly );
289289
290290 return $ this ;
291291 }
@@ -303,13 +303,13 @@ public function addBaseURI($uri, ?bool $override = null)
303303 * @see http://www.w3.org/TR/CSP/#directive-child-src
304304 *
305305 * @param string|array $uri
306- * @param boolean|null $override
306+ * @param boolean|null $explicitReporting
307307 *
308308 * @return $this
309309 */
310- public function addChildSrc ($ uri , ?bool $ override = null )
310+ public function addChildSrc ($ uri , ?bool $ explicitReporting = null )
311311 {
312- $ this ->addOption ($ uri , 'childSrc ' , $ override ?? $ this ->reportOnly );
312+ $ this ->addOption ($ uri , 'childSrc ' , $ explicitReporting ?? $ this ->reportOnly );
313313
314314 return $ this ;
315315 }
@@ -326,13 +326,13 @@ public function addChildSrc($uri, ?bool $override = null)
326326 * @see http://www.w3.org/TR/CSP/#directive-connect-src
327327 *
328328 * @param string|array $uri
329- * @param boolean|null $override
329+ * @param boolean|null $explicitReporting
330330 *
331331 * @return $this
332332 */
333- public function addConnectSrc ($ uri , ?bool $ override = null )
333+ public function addConnectSrc ($ uri , ?bool $ explicitReporting = null )
334334 {
335- $ this ->addOption ($ uri , 'connectSrc ' , $ override ?? $ this ->reportOnly );
335+ $ this ->addOption ($ uri , 'connectSrc ' , $ explicitReporting ?? $ this ->reportOnly );
336336
337337 return $ this ;
338338 }
@@ -349,13 +349,13 @@ public function addConnectSrc($uri, ?bool $override = null)
349349 * @see http://www.w3.org/TR/CSP/#directive-default-src
350350 *
351351 * @param string|array $uri
352- * @param boolean|null $override
352+ * @param boolean|null $explicitReporting
353353 *
354354 * @return $this
355355 */
356- public function setDefaultSrc ($ uri , ?bool $ override = null )
356+ public function setDefaultSrc ($ uri , ?bool $ explicitReporting = null )
357357 {
358- $ this ->defaultSrc = [(string ) $ uri => $ override ?? $ this ->reportOnly ];
358+ $ this ->defaultSrc = [(string ) $ uri => $ explicitReporting ?? $ this ->reportOnly ];
359359
360360 return $ this ;
361361 }
@@ -371,13 +371,13 @@ public function setDefaultSrc($uri, ?bool $override = null)
371371 * @see http://www.w3.org/TR/CSP/#directive-font-src
372372 *
373373 * @param string|array $uri
374- * @param boolean|null $override
374+ * @param boolean|null $explicitReporting
375375 *
376376 * @return $this
377377 */
378- public function addFontSrc ($ uri , ?bool $ override = null )
378+ public function addFontSrc ($ uri , ?bool $ explicitReporting = null )
379379 {
380- $ this ->addOption ($ uri , 'fontSrc ' , $ override ?? $ this ->reportOnly );
380+ $ this ->addOption ($ uri , 'fontSrc ' , $ explicitReporting ?? $ this ->reportOnly );
381381
382382 return $ this ;
383383 }
@@ -391,13 +391,13 @@ public function addFontSrc($uri, ?bool $override = null)
391391 * @see http://www.w3.org/TR/CSP/#directive-form-action
392392 *
393393 * @param string|array $uri
394- * @param boolean|null $override
394+ * @param boolean|null $explicitReporting
395395 *
396396 * @return $this
397397 */
398- public function addFormAction ($ uri , ?bool $ override = null )
398+ public function addFormAction ($ uri , ?bool $ explicitReporting = null )
399399 {
400- $ this ->addOption ($ uri , 'formAction ' , $ override ?? $ this ->reportOnly );
400+ $ this ->addOption ($ uri , 'formAction ' , $ explicitReporting ?? $ this ->reportOnly );
401401
402402 return $ this ;
403403 }
@@ -411,13 +411,13 @@ public function addFormAction($uri, ?bool $override = null)
411411 * @see http://www.w3.org/TR/CSP/#directive-frame-ancestors
412412 *
413413 * @param string|array $uri
414- * @param boolean|null $override
414+ * @param boolean|null $explicitReporting
415415 *
416416 * @return $this
417417 */
418- public function addFrameAncestor ($ uri , ?bool $ override = null )
418+ public function addFrameAncestor ($ uri , ?bool $ explicitReporting = null )
419419 {
420- $ this ->addOption ($ uri , 'frameAncestors ' , $ override ?? $ this ->reportOnly );
420+ $ this ->addOption ($ uri , 'frameAncestors ' , $ explicitReporting ?? $ this ->reportOnly );
421421
422422 return $ this ;
423423 }
@@ -431,13 +431,13 @@ public function addFrameAncestor($uri, ?bool $override = null)
431431 * @see http://www.w3.org/TR/CSP/#directive-img-src
432432 *
433433 * @param string|array $uri
434- * @param boolean|null $override
434+ * @param boolean|null $explicitReporting
435435 *
436436 * @return $this
437437 */
438- public function addImageSrc ($ uri , ?bool $ override = null )
438+ public function addImageSrc ($ uri , ?bool $ explicitReporting = null )
439439 {
440- $ this ->addOption ($ uri , 'imageSrc ' , $ override ?? $ this ->reportOnly );
440+ $ this ->addOption ($ uri , 'imageSrc ' , $ explicitReporting ?? $ this ->reportOnly );
441441
442442 return $ this ;
443443 }
@@ -451,13 +451,13 @@ public function addImageSrc($uri, ?bool $override = null)
451451 * @see http://www.w3.org/TR/CSP/#directive-media-src
452452 *
453453 * @param string|array $uri
454- * @param boolean|null $override
454+ * @param boolean|null $explicitReporting
455455 *
456456 * @return $this
457457 */
458- public function addMediaSrc ($ uri , ?bool $ override = null )
458+ public function addMediaSrc ($ uri , ?bool $ explicitReporting = null )
459459 {
460- $ this ->addOption ($ uri , 'mediaSrc ' , $ override ?? $ this ->reportOnly );
460+ $ this ->addOption ($ uri , 'mediaSrc ' , $ explicitReporting ?? $ this ->reportOnly );
461461
462462 return $ this ;
463463 }
@@ -471,13 +471,13 @@ public function addMediaSrc($uri, ?bool $override = null)
471471 * @see https://www.w3.org/TR/CSP/#directive-manifest-src
472472 *
473473 * @param string|array $uri
474- * @param boolean|null $override
474+ * @param boolean|null $explicitReporting
475475 *
476476 * @return $this
477477 */
478- public function addManifestSrc ($ uri , ?bool $ override = null )
478+ public function addManifestSrc ($ uri , ?bool $ explicitReporting = null )
479479 {
480- $ this ->addOption ($ uri , 'manifestSrc ' , $ override ?? $ this ->reportOnly );
480+ $ this ->addOption ($ uri , 'manifestSrc ' , $ explicitReporting ?? $ this ->reportOnly );
481481
482482 return $ this ;
483483 }
@@ -491,13 +491,13 @@ public function addManifestSrc($uri, ?bool $override = null)
491491 * @see http://www.w3.org/TR/CSP/#directive-object-src
492492 *
493493 * @param string|array $uri
494- * @param boolean|null $override
494+ * @param boolean|null $explicitReporting
495495 *
496496 * @return $this
497497 */
498- public function addObjectSrc ($ uri , ?bool $ override = null )
498+ public function addObjectSrc ($ uri , ?bool $ explicitReporting = null )
499499 {
500- $ this ->addOption ($ uri , 'objectSrc ' , $ override ?? $ this ->reportOnly );
500+ $ this ->addOption ($ uri , 'objectSrc ' , $ explicitReporting ?? $ this ->reportOnly );
501501
502502 return $ this ;
503503 }
@@ -510,14 +510,14 @@ public function addObjectSrc($uri, ?bool $override = null)
510510 *
511511 * @see http://www.w3.org/TR/CSP/#directive-plugin-types
512512 *
513- * @param string|array $mime One or more plugin mime types, separate by spaces
514- * @param boolean|null $override
513+ * @param string|array $mime One or more plugin mime types, separate by spaces
514+ * @param boolean|null $explicitReporting
515515 *
516516 * @return $this
517517 */
518- public function addPluginType ($ mime , ?bool $ override = null )
518+ public function addPluginType ($ mime , ?bool $ explicitReporting = null )
519519 {
520- $ this ->addOption ($ mime , 'pluginTypes ' , $ override ?? $ this ->reportOnly );
520+ $ this ->addOption ($ mime , 'pluginTypes ' , $ explicitReporting ?? $ this ->reportOnly );
521521
522522 return $ this ;
523523 }
@@ -549,14 +549,14 @@ public function setReportURI($uri)
549549 *
550550 * @see http://www.w3.org/TR/CSP/#directive-sandbox
551551 *
552- * @param string|array $flags An array of sandbox flags that can be added to the directive.
553- * @param boolean|null $override
552+ * @param string|array $flags An array of sandbox flags that can be added to the directive.
553+ * @param boolean|null $explicitReporting
554554 *
555555 * @return $this
556556 */
557- public function addSandbox ($ flags , ?bool $ override = null )
557+ public function addSandbox ($ flags , ?bool $ explicitReporting = null )
558558 {
559- $ this ->addOption ($ flags , 'sandbox ' , $ override ?? $ this ->reportOnly );
559+ $ this ->addOption ($ flags , 'sandbox ' , $ explicitReporting ?? $ this ->reportOnly );
560560 return $ this ;
561561 }
562562
@@ -569,13 +569,13 @@ public function addSandbox($flags, ?bool $override = null)
569569 * @see http://www.w3.org/TR/CSP/#directive-connect-src
570570 *
571571 * @param string|array $uri
572- * @param boolean|null $override
572+ * @param boolean|null $explicitReporting
573573 *
574574 * @return $this
575575 */
576- public function addScriptSrc ($ uri , ?bool $ override = null )
576+ public function addScriptSrc ($ uri , ?bool $ explicitReporting = null )
577577 {
578- $ this ->addOption ($ uri , 'scriptSrc ' , $ override ?? $ this ->reportOnly );
578+ $ this ->addOption ($ uri , 'scriptSrc ' , $ explicitReporting ?? $ this ->reportOnly );
579579
580580 return $ this ;
581581 }
@@ -589,13 +589,13 @@ public function addScriptSrc($uri, ?bool $override = null)
589589 * @see http://www.w3.org/TR/CSP/#directive-connect-src
590590 *
591591 * @param string|array $uri
592- * @param boolean|null $override
592+ * @param boolean|null $explicitReporting
593593 *
594594 * @return $this
595595 */
596- public function addStyleSrc ($ uri , ?bool $ override = null )
596+ public function addStyleSrc ($ uri , ?bool $ explicitReporting = null )
597597 {
598- $ this ->addOption ($ uri , 'styleSrc ' , $ override ?? $ this ->reportOnly );
598+ $ this ->addOption ($ uri , 'styleSrc ' , $ explicitReporting ?? $ this ->reportOnly );
599599
600600 return $ this ;
601601 }
@@ -626,9 +626,9 @@ public function upgradeInsecureRequests(bool $value = true)
626626 *
627627 * @param string|array $options
628628 * @param string $target
629- * @param boolean|null $override
629+ * @param boolean|null $explicitReporting
630630 */
631- protected function addOption ($ options , string $ target , ?bool $ override = null )
631+ protected function addOption ($ options , string $ target , ?bool $ explicitReporting = null )
632632 {
633633 // Ensure we have an array to work with...
634634 if (is_string ($ this ->{$ target }))
@@ -640,12 +640,12 @@ protected function addOption($options, string $target, ?bool $override = null)
640640 {
641641 foreach ($ options as $ opt )
642642 {
643- $ this ->{$ target }[$ opt ] = $ override ?? $ this ->reportOnly ;
643+ $ this ->{$ target }[$ opt ] = $ explicitReporting ?? $ this ->reportOnly ;
644644 }
645645 }
646646 else
647647 {
648- $ this ->{$ target }[$ options ] = $ override ?? $ this ->reportOnly ;
648+ $ this ->{$ target }[$ options ] = $ explicitReporting ?? $ this ->reportOnly ;
649649 }
650650 }
651651
0 commit comments