← All changes
|
includes/Dependencies/SuperClosure/SerializableClosure.php
+1
-4
4.9.0
→
3.8.9
View file →
| @@ -1,12 +1,9 @@ | ||
| 1 | 1 | <?php namespace WPDeveloper\BetterDocs\Dependencies\SuperClosure; |
| 2 | -// phpcs:ignoreFile -- Bundled third-party (Mozart) dependency; exempt from plugin coding standards. | |
| 3 | 2 | |
| 4 | 3 | use Closure; |
| 5 | 4 | use WPDeveloper\BetterDocs\Dependencies\SuperClosure\Exception\ClosureUnserializationException; |
| 6 | 5 | |
| 7 | -if ( ! defined( 'ABSPATH' ) ) { exit; } // Prevent direct file access. | |
| 8 | - | |
| 9 | 6 | /** |
| 10 | 7 | * This class acts as a wrapper for a closure, and allows it to be serialized. |
| 11 | 8 | * |
| 12 | 9 | * With the combined power of the Reflection API, code parsing, and the infamous |
| @@ -43,9 +40,9 @@ | ||
| 43 | 40 | * @param SerializerInterface|null $serializer |
| 44 | 41 | */ |
| 45 | 42 | public function __construct( |
| 46 | 43 | \Closure $closure, |
| 47 | - ?SerializerInterface $serializer = null | |
| 44 | + SerializerInterface $serializer = null | |
| 48 | 45 | ) { |
| 49 | 46 | $this->closure = $closure; |
| 50 | 47 | $this->serializer = $serializer ?: new Serializer; |
| 51 | 48 | } |