Showing 1 of 1 files from the diff.

@@ -11,6 +11,7 @@
Loading
11 11
namespace Carbon\Traits;
12 12
13 13
use Carbon\Exceptions\InvalidFormatException;
14 +
use DateTimeZone;
14 15
15 16
/**
16 17
 * Trait Serialization.
@@ -127,9 +128,14 @@
Loading
127 128
     */
128 129
    public function __wakeup()
129 130
    {
130 -
        if (get_parent_class() && method_exists(parent::class, '__wakeup')) {
131 +
        // FatalError occurs when calling __wakeup method in PHP 7.4 or later.
132 +
        // @codeCoverageIgnoreStart
133 +
        if (version_compare(PHP_VERSION, '7.4.0-dev', '>=')) {
134 +
            parent::__construct($this->date, $this->timezone !== null ? new DateTimeZone($this->timezone) : null);
135 +
        } elseif (get_parent_class() && method_exists(parent::class, '__wakeup')) {
131 136
            parent::__wakeup();
132 137
        }
138 +
        // @codeCoverageIgnoreEnd
133 139
134 140
        $this->constructedObjectId = spl_object_hash($this);
135 141
Files Coverage
src/Carbon 100.00%
Project Totals (885 files) 100.00%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading