@@ -25,167 +25,167 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | trait Mixin |
| 27 | 27 | { |
| 28 | - /** |
|
| 29 | - * Stack of macro instance contexts. |
|
| 30 | - * |
|
| 31 | - * @var array |
|
| 32 | - */ |
|
| 33 | - protected static $macroContextStack = []; |
|
| 34 | - |
|
| 35 | - /** |
|
| 36 | - * Mix another object into the class. |
|
| 37 | - * |
|
| 38 | - * @example |
|
| 39 | - * ``` |
|
| 40 | - * Carbon::mixin(new class { |
|
| 41 | - * public function addMoon() { |
|
| 42 | - * return function () { |
|
| 43 | - * return $this->addDays(30); |
|
| 44 | - * }; |
|
| 45 | - * } |
|
| 46 | - * public function subMoon() { |
|
| 47 | - * return function () { |
|
| 48 | - * return $this->subDays(30); |
|
| 49 | - * }; |
|
| 50 | - * } |
|
| 51 | - * }); |
|
| 52 | - * $fullMoon = Carbon::create('2018-12-22'); |
|
| 53 | - * $nextFullMoon = $fullMoon->addMoon(); |
|
| 54 | - * $blackMoon = Carbon::create('2019-01-06'); |
|
| 55 | - * $previousBlackMoon = $blackMoon->subMoon(); |
|
| 56 | - * echo "$nextFullMoon\n"; |
|
| 57 | - * echo "$previousBlackMoon\n"; |
|
| 58 | - * ``` |
|
| 59 | - * |
|
| 60 | - * @param object|string $mixin |
|
| 61 | - * |
|
| 62 | - * @throws ReflectionException |
|
| 63 | - * |
|
| 64 | - * @return void |
|
| 65 | - */ |
|
| 66 | - public static function mixin($mixin) |
|
| 67 | - { |
|
| 68 | - \is_string($mixin) && trait_exists($mixin) |
|
| 69 | - ? self::loadMixinTrait($mixin) |
|
| 70 | - : self::loadMixinClass($mixin); |
|
| 71 | - } |
|
| 72 | - |
|
| 73 | - /** |
|
| 74 | - * @param object|string $mixin |
|
| 75 | - * |
|
| 76 | - * @throws ReflectionException |
|
| 77 | - */ |
|
| 78 | - private static function loadMixinClass($mixin) |
|
| 79 | - { |
|
| 80 | - $methods = (new ReflectionClass($mixin))->getMethods( |
|
| 81 | - ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED |
|
| 82 | - ); |
|
| 83 | - |
|
| 84 | - foreach ($methods as $method) { |
|
| 85 | - if ($method->isConstructor() || $method->isDestructor()) { |
|
| 86 | - continue; |
|
| 87 | - } |
|
| 88 | - |
|
| 89 | - $method->setAccessible(true); |
|
| 90 | - |
|
| 91 | - static::macro($method->name, $method->invoke($mixin)); |
|
| 92 | - } |
|
| 93 | - } |
|
| 94 | - |
|
| 95 | - /** |
|
| 96 | - * @param string $trait |
|
| 97 | - */ |
|
| 98 | - private static function loadMixinTrait($trait) |
|
| 99 | - { |
|
| 100 | - $context = eval(self::getAnonymousClassCodeForTrait($trait)); |
|
| 101 | - $className = \get_class($context); |
|
| 102 | - |
|
| 103 | - foreach (self::getMixableMethods($context) as $name) { |
|
| 104 | - $closureBase = Closure::fromCallable([$context, $name]); |
|
| 105 | - |
|
| 106 | - static::macro($name, function () use ($closureBase, $className) { |
|
| 107 | - /** @phpstan-ignore-next-line */ |
|
| 108 | - $context = isset($this) ? $this->cast($className) : new $className(); |
|
| 109 | - |
|
| 110 | - try { |
|
| 111 | - // @ is required to handle error if not converted into exceptions |
|
| 112 | - $closure = @$closureBase->bindTo($context); |
|
| 113 | - } catch (Throwable $throwable) { // @codeCoverageIgnore |
|
| 114 | - $closure = $closureBase; // @codeCoverageIgnore |
|
| 115 | - } |
|
| 116 | - |
|
| 117 | - // in case of errors not converted into exceptions |
|
| 118 | - $closure = $closure ?: $closureBase; |
|
| 119 | - |
|
| 120 | - return $closure(...\func_get_args()); |
|
| 121 | - }); |
|
| 122 | - } |
|
| 123 | - } |
|
| 124 | - |
|
| 125 | - private static function getAnonymousClassCodeForTrait(string $trait) |
|
| 126 | - { |
|
| 127 | - return 'return new class() extends '.static::class.' {use '.$trait.';};'; |
|
| 128 | - } |
|
| 129 | - |
|
| 130 | - private static function getMixableMethods(self $context): Generator |
|
| 131 | - { |
|
| 132 | - foreach (get_class_methods($context) as $name) { |
|
| 133 | - if (method_exists(static::class, $name)) { |
|
| 134 | - continue; |
|
| 135 | - } |
|
| 136 | - |
|
| 137 | - yield $name; |
|
| 138 | - } |
|
| 139 | - } |
|
| 140 | - |
|
| 141 | - /** |
|
| 142 | - * Stack a Carbon context from inside calls of self::this() and execute a given action. |
|
| 143 | - * |
|
| 144 | - * @param static|null $context |
|
| 145 | - * @param callable $callable |
|
| 146 | - * |
|
| 147 | - * @throws Throwable |
|
| 148 | - * |
|
| 149 | - * @return mixed |
|
| 150 | - */ |
|
| 151 | - protected static function bindMacroContext($context, callable $callable) |
|
| 152 | - { |
|
| 153 | - static::$macroContextStack[] = $context; |
|
| 154 | - $exception = null; |
|
| 155 | - $result = null; |
|
| 156 | - |
|
| 157 | - try { |
|
| 158 | - $result = $callable(); |
|
| 159 | - } catch (Throwable $throwable) { |
|
| 160 | - $exception = $throwable; |
|
| 161 | - } |
|
| 162 | - |
|
| 163 | - array_pop(static::$macroContextStack); |
|
| 164 | - |
|
| 165 | - if ($exception) { |
|
| 166 | - throw $exception; |
|
| 167 | - } |
|
| 168 | - |
|
| 169 | - return $result; |
|
| 170 | - } |
|
| 171 | - |
|
| 172 | - /** |
|
| 173 | - * Return the current context from inside a macro callee or a null if static. |
|
| 174 | - * |
|
| 175 | - * @return static|null |
|
| 176 | - */ |
|
| 177 | - protected static function context() |
|
| 178 | - { |
|
| 179 | - return end(static::$macroContextStack) ?: null; |
|
| 180 | - } |
|
| 181 | - |
|
| 182 | - /** |
|
| 183 | - * Return the current context from inside a macro callee or a new one if static. |
|
| 184 | - * |
|
| 185 | - * @return static |
|
| 186 | - */ |
|
| 187 | - protected static function this() |
|
| 188 | - { |
|
| 189 | - return end(static::$macroContextStack) ?: new static(); |
|
| 190 | - } |
|
| 28 | + /** |
|
| 29 | + * Stack of macro instance contexts. |
|
| 30 | + * |
|
| 31 | + * @var array |
|
| 32 | + */ |
|
| 33 | + protected static $macroContextStack = []; |
|
| 34 | + |
|
| 35 | + /** |
|
| 36 | + * Mix another object into the class. |
|
| 37 | + * |
|
| 38 | + * @example |
|
| 39 | + * ``` |
|
| 40 | + * Carbon::mixin(new class { |
|
| 41 | + * public function addMoon() { |
|
| 42 | + * return function () { |
|
| 43 | + * return $this->addDays(30); |
|
| 44 | + * }; |
|
| 45 | + * } |
|
| 46 | + * public function subMoon() { |
|
| 47 | + * return function () { |
|
| 48 | + * return $this->subDays(30); |
|
| 49 | + * }; |
|
| 50 | + * } |
|
| 51 | + * }); |
|
| 52 | + * $fullMoon = Carbon::create('2018-12-22'); |
|
| 53 | + * $nextFullMoon = $fullMoon->addMoon(); |
|
| 54 | + * $blackMoon = Carbon::create('2019-01-06'); |
|
| 55 | + * $previousBlackMoon = $blackMoon->subMoon(); |
|
| 56 | + * echo "$nextFullMoon\n"; |
|
| 57 | + * echo "$previousBlackMoon\n"; |
|
| 58 | + * ``` |
|
| 59 | + * |
|
| 60 | + * @param object|string $mixin |
|
| 61 | + * |
|
| 62 | + * @throws ReflectionException |
|
| 63 | + * |
|
| 64 | + * @return void |
|
| 65 | + */ |
|
| 66 | + public static function mixin($mixin) |
|
| 67 | + { |
|
| 68 | + \is_string($mixin) && trait_exists($mixin) |
|
| 69 | + ? self::loadMixinTrait($mixin) |
|
| 70 | + : self::loadMixinClass($mixin); |
|
| 71 | + } |
|
| 72 | + |
|
| 73 | + /** |
|
| 74 | + * @param object|string $mixin |
|
| 75 | + * |
|
| 76 | + * @throws ReflectionException |
|
| 77 | + */ |
|
| 78 | + private static function loadMixinClass($mixin) |
|
| 79 | + { |
|
| 80 | + $methods = (new ReflectionClass($mixin))->getMethods( |
|
| 81 | + ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED |
|
| 82 | + ); |
|
| 83 | + |
|
| 84 | + foreach ($methods as $method) { |
|
| 85 | + if ($method->isConstructor() || $method->isDestructor()) { |
|
| 86 | + continue; |
|
| 87 | + } |
|
| 88 | + |
|
| 89 | + $method->setAccessible(true); |
|
| 90 | + |
|
| 91 | + static::macro($method->name, $method->invoke($mixin)); |
|
| 92 | + } |
|
| 93 | + } |
|
| 94 | + |
|
| 95 | + /** |
|
| 96 | + * @param string $trait |
|
| 97 | + */ |
|
| 98 | + private static function loadMixinTrait($trait) |
|
| 99 | + { |
|
| 100 | + $context = eval(self::getAnonymousClassCodeForTrait($trait)); |
|
| 101 | + $className = \get_class($context); |
|
| 102 | + |
|
| 103 | + foreach (self::getMixableMethods($context) as $name) { |
|
| 104 | + $closureBase = Closure::fromCallable([$context, $name]); |
|
| 105 | + |
|
| 106 | + static::macro($name, function () use ($closureBase, $className) { |
|
| 107 | + /** @phpstan-ignore-next-line */ |
|
| 108 | + $context = isset($this) ? $this->cast($className) : new $className(); |
|
| 109 | + |
|
| 110 | + try { |
|
| 111 | + // @ is required to handle error if not converted into exceptions |
|
| 112 | + $closure = @$closureBase->bindTo($context); |
|
| 113 | + } catch (Throwable $throwable) { // @codeCoverageIgnore |
|
| 114 | + $closure = $closureBase; // @codeCoverageIgnore |
|
| 115 | + } |
|
| 116 | + |
|
| 117 | + // in case of errors not converted into exceptions |
|
| 118 | + $closure = $closure ?: $closureBase; |
|
| 119 | + |
|
| 120 | + return $closure(...\func_get_args()); |
|
| 121 | + }); |
|
| 122 | + } |
|
| 123 | + } |
|
| 124 | + |
|
| 125 | + private static function getAnonymousClassCodeForTrait(string $trait) |
|
| 126 | + { |
|
| 127 | + return 'return new class() extends '.static::class.' {use '.$trait.';};'; |
|
| 128 | + } |
|
| 129 | + |
|
| 130 | + private static function getMixableMethods(self $context): Generator |
|
| 131 | + { |
|
| 132 | + foreach (get_class_methods($context) as $name) { |
|
| 133 | + if (method_exists(static::class, $name)) { |
|
| 134 | + continue; |
|
| 135 | + } |
|
| 136 | + |
|
| 137 | + yield $name; |
|
| 138 | + } |
|
| 139 | + } |
|
| 140 | + |
|
| 141 | + /** |
|
| 142 | + * Stack a Carbon context from inside calls of self::this() and execute a given action. |
|
| 143 | + * |
|
| 144 | + * @param static|null $context |
|
| 145 | + * @param callable $callable |
|
| 146 | + * |
|
| 147 | + * @throws Throwable |
|
| 148 | + * |
|
| 149 | + * @return mixed |
|
| 150 | + */ |
|
| 151 | + protected static function bindMacroContext($context, callable $callable) |
|
| 152 | + { |
|
| 153 | + static::$macroContextStack[] = $context; |
|
| 154 | + $exception = null; |
|
| 155 | + $result = null; |
|
| 156 | + |
|
| 157 | + try { |
|
| 158 | + $result = $callable(); |
|
| 159 | + } catch (Throwable $throwable) { |
|
| 160 | + $exception = $throwable; |
|
| 161 | + } |
|
| 162 | + |
|
| 163 | + array_pop(static::$macroContextStack); |
|
| 164 | + |
|
| 165 | + if ($exception) { |
|
| 166 | + throw $exception; |
|
| 167 | + } |
|
| 168 | + |
|
| 169 | + return $result; |
|
| 170 | + } |
|
| 171 | + |
|
| 172 | + /** |
|
| 173 | + * Return the current context from inside a macro callee or a null if static. |
|
| 174 | + * |
|
| 175 | + * @return static|null |
|
| 176 | + */ |
|
| 177 | + protected static function context() |
|
| 178 | + { |
|
| 179 | + return end(static::$macroContextStack) ?: null; |
|
| 180 | + } |
|
| 181 | + |
|
| 182 | + /** |
|
| 183 | + * Return the current context from inside a macro callee or a new one if static. |
|
| 184 | + * |
|
| 185 | + * @return static |
|
| 186 | + */ |
|
| 187 | + protected static function this() |
|
| 188 | + { |
|
| 189 | + return end(static::$macroContextStack) ?: new static(); |
|
| 190 | + } |
|
| 191 | 191 | } |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | foreach (self::getMixableMethods($context) as $name) { |
| 104 | 104 | $closureBase = Closure::fromCallable([$context, $name]); |
| 105 | 105 | |
| 106 | - static::macro($name, function () use ($closureBase, $className) { |
|
| 106 | + static::macro($name, function() use ($closureBase, $className) { |
|
| 107 | 107 | /** @phpstan-ignore-next-line */ |
| 108 | 108 | $context = isset($this) ? $this->cast($className) : new $className(); |
| 109 | 109 | |
@@ -16,183 +16,183 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | trait Timestamp |
| 18 | 18 | { |
| 19 | - /** |
|
| 20 | - * Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). |
|
| 21 | - * |
|
| 22 | - * Timestamp input can be given as int, float or a string containing one or more numbers. |
|
| 23 | - * |
|
| 24 | - * @param float|int|string $timestamp |
|
| 25 | - * @param \DateTimeZone|string|null $tz |
|
| 26 | - * |
|
| 27 | - * @return static |
|
| 28 | - */ |
|
| 29 | - public static function createFromTimestamp($timestamp, $tz = null) |
|
| 30 | - { |
|
| 31 | - return static::createFromTimestampUTC($timestamp)->setTimezone($tz); |
|
| 32 | - } |
|
| 33 | - |
|
| 34 | - /** |
|
| 35 | - * Create a Carbon instance from an timestamp keeping the timezone to UTC. |
|
| 36 | - * |
|
| 37 | - * Timestamp input can be given as int, float or a string containing one or more numbers. |
|
| 38 | - * |
|
| 39 | - * @param float|int|string $timestamp |
|
| 40 | - * |
|
| 41 | - * @return static |
|
| 42 | - */ |
|
| 43 | - public static function createFromTimestampUTC($timestamp) |
|
| 44 | - { |
|
| 45 | - [$integer, $decimal] = self::getIntegerAndDecimalParts($timestamp); |
|
| 46 | - $delta = floor($decimal / static::MICROSECONDS_PER_SECOND); |
|
| 47 | - $integer += $delta; |
|
| 48 | - $decimal -= $delta * static::MICROSECONDS_PER_SECOND; |
|
| 49 | - $decimal = str_pad((string) $decimal, 6, '0', STR_PAD_LEFT); |
|
| 50 | - |
|
| 51 | - return static::rawCreateFromFormat('U u', "$integer $decimal"); |
|
| 52 | - } |
|
| 53 | - |
|
| 54 | - /** |
|
| 55 | - * Create a Carbon instance from a timestamp in milliseconds. |
|
| 56 | - * |
|
| 57 | - * Timestamp input can be given as int, float or a string containing one or more numbers. |
|
| 58 | - * |
|
| 59 | - * @param float|int|string $timestamp |
|
| 60 | - * |
|
| 61 | - * @return static |
|
| 62 | - */ |
|
| 63 | - public static function createFromTimestampMsUTC($timestamp) |
|
| 64 | - { |
|
| 65 | - [$milliseconds, $microseconds] = self::getIntegerAndDecimalParts($timestamp, 3); |
|
| 66 | - $sign = $milliseconds < 0 || ($milliseconds === 0.0 && $microseconds < 0) ? -1 : 1; |
|
| 67 | - $milliseconds = abs($milliseconds); |
|
| 68 | - $microseconds = $sign * abs($microseconds) + static::MICROSECONDS_PER_MILLISECOND * ($milliseconds % static::MILLISECONDS_PER_SECOND); |
|
| 69 | - $seconds = $sign * floor($milliseconds / static::MILLISECONDS_PER_SECOND); |
|
| 70 | - $delta = floor($microseconds / static::MICROSECONDS_PER_SECOND); |
|
| 71 | - $seconds += $delta; |
|
| 72 | - $microseconds -= $delta * static::MICROSECONDS_PER_SECOND; |
|
| 73 | - $microseconds = str_pad($microseconds, 6, '0', STR_PAD_LEFT); |
|
| 74 | - |
|
| 75 | - return static::rawCreateFromFormat('U u', "$seconds $microseconds"); |
|
| 76 | - } |
|
| 77 | - |
|
| 78 | - /** |
|
| 79 | - * Create a Carbon instance from a timestamp in milliseconds. |
|
| 80 | - * |
|
| 81 | - * Timestamp input can be given as int, float or a string containing one or more numbers. |
|
| 82 | - * |
|
| 83 | - * @param float|int|string $timestamp |
|
| 84 | - * @param \DateTimeZone|string|null $tz |
|
| 85 | - * |
|
| 86 | - * @return static |
|
| 87 | - */ |
|
| 88 | - public static function createFromTimestampMs($timestamp, $tz = null) |
|
| 89 | - { |
|
| 90 | - return static::createFromTimestampMsUTC($timestamp) |
|
| 91 | - ->setTimezone($tz); |
|
| 92 | - } |
|
| 93 | - |
|
| 94 | - /** |
|
| 95 | - * Set the instance's timestamp. |
|
| 96 | - * |
|
| 97 | - * Timestamp input can be given as int, float or a string containing one or more numbers. |
|
| 98 | - * |
|
| 99 | - * @param float|int|string $unixTimestamp |
|
| 100 | - * |
|
| 101 | - * @return static |
|
| 102 | - */ |
|
| 103 | - public function timestamp($unixTimestamp) |
|
| 104 | - { |
|
| 105 | - return $this->setTimestamp($unixTimestamp); |
|
| 106 | - } |
|
| 107 | - |
|
| 108 | - /** |
|
| 109 | - * Returns a timestamp rounded with the given precision (6 by default). |
|
| 110 | - * |
|
| 111 | - * @example getPreciseTimestamp() 1532087464437474 (microsecond maximum precision) |
|
| 112 | - * @example getPreciseTimestamp(6) 1532087464437474 |
|
| 113 | - * @example getPreciseTimestamp(5) 153208746443747 (1/100000 second precision) |
|
| 114 | - * @example getPreciseTimestamp(4) 15320874644375 (1/10000 second precision) |
|
| 115 | - * @example getPreciseTimestamp(3) 1532087464437 (millisecond precision) |
|
| 116 | - * @example getPreciseTimestamp(2) 153208746444 (1/100 second precision) |
|
| 117 | - * @example getPreciseTimestamp(1) 15320874644 (1/10 second precision) |
|
| 118 | - * @example getPreciseTimestamp(0) 1532087464 (second precision) |
|
| 119 | - * @example getPreciseTimestamp(-1) 153208746 (10 second precision) |
|
| 120 | - * @example getPreciseTimestamp(-2) 15320875 (100 second precision) |
|
| 121 | - * |
|
| 122 | - * @param int $precision |
|
| 123 | - * |
|
| 124 | - * @return float |
|
| 125 | - */ |
|
| 126 | - public function getPreciseTimestamp($precision = 6) |
|
| 127 | - { |
|
| 128 | - return round(((float) $this->rawFormat('Uu')) / pow(10, 6 - $precision)); |
|
| 129 | - } |
|
| 130 | - |
|
| 131 | - /** |
|
| 132 | - * Returns the milliseconds timestamps used amongst other by Date javascript objects. |
|
| 133 | - * |
|
| 134 | - * @return float |
|
| 135 | - */ |
|
| 136 | - public function valueOf() |
|
| 137 | - { |
|
| 138 | - return $this->getPreciseTimestamp(3); |
|
| 139 | - } |
|
| 140 | - |
|
| 141 | - /** |
|
| 142 | - * Returns the timestamp with millisecond precision. |
|
| 143 | - * |
|
| 144 | - * @return int |
|
| 145 | - */ |
|
| 146 | - public function getTimestampMs() |
|
| 147 | - { |
|
| 148 | - return (int) $this->getPreciseTimestamp(3); |
|
| 149 | - } |
|
| 150 | - |
|
| 151 | - /** |
|
| 152 | - * @alias getTimestamp |
|
| 153 | - * |
|
| 154 | - * Returns the UNIX timestamp for the current date. |
|
| 155 | - * |
|
| 156 | - * @return int |
|
| 157 | - */ |
|
| 158 | - public function unix() |
|
| 159 | - { |
|
| 160 | - return $this->getTimestamp(); |
|
| 161 | - } |
|
| 162 | - |
|
| 163 | - /** |
|
| 164 | - * Return an array with integer part digits and decimals digits split from one or more positive numbers |
|
| 165 | - * (such as timestamps) as string with the given number of decimals (6 by default). |
|
| 166 | - * |
|
| 167 | - * By splitting integer and decimal, this method obtain a better precision than |
|
| 168 | - * number_format when the input is a string. |
|
| 169 | - * |
|
| 170 | - * @param float|int|string $numbers one or more numbers |
|
| 171 | - * @param int $decimals number of decimals precision (6 by default) |
|
| 172 | - * |
|
| 173 | - * @return array 0-index is integer part, 1-index is decimal part digits |
|
| 174 | - */ |
|
| 175 | - private static function getIntegerAndDecimalParts($numbers, $decimals = 6) |
|
| 176 | - { |
|
| 177 | - if (\is_int($numbers) || \is_float($numbers)) { |
|
| 178 | - $numbers = number_format($numbers, $decimals, '.', ''); |
|
| 179 | - } |
|
| 180 | - |
|
| 181 | - $sign = str_starts_with($numbers, '-') ? -1 : 1; |
|
| 182 | - $integer = 0; |
|
| 183 | - $decimal = 0; |
|
| 184 | - |
|
| 185 | - foreach (preg_split('`[^\d.]+`', $numbers) as $chunk) { |
|
| 186 | - [$integerPart, $decimalPart] = explode('.', "$chunk."); |
|
| 187 | - |
|
| 188 | - $integer += (int) $integerPart; |
|
| 189 | - $decimal += (float) ("0.$decimalPart"); |
|
| 190 | - } |
|
| 191 | - |
|
| 192 | - $overflow = floor($decimal); |
|
| 193 | - $integer += $overflow; |
|
| 194 | - $decimal -= $overflow; |
|
| 195 | - |
|
| 196 | - return [$sign * $integer, $decimal === 0.0 ? 0.0 : $sign * round($decimal * pow(10, $decimals))]; |
|
| 197 | - } |
|
| 19 | + /** |
|
| 20 | + * Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). |
|
| 21 | + * |
|
| 22 | + * Timestamp input can be given as int, float or a string containing one or more numbers. |
|
| 23 | + * |
|
| 24 | + * @param float|int|string $timestamp |
|
| 25 | + * @param \DateTimeZone|string|null $tz |
|
| 26 | + * |
|
| 27 | + * @return static |
|
| 28 | + */ |
|
| 29 | + public static function createFromTimestamp($timestamp, $tz = null) |
|
| 30 | + { |
|
| 31 | + return static::createFromTimestampUTC($timestamp)->setTimezone($tz); |
|
| 32 | + } |
|
| 33 | + |
|
| 34 | + /** |
|
| 35 | + * Create a Carbon instance from an timestamp keeping the timezone to UTC. |
|
| 36 | + * |
|
| 37 | + * Timestamp input can be given as int, float or a string containing one or more numbers. |
|
| 38 | + * |
|
| 39 | + * @param float|int|string $timestamp |
|
| 40 | + * |
|
| 41 | + * @return static |
|
| 42 | + */ |
|
| 43 | + public static function createFromTimestampUTC($timestamp) |
|
| 44 | + { |
|
| 45 | + [$integer, $decimal] = self::getIntegerAndDecimalParts($timestamp); |
|
| 46 | + $delta = floor($decimal / static::MICROSECONDS_PER_SECOND); |
|
| 47 | + $integer += $delta; |
|
| 48 | + $decimal -= $delta * static::MICROSECONDS_PER_SECOND; |
|
| 49 | + $decimal = str_pad((string) $decimal, 6, '0', STR_PAD_LEFT); |
|
| 50 | + |
|
| 51 | + return static::rawCreateFromFormat('U u', "$integer $decimal"); |
|
| 52 | + } |
|
| 53 | + |
|
| 54 | + /** |
|
| 55 | + * Create a Carbon instance from a timestamp in milliseconds. |
|
| 56 | + * |
|
| 57 | + * Timestamp input can be given as int, float or a string containing one or more numbers. |
|
| 58 | + * |
|
| 59 | + * @param float|int|string $timestamp |
|
| 60 | + * |
|
| 61 | + * @return static |
|
| 62 | + */ |
|
| 63 | + public static function createFromTimestampMsUTC($timestamp) |
|
| 64 | + { |
|
| 65 | + [$milliseconds, $microseconds] = self::getIntegerAndDecimalParts($timestamp, 3); |
|
| 66 | + $sign = $milliseconds < 0 || ($milliseconds === 0.0 && $microseconds < 0) ? -1 : 1; |
|
| 67 | + $milliseconds = abs($milliseconds); |
|
| 68 | + $microseconds = $sign * abs($microseconds) + static::MICROSECONDS_PER_MILLISECOND * ($milliseconds % static::MILLISECONDS_PER_SECOND); |
|
| 69 | + $seconds = $sign * floor($milliseconds / static::MILLISECONDS_PER_SECOND); |
|
| 70 | + $delta = floor($microseconds / static::MICROSECONDS_PER_SECOND); |
|
| 71 | + $seconds += $delta; |
|
| 72 | + $microseconds -= $delta * static::MICROSECONDS_PER_SECOND; |
|
| 73 | + $microseconds = str_pad($microseconds, 6, '0', STR_PAD_LEFT); |
|
| 74 | + |
|
| 75 | + return static::rawCreateFromFormat('U u', "$seconds $microseconds"); |
|
| 76 | + } |
|
| 77 | + |
|
| 78 | + /** |
|
| 79 | + * Create a Carbon instance from a timestamp in milliseconds. |
|
| 80 | + * |
|
| 81 | + * Timestamp input can be given as int, float or a string containing one or more numbers. |
|
| 82 | + * |
|
| 83 | + * @param float|int|string $timestamp |
|
| 84 | + * @param \DateTimeZone|string|null $tz |
|
| 85 | + * |
|
| 86 | + * @return static |
|
| 87 | + */ |
|
| 88 | + public static function createFromTimestampMs($timestamp, $tz = null) |
|
| 89 | + { |
|
| 90 | + return static::createFromTimestampMsUTC($timestamp) |
|
| 91 | + ->setTimezone($tz); |
|
| 92 | + } |
|
| 93 | + |
|
| 94 | + /** |
|
| 95 | + * Set the instance's timestamp. |
|
| 96 | + * |
|
| 97 | + * Timestamp input can be given as int, float or a string containing one or more numbers. |
|
| 98 | + * |
|
| 99 | + * @param float|int|string $unixTimestamp |
|
| 100 | + * |
|
| 101 | + * @return static |
|
| 102 | + */ |
|
| 103 | + public function timestamp($unixTimestamp) |
|
| 104 | + { |
|
| 105 | + return $this->setTimestamp($unixTimestamp); |
|
| 106 | + } |
|
| 107 | + |
|
| 108 | + /** |
|
| 109 | + * Returns a timestamp rounded with the given precision (6 by default). |
|
| 110 | + * |
|
| 111 | + * @example getPreciseTimestamp() 1532087464437474 (microsecond maximum precision) |
|
| 112 | + * @example getPreciseTimestamp(6) 1532087464437474 |
|
| 113 | + * @example getPreciseTimestamp(5) 153208746443747 (1/100000 second precision) |
|
| 114 | + * @example getPreciseTimestamp(4) 15320874644375 (1/10000 second precision) |
|
| 115 | + * @example getPreciseTimestamp(3) 1532087464437 (millisecond precision) |
|
| 116 | + * @example getPreciseTimestamp(2) 153208746444 (1/100 second precision) |
|
| 117 | + * @example getPreciseTimestamp(1) 15320874644 (1/10 second precision) |
|
| 118 | + * @example getPreciseTimestamp(0) 1532087464 (second precision) |
|
| 119 | + * @example getPreciseTimestamp(-1) 153208746 (10 second precision) |
|
| 120 | + * @example getPreciseTimestamp(-2) 15320875 (100 second precision) |
|
| 121 | + * |
|
| 122 | + * @param int $precision |
|
| 123 | + * |
|
| 124 | + * @return float |
|
| 125 | + */ |
|
| 126 | + public function getPreciseTimestamp($precision = 6) |
|
| 127 | + { |
|
| 128 | + return round(((float) $this->rawFormat('Uu')) / pow(10, 6 - $precision)); |
|
| 129 | + } |
|
| 130 | + |
|
| 131 | + /** |
|
| 132 | + * Returns the milliseconds timestamps used amongst other by Date javascript objects. |
|
| 133 | + * |
|
| 134 | + * @return float |
|
| 135 | + */ |
|
| 136 | + public function valueOf() |
|
| 137 | + { |
|
| 138 | + return $this->getPreciseTimestamp(3); |
|
| 139 | + } |
|
| 140 | + |
|
| 141 | + /** |
|
| 142 | + * Returns the timestamp with millisecond precision. |
|
| 143 | + * |
|
| 144 | + * @return int |
|
| 145 | + */ |
|
| 146 | + public function getTimestampMs() |
|
| 147 | + { |
|
| 148 | + return (int) $this->getPreciseTimestamp(3); |
|
| 149 | + } |
|
| 150 | + |
|
| 151 | + /** |
|
| 152 | + * @alias getTimestamp |
|
| 153 | + * |
|
| 154 | + * Returns the UNIX timestamp for the current date. |
|
| 155 | + * |
|
| 156 | + * @return int |
|
| 157 | + */ |
|
| 158 | + public function unix() |
|
| 159 | + { |
|
| 160 | + return $this->getTimestamp(); |
|
| 161 | + } |
|
| 162 | + |
|
| 163 | + /** |
|
| 164 | + * Return an array with integer part digits and decimals digits split from one or more positive numbers |
|
| 165 | + * (such as timestamps) as string with the given number of decimals (6 by default). |
|
| 166 | + * |
|
| 167 | + * By splitting integer and decimal, this method obtain a better precision than |
|
| 168 | + * number_format when the input is a string. |
|
| 169 | + * |
|
| 170 | + * @param float|int|string $numbers one or more numbers |
|
| 171 | + * @param int $decimals number of decimals precision (6 by default) |
|
| 172 | + * |
|
| 173 | + * @return array 0-index is integer part, 1-index is decimal part digits |
|
| 174 | + */ |
|
| 175 | + private static function getIntegerAndDecimalParts($numbers, $decimals = 6) |
|
| 176 | + { |
|
| 177 | + if (\is_int($numbers) || \is_float($numbers)) { |
|
| 178 | + $numbers = number_format($numbers, $decimals, '.', ''); |
|
| 179 | + } |
|
| 180 | + |
|
| 181 | + $sign = str_starts_with($numbers, '-') ? -1 : 1; |
|
| 182 | + $integer = 0; |
|
| 183 | + $decimal = 0; |
|
| 184 | + |
|
| 185 | + foreach (preg_split('`[^\d.]+`', $numbers) as $chunk) { |
|
| 186 | + [$integerPart, $decimalPart] = explode('.', "$chunk."); |
|
| 187 | + |
|
| 188 | + $integer += (int) $integerPart; |
|
| 189 | + $decimal += (float) ("0.$decimalPart"); |
|
| 190 | + } |
|
| 191 | + |
|
| 192 | + $overflow = floor($decimal); |
|
| 193 | + $integer += $overflow; |
|
| 194 | + $decimal -= $overflow; |
|
| 195 | + |
|
| 196 | + return [$sign * $integer, $decimal === 0.0 ? 0.0 : $sign * round($decimal * pow(10, $decimals))]; |
|
| 197 | + } |
|
| 198 | 198 | } |
@@ -24,12 +24,12 @@ discard block |
||
| 24 | 24 | use Symfony\Contracts\Translation\TranslatorInterface as ContractsTranslatorInterface; |
| 25 | 25 | |
| 26 | 26 | if (interface_exists('Symfony\\Contracts\\Translation\\TranslatorInterface') && |
| 27 | - !interface_exists('Symfony\\Component\\Translation\\TranslatorInterface') |
|
| 27 | + !interface_exists('Symfony\\Component\\Translation\\TranslatorInterface') |
|
| 28 | 28 | ) { |
| 29 | - class_alias( |
|
| 30 | - 'Symfony\\Contracts\\Translation\\TranslatorInterface', |
|
| 31 | - 'Symfony\\Component\\Translation\\TranslatorInterface' |
|
| 32 | - ); |
|
| 29 | + class_alias( |
|
| 30 | + 'Symfony\\Contracts\\Translation\\TranslatorInterface', |
|
| 31 | + 'Symfony\\Component\\Translation\\TranslatorInterface' |
|
| 32 | + ); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -39,786 +39,786 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | trait Localization |
| 41 | 41 | { |
| 42 | - /** |
|
| 43 | - * Default translator. |
|
| 44 | - * |
|
| 45 | - * @var \Symfony\Component\Translation\TranslatorInterface |
|
| 46 | - */ |
|
| 47 | - protected static $translator; |
|
| 48 | - |
|
| 49 | - /** |
|
| 50 | - * Specific translator of the current instance. |
|
| 51 | - * |
|
| 52 | - * @var \Symfony\Component\Translation\TranslatorInterface |
|
| 53 | - */ |
|
| 54 | - protected $localTranslator; |
|
| 55 | - |
|
| 56 | - /** |
|
| 57 | - * Options for diffForHumans(). |
|
| 58 | - * |
|
| 59 | - * @var int |
|
| 60 | - */ |
|
| 61 | - protected static $humanDiffOptions = CarbonInterface::NO_ZERO_DIFF; |
|
| 62 | - |
|
| 63 | - /** |
|
| 64 | - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. |
|
| 65 | - * You should rather use the ->settings() method. |
|
| 66 | - * @see settings |
|
| 67 | - * |
|
| 68 | - * @param int $humanDiffOptions |
|
| 69 | - */ |
|
| 70 | - public static function setHumanDiffOptions($humanDiffOptions) |
|
| 71 | - { |
|
| 72 | - static::$humanDiffOptions = $humanDiffOptions; |
|
| 73 | - } |
|
| 74 | - |
|
| 75 | - /** |
|
| 76 | - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. |
|
| 77 | - * You should rather use the ->settings() method. |
|
| 78 | - * @see settings |
|
| 79 | - * |
|
| 80 | - * @param int $humanDiffOption |
|
| 81 | - */ |
|
| 82 | - public static function enableHumanDiffOption($humanDiffOption) |
|
| 83 | - { |
|
| 84 | - static::$humanDiffOptions = static::getHumanDiffOptions() | $humanDiffOption; |
|
| 85 | - } |
|
| 86 | - |
|
| 87 | - /** |
|
| 88 | - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. |
|
| 89 | - * You should rather use the ->settings() method. |
|
| 90 | - * @see settings |
|
| 91 | - * |
|
| 92 | - * @param int $humanDiffOption |
|
| 93 | - */ |
|
| 94 | - public static function disableHumanDiffOption($humanDiffOption) |
|
| 95 | - { |
|
| 96 | - static::$humanDiffOptions = static::getHumanDiffOptions() & ~$humanDiffOption; |
|
| 97 | - } |
|
| 98 | - |
|
| 99 | - /** |
|
| 100 | - * Return default humanDiff() options (merged flags as integer). |
|
| 101 | - * |
|
| 102 | - * @return int |
|
| 103 | - */ |
|
| 104 | - public static function getHumanDiffOptions() |
|
| 105 | - { |
|
| 106 | - return static::$humanDiffOptions; |
|
| 107 | - } |
|
| 108 | - |
|
| 109 | - /** |
|
| 110 | - * Get the default translator instance in use. |
|
| 111 | - * |
|
| 112 | - * @return \Symfony\Component\Translation\TranslatorInterface |
|
| 113 | - */ |
|
| 114 | - public static function getTranslator() |
|
| 115 | - { |
|
| 116 | - return static::translator(); |
|
| 117 | - } |
|
| 118 | - |
|
| 119 | - /** |
|
| 120 | - * Set the default translator instance to use. |
|
| 121 | - * |
|
| 122 | - * @param \Symfony\Component\Translation\TranslatorInterface $translator |
|
| 123 | - * |
|
| 124 | - * @return void |
|
| 125 | - */ |
|
| 126 | - public static function setTranslator(TranslatorInterface $translator) |
|
| 127 | - { |
|
| 128 | - static::$translator = $translator; |
|
| 129 | - } |
|
| 130 | - |
|
| 131 | - /** |
|
| 132 | - * Return true if the current instance has its own translator. |
|
| 133 | - * |
|
| 134 | - * @return bool |
|
| 135 | - */ |
|
| 136 | - public function hasLocalTranslator() |
|
| 137 | - { |
|
| 138 | - return isset($this->localTranslator); |
|
| 139 | - } |
|
| 140 | - |
|
| 141 | - /** |
|
| 142 | - * Get the translator of the current instance or the default if none set. |
|
| 143 | - * |
|
| 144 | - * @return \Symfony\Component\Translation\TranslatorInterface |
|
| 145 | - */ |
|
| 146 | - public function getLocalTranslator() |
|
| 147 | - { |
|
| 148 | - return $this->localTranslator ?: static::translator(); |
|
| 149 | - } |
|
| 150 | - |
|
| 151 | - /** |
|
| 152 | - * Set the translator for the current instance. |
|
| 153 | - * |
|
| 154 | - * @param \Symfony\Component\Translation\TranslatorInterface $translator |
|
| 155 | - * |
|
| 156 | - * @return $this |
|
| 157 | - */ |
|
| 158 | - public function setLocalTranslator(TranslatorInterface $translator) |
|
| 159 | - { |
|
| 160 | - $this->localTranslator = $translator; |
|
| 161 | - |
|
| 162 | - return $this; |
|
| 163 | - } |
|
| 164 | - |
|
| 165 | - /** |
|
| 166 | - * Returns raw translation message for a given key. |
|
| 167 | - * |
|
| 168 | - * @param \Symfony\Component\Translation\TranslatorInterface $translator the translator to use |
|
| 169 | - * @param string $key key to find |
|
| 170 | - * @param string|null $locale current locale used if null |
|
| 171 | - * @param string|null $default default value if translation returns the key |
|
| 172 | - * |
|
| 173 | - * @return string |
|
| 174 | - */ |
|
| 175 | - public static function getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) |
|
| 176 | - { |
|
| 177 | - if (!($translator instanceof TranslatorBagInterface && $translator instanceof TranslatorInterface)) { |
|
| 178 | - throw new InvalidTypeException( |
|
| 179 | - 'Translator does not implement '.TranslatorInterface::class.' and '.TranslatorBagInterface::class.'. '. |
|
| 180 | - (\is_object($translator) ? \get_class($translator) : \gettype($translator)).' has been given.' |
|
| 181 | - ); |
|
| 182 | - } |
|
| 183 | - |
|
| 184 | - if (!$locale && $translator instanceof LocaleAwareInterface) { |
|
| 185 | - $locale = $translator->getLocale(); |
|
| 186 | - } |
|
| 187 | - |
|
| 188 | - $result = self::getFromCatalogue($translator, $translator->getCatalogue($locale), $key); |
|
| 189 | - |
|
| 190 | - return $result === $key ? $default : $result; |
|
| 191 | - } |
|
| 192 | - |
|
| 193 | - /** |
|
| 194 | - * Returns raw translation message for a given key. |
|
| 195 | - * |
|
| 196 | - * @param string $key key to find |
|
| 197 | - * @param string|null $locale current locale used if null |
|
| 198 | - * @param string|null $default default value if translation returns the key |
|
| 199 | - * @param \Symfony\Component\Translation\TranslatorInterface $translator an optional translator to use |
|
| 200 | - * |
|
| 201 | - * @return string |
|
| 202 | - */ |
|
| 203 | - public function getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null) |
|
| 204 | - { |
|
| 205 | - return static::getTranslationMessageWith($translator ?: $this->getLocalTranslator(), $key, $locale, $default); |
|
| 206 | - } |
|
| 207 | - |
|
| 208 | - /** |
|
| 209 | - * Translate using translation string or callback available. |
|
| 210 | - * |
|
| 211 | - * @param \Symfony\Component\Translation\TranslatorInterface $translator |
|
| 212 | - * @param string $key |
|
| 213 | - * @param array $parameters |
|
| 214 | - * @param null $number |
|
| 215 | - * |
|
| 216 | - * @return string |
|
| 217 | - */ |
|
| 218 | - public static function translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string |
|
| 219 | - { |
|
| 220 | - $message = static::getTranslationMessageWith($translator, $key, null, $key); |
|
| 221 | - if ($message instanceof Closure) { |
|
| 222 | - return (string) $message(...array_values($parameters)); |
|
| 223 | - } |
|
| 224 | - |
|
| 225 | - if ($number !== null) { |
|
| 226 | - $parameters['%count%'] = $number; |
|
| 227 | - } |
|
| 228 | - if (isset($parameters['%count%'])) { |
|
| 229 | - $parameters[':count'] = $parameters['%count%']; |
|
| 230 | - } |
|
| 231 | - |
|
| 232 | - // @codeCoverageIgnoreStart |
|
| 233 | - $choice = $translator instanceof ContractsTranslatorInterface |
|
| 234 | - ? $translator->trans($key, $parameters) |
|
| 235 | - : $translator->transChoice($key, $number, $parameters); |
|
| 236 | - // @codeCoverageIgnoreEnd |
|
| 237 | - |
|
| 238 | - return (string) $choice; |
|
| 239 | - } |
|
| 240 | - |
|
| 241 | - /** |
|
| 242 | - * Translate using translation string or callback available. |
|
| 243 | - * |
|
| 244 | - * @param string $key |
|
| 245 | - * @param array $parameters |
|
| 246 | - * @param string|int|float|null $number |
|
| 247 | - * @param \Symfony\Component\Translation\TranslatorInterface|null $translator |
|
| 248 | - * @param bool $altNumbers |
|
| 249 | - * |
|
| 250 | - * @return string |
|
| 251 | - */ |
|
| 252 | - public function translate(string $key, array $parameters = [], $number = null, ?TranslatorInterface $translator = null, bool $altNumbers = false): string |
|
| 253 | - { |
|
| 254 | - $translation = static::translateWith($translator ?: $this->getLocalTranslator(), $key, $parameters, $number); |
|
| 255 | - |
|
| 256 | - if ($number !== null && $altNumbers) { |
|
| 257 | - return str_replace($number, $this->translateNumber($number), $translation); |
|
| 258 | - } |
|
| 259 | - |
|
| 260 | - return $translation; |
|
| 261 | - } |
|
| 262 | - |
|
| 263 | - /** |
|
| 264 | - * Returns the alternative number for a given integer if available in the current locale. |
|
| 265 | - * |
|
| 266 | - * @param int $number |
|
| 267 | - * |
|
| 268 | - * @return string |
|
| 269 | - */ |
|
| 270 | - public function translateNumber(int $number): string |
|
| 271 | - { |
|
| 272 | - $translateKey = "alt_numbers.$number"; |
|
| 273 | - $symbol = $this->translate($translateKey); |
|
| 274 | - |
|
| 275 | - if ($symbol !== $translateKey) { |
|
| 276 | - return $symbol; |
|
| 277 | - } |
|
| 278 | - |
|
| 279 | - if ($number > 99 && $this->translate('alt_numbers.99') !== 'alt_numbers.99') { |
|
| 280 | - $start = ''; |
|
| 281 | - foreach ([10000, 1000, 100] as $exp) { |
|
| 282 | - $key = "alt_numbers_pow.$exp"; |
|
| 283 | - if ($number >= $exp && $number < $exp * 10 && ($pow = $this->translate($key)) !== $key) { |
|
| 284 | - $unit = floor($number / $exp); |
|
| 285 | - $number -= $unit * $exp; |
|
| 286 | - $start .= ($unit > 1 ? $this->translate("alt_numbers.$unit") : '').$pow; |
|
| 287 | - } |
|
| 288 | - } |
|
| 289 | - $result = ''; |
|
| 290 | - while ($number) { |
|
| 291 | - $chunk = $number % 100; |
|
| 292 | - $result = $this->translate("alt_numbers.$chunk").$result; |
|
| 293 | - $number = floor($number / 100); |
|
| 294 | - } |
|
| 295 | - |
|
| 296 | - return "$start$result"; |
|
| 297 | - } |
|
| 298 | - |
|
| 299 | - if ($number > 9 && $this->translate('alt_numbers.9') !== 'alt_numbers.9') { |
|
| 300 | - $result = ''; |
|
| 301 | - while ($number) { |
|
| 302 | - $chunk = $number % 10; |
|
| 303 | - $result = $this->translate("alt_numbers.$chunk").$result; |
|
| 304 | - $number = floor($number / 10); |
|
| 305 | - } |
|
| 306 | - |
|
| 307 | - return $result; |
|
| 308 | - } |
|
| 309 | - |
|
| 310 | - return (string) $number; |
|
| 311 | - } |
|
| 312 | - |
|
| 313 | - /** |
|
| 314 | - * Translate a time string from a locale to an other. |
|
| 315 | - * |
|
| 316 | - * @param string $timeString date/time/duration string to translate (may also contain English) |
|
| 317 | - * @param string|null $from input locale of the $timeString parameter (`Carbon::getLocale()` by default) |
|
| 318 | - * @param string|null $to output locale of the result returned (`"en"` by default) |
|
| 319 | - * @param int $mode specify what to translate with options: |
|
| 320 | - * - CarbonInterface::TRANSLATE_ALL (default) |
|
| 321 | - * - CarbonInterface::TRANSLATE_MONTHS |
|
| 322 | - * - CarbonInterface::TRANSLATE_DAYS |
|
| 323 | - * - CarbonInterface::TRANSLATE_UNITS |
|
| 324 | - * - CarbonInterface::TRANSLATE_MERIDIEM |
|
| 325 | - * You can use pipe to group: CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS |
|
| 326 | - * |
|
| 327 | - * @return string |
|
| 328 | - */ |
|
| 329 | - public static function translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) |
|
| 330 | - { |
|
| 331 | - // Fallback source and destination locales |
|
| 332 | - $from = $from ?: static::getLocale(); |
|
| 333 | - $to = $to ?: 'en'; |
|
| 334 | - |
|
| 335 | - if ($from === $to) { |
|
| 336 | - return $timeString; |
|
| 337 | - } |
|
| 338 | - |
|
| 339 | - // Standardize apostrophe |
|
| 340 | - $timeString = strtr($timeString, ['’' => "'"]); |
|
| 341 | - |
|
| 342 | - $fromTranslations = []; |
|
| 343 | - $toTranslations = []; |
|
| 344 | - |
|
| 345 | - foreach (['from', 'to'] as $key) { |
|
| 346 | - $language = $$key; |
|
| 347 | - $translator = Translator::get($language); |
|
| 348 | - $translations = $translator->getMessages(); |
|
| 349 | - |
|
| 350 | - if (!isset($translations[$language])) { |
|
| 351 | - return $timeString; |
|
| 352 | - } |
|
| 353 | - |
|
| 354 | - $translationKey = $key.'Translations'; |
|
| 355 | - $messages = $translations[$language]; |
|
| 356 | - $months = $messages['months'] ?? []; |
|
| 357 | - $weekdays = $messages['weekdays'] ?? []; |
|
| 358 | - $meridiem = $messages['meridiem'] ?? ['AM', 'PM']; |
|
| 359 | - |
|
| 360 | - if ($key === 'from') { |
|
| 361 | - foreach (['months', 'weekdays'] as $variable) { |
|
| 362 | - $list = $messages[$variable.'_standalone'] ?? null; |
|
| 363 | - |
|
| 364 | - if ($list) { |
|
| 365 | - foreach ($$variable as $index => &$name) { |
|
| 366 | - $name .= '|'.$messages[$variable.'_standalone'][$index]; |
|
| 367 | - } |
|
| 368 | - } |
|
| 369 | - } |
|
| 370 | - } |
|
| 371 | - |
|
| 372 | - $$translationKey = array_merge( |
|
| 373 | - $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($months, 12, $timeString) : [], |
|
| 374 | - $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($messages['months_short'] ?? [], 12, $timeString) : [], |
|
| 375 | - $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($weekdays, 7, $timeString) : [], |
|
| 376 | - $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($messages['weekdays_short'] ?? [], 7, $timeString) : [], |
|
| 377 | - $mode & CarbonInterface::TRANSLATE_DIFF ? static::translateWordsByKeys([ |
|
| 378 | - 'diff_now', |
|
| 379 | - 'diff_today', |
|
| 380 | - 'diff_yesterday', |
|
| 381 | - 'diff_tomorrow', |
|
| 382 | - 'diff_before_yesterday', |
|
| 383 | - 'diff_after_tomorrow', |
|
| 384 | - ], $messages, $key) : [], |
|
| 385 | - $mode & CarbonInterface::TRANSLATE_UNITS ? static::translateWordsByKeys([ |
|
| 386 | - 'year', |
|
| 387 | - 'month', |
|
| 388 | - 'week', |
|
| 389 | - 'day', |
|
| 390 | - 'hour', |
|
| 391 | - 'minute', |
|
| 392 | - 'second', |
|
| 393 | - ], $messages, $key) : [], |
|
| 394 | - $mode & CarbonInterface::TRANSLATE_MERIDIEM ? array_map(function ($hour) use ($meridiem) { |
|
| 395 | - if (\is_array($meridiem)) { |
|
| 396 | - return $meridiem[$hour < 12 ? 0 : 1]; |
|
| 397 | - } |
|
| 398 | - |
|
| 399 | - return $meridiem($hour, 0, false); |
|
| 400 | - }, range(0, 23)) : [] |
|
| 401 | - ); |
|
| 402 | - } |
|
| 403 | - |
|
| 404 | - return substr(preg_replace_callback('/(?<=[\d\s+.\/,_-])('.implode('|', $fromTranslations).')(?=[\d\s+.\/,_-])/iu', function ($match) use ($fromTranslations, $toTranslations) { |
|
| 405 | - [$chunk] = $match; |
|
| 406 | - |
|
| 407 | - foreach ($fromTranslations as $index => $word) { |
|
| 408 | - if (preg_match("/^$word\$/iu", $chunk)) { |
|
| 409 | - return $toTranslations[$index] ?? ''; |
|
| 410 | - } |
|
| 411 | - } |
|
| 412 | - |
|
| 413 | - return $chunk; // @codeCoverageIgnore |
|
| 414 | - }, " $timeString "), 1, -1); |
|
| 415 | - } |
|
| 416 | - |
|
| 417 | - /** |
|
| 418 | - * Translate a time string from the current locale (`$date->locale()`) to an other. |
|
| 419 | - * |
|
| 420 | - * @param string $timeString time string to translate |
|
| 421 | - * @param string|null $to output locale of the result returned ("en" by default) |
|
| 422 | - * |
|
| 423 | - * @return string |
|
| 424 | - */ |
|
| 425 | - public function translateTimeStringTo($timeString, $to = null) |
|
| 426 | - { |
|
| 427 | - return static::translateTimeString($timeString, $this->getTranslatorLocale(), $to); |
|
| 428 | - } |
|
| 429 | - |
|
| 430 | - /** |
|
| 431 | - * Get/set the locale for the current instance. |
|
| 432 | - * |
|
| 433 | - * @param string|null $locale |
|
| 434 | - * @param string ...$fallbackLocales |
|
| 435 | - * |
|
| 436 | - * @return $this|string |
|
| 437 | - */ |
|
| 438 | - public function locale(string $locale = null, ...$fallbackLocales) |
|
| 439 | - { |
|
| 440 | - if ($locale === null) { |
|
| 441 | - return $this->getTranslatorLocale(); |
|
| 442 | - } |
|
| 443 | - |
|
| 444 | - if (!$this->localTranslator || $this->getTranslatorLocale($this->localTranslator) !== $locale) { |
|
| 445 | - $translator = Translator::get($locale); |
|
| 446 | - |
|
| 447 | - if (!empty($fallbackLocales)) { |
|
| 448 | - $translator->setFallbackLocales($fallbackLocales); |
|
| 449 | - |
|
| 450 | - foreach ($fallbackLocales as $fallbackLocale) { |
|
| 451 | - $messages = Translator::get($fallbackLocale)->getMessages(); |
|
| 452 | - |
|
| 453 | - if (isset($messages[$fallbackLocale])) { |
|
| 454 | - $translator->setMessages($fallbackLocale, $messages[$fallbackLocale]); |
|
| 455 | - } |
|
| 456 | - } |
|
| 457 | - } |
|
| 458 | - |
|
| 459 | - $this->localTranslator = $translator; |
|
| 460 | - } |
|
| 461 | - |
|
| 462 | - return $this; |
|
| 463 | - } |
|
| 464 | - |
|
| 465 | - /** |
|
| 466 | - * Get the current translator locale. |
|
| 467 | - * |
|
| 468 | - * @return string |
|
| 469 | - */ |
|
| 470 | - public static function getLocale() |
|
| 471 | - { |
|
| 472 | - return static::getLocaleAwareTranslator()->getLocale(); |
|
| 473 | - } |
|
| 474 | - |
|
| 475 | - /** |
|
| 476 | - * Set the current translator locale and indicate if the source locale file exists. |
|
| 477 | - * Pass 'auto' as locale to use closest language from the current LC_TIME locale. |
|
| 478 | - * |
|
| 479 | - * @param string $locale locale ex. en |
|
| 480 | - * |
|
| 481 | - * @return bool |
|
| 482 | - */ |
|
| 483 | - public static function setLocale($locale) |
|
| 484 | - { |
|
| 485 | - return static::getLocaleAwareTranslator()->setLocale($locale) !== false; |
|
| 486 | - } |
|
| 487 | - |
|
| 488 | - /** |
|
| 489 | - * Set the fallback locale. |
|
| 490 | - * |
|
| 491 | - * @see https://symfony.com/doc/current/components/translation.html#fallback-locales |
|
| 492 | - * |
|
| 493 | - * @param string $locale |
|
| 494 | - */ |
|
| 495 | - public static function setFallbackLocale($locale) |
|
| 496 | - { |
|
| 497 | - $translator = static::getTranslator(); |
|
| 498 | - |
|
| 499 | - if (method_exists($translator, 'setFallbackLocales')) { |
|
| 500 | - $translator->setFallbackLocales([$locale]); |
|
| 501 | - |
|
| 502 | - if ($translator instanceof Translator) { |
|
| 503 | - $preferredLocale = $translator->getLocale(); |
|
| 504 | - $translator->setMessages($preferredLocale, array_replace_recursive( |
|
| 505 | - $translator->getMessages()[$locale] ?? [], |
|
| 506 | - Translator::get($locale)->getMessages()[$locale] ?? [], |
|
| 507 | - $translator->getMessages($preferredLocale) |
|
| 508 | - )); |
|
| 509 | - } |
|
| 510 | - } |
|
| 511 | - } |
|
| 512 | - |
|
| 513 | - /** |
|
| 514 | - * Get the fallback locale. |
|
| 515 | - * |
|
| 516 | - * @see https://symfony.com/doc/current/components/translation.html#fallback-locales |
|
| 517 | - * |
|
| 518 | - * @return string|null |
|
| 519 | - */ |
|
| 520 | - public static function getFallbackLocale() |
|
| 521 | - { |
|
| 522 | - $translator = static::getTranslator(); |
|
| 523 | - |
|
| 524 | - if (method_exists($translator, 'getFallbackLocales')) { |
|
| 525 | - return $translator->getFallbackLocales()[0] ?? null; |
|
| 526 | - } |
|
| 527 | - |
|
| 528 | - return null; |
|
| 529 | - } |
|
| 530 | - |
|
| 531 | - /** |
|
| 532 | - * Set the current locale to the given, execute the passed function, reset the locale to previous one, |
|
| 533 | - * then return the result of the closure (or null if the closure was void). |
|
| 534 | - * |
|
| 535 | - * @param string $locale locale ex. en |
|
| 536 | - * @param callable $func |
|
| 537 | - * |
|
| 538 | - * @return mixed |
|
| 539 | - */ |
|
| 540 | - public static function executeWithLocale($locale, $func) |
|
| 541 | - { |
|
| 542 | - $currentLocale = static::getLocale(); |
|
| 543 | - $result = $func(static::setLocale($locale) ? static::getLocale() : false, static::translator()); |
|
| 544 | - static::setLocale($currentLocale); |
|
| 545 | - |
|
| 546 | - return $result; |
|
| 547 | - } |
|
| 548 | - |
|
| 549 | - /** |
|
| 550 | - * Returns true if the given locale is internally supported and has short-units support. |
|
| 551 | - * Support is considered enabled if either year, day or hour has a short variant translated. |
|
| 552 | - * |
|
| 553 | - * @param string $locale locale ex. en |
|
| 554 | - * |
|
| 555 | - * @return bool |
|
| 556 | - */ |
|
| 557 | - public static function localeHasShortUnits($locale) |
|
| 558 | - { |
|
| 559 | - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 560 | - return ($newLocale && (($y = static::translateWith($translator, 'y')) !== 'y' && $y !== static::translateWith($translator, 'year'))) || ( |
|
| 561 | - ($y = static::translateWith($translator, 'd')) !== 'd' && |
|
| 562 | - $y !== static::translateWith($translator, 'day') |
|
| 563 | - ) || ( |
|
| 564 | - ($y = static::translateWith($translator, 'h')) !== 'h' && |
|
| 565 | - $y !== static::translateWith($translator, 'hour') |
|
| 566 | - ); |
|
| 567 | - }); |
|
| 568 | - } |
|
| 569 | - |
|
| 570 | - /** |
|
| 571 | - * Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). |
|
| 572 | - * Support is considered enabled if the 4 sentences are translated in the given locale. |
|
| 573 | - * |
|
| 574 | - * @param string $locale locale ex. en |
|
| 575 | - * |
|
| 576 | - * @return bool |
|
| 577 | - */ |
|
| 578 | - public static function localeHasDiffSyntax($locale) |
|
| 579 | - { |
|
| 580 | - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 581 | - if (!$newLocale) { |
|
| 582 | - return false; |
|
| 583 | - } |
|
| 584 | - |
|
| 585 | - foreach (['ago', 'from_now', 'before', 'after'] as $key) { |
|
| 586 | - if ($translator instanceof TranslatorBagInterface && |
|
| 587 | - self::getFromCatalogue($translator, $translator->getCatalogue($newLocale), $key) instanceof Closure |
|
| 588 | - ) { |
|
| 589 | - continue; |
|
| 590 | - } |
|
| 591 | - |
|
| 592 | - if ($translator->trans($key) === $key) { |
|
| 593 | - return false; |
|
| 594 | - } |
|
| 595 | - } |
|
| 596 | - |
|
| 597 | - return true; |
|
| 598 | - }); |
|
| 599 | - } |
|
| 600 | - |
|
| 601 | - /** |
|
| 602 | - * Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). |
|
| 603 | - * Support is considered enabled if the 3 words are translated in the given locale. |
|
| 604 | - * |
|
| 605 | - * @param string $locale locale ex. en |
|
| 606 | - * |
|
| 607 | - * @return bool |
|
| 608 | - */ |
|
| 609 | - public static function localeHasDiffOneDayWords($locale) |
|
| 610 | - { |
|
| 611 | - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 612 | - return $newLocale && |
|
| 613 | - $translator->trans('diff_now') !== 'diff_now' && |
|
| 614 | - $translator->trans('diff_yesterday') !== 'diff_yesterday' && |
|
| 615 | - $translator->trans('diff_tomorrow') !== 'diff_tomorrow'; |
|
| 616 | - }); |
|
| 617 | - } |
|
| 618 | - |
|
| 619 | - /** |
|
| 620 | - * Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). |
|
| 621 | - * Support is considered enabled if the 2 words are translated in the given locale. |
|
| 622 | - * |
|
| 623 | - * @param string $locale locale ex. en |
|
| 624 | - * |
|
| 625 | - * @return bool |
|
| 626 | - */ |
|
| 627 | - public static function localeHasDiffTwoDayWords($locale) |
|
| 628 | - { |
|
| 629 | - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 630 | - return $newLocale && |
|
| 631 | - $translator->trans('diff_before_yesterday') !== 'diff_before_yesterday' && |
|
| 632 | - $translator->trans('diff_after_tomorrow') !== 'diff_after_tomorrow'; |
|
| 633 | - }); |
|
| 634 | - } |
|
| 635 | - |
|
| 636 | - /** |
|
| 637 | - * Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). |
|
| 638 | - * Support is considered enabled if the 4 sentences are translated in the given locale. |
|
| 639 | - * |
|
| 640 | - * @param string $locale locale ex. en |
|
| 641 | - * |
|
| 642 | - * @return bool |
|
| 643 | - */ |
|
| 644 | - public static function localeHasPeriodSyntax($locale) |
|
| 645 | - { |
|
| 646 | - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 647 | - return $newLocale && |
|
| 648 | - $translator->trans('period_recurrences') !== 'period_recurrences' && |
|
| 649 | - $translator->trans('period_interval') !== 'period_interval' && |
|
| 650 | - $translator->trans('period_start_date') !== 'period_start_date' && |
|
| 651 | - $translator->trans('period_end_date') !== 'period_end_date'; |
|
| 652 | - }); |
|
| 653 | - } |
|
| 654 | - |
|
| 655 | - /** |
|
| 656 | - * Returns the list of internally available locales and already loaded custom locales. |
|
| 657 | - * (It will ignore custom translator dynamic loading.) |
|
| 658 | - * |
|
| 659 | - * @return array |
|
| 660 | - */ |
|
| 661 | - public static function getAvailableLocales() |
|
| 662 | - { |
|
| 663 | - $translator = static::getLocaleAwareTranslator(); |
|
| 664 | - |
|
| 665 | - return $translator instanceof Translator |
|
| 666 | - ? $translator->getAvailableLocales() |
|
| 667 | - : [$translator->getLocale()]; |
|
| 668 | - } |
|
| 669 | - |
|
| 670 | - /** |
|
| 671 | - * Returns list of Language object for each available locale. This object allow you to get the ISO name, native |
|
| 672 | - * name, region and variant of the locale. |
|
| 673 | - * |
|
| 674 | - * @return Language[] |
|
| 675 | - */ |
|
| 676 | - public static function getAvailableLocalesInfo() |
|
| 677 | - { |
|
| 678 | - $languages = []; |
|
| 679 | - foreach (static::getAvailableLocales() as $id) { |
|
| 680 | - $languages[$id] = new Language($id); |
|
| 681 | - } |
|
| 682 | - |
|
| 683 | - return $languages; |
|
| 684 | - } |
|
| 685 | - |
|
| 686 | - /** |
|
| 687 | - * Initialize the default translator instance if necessary. |
|
| 688 | - * |
|
| 689 | - * @return \Symfony\Component\Translation\TranslatorInterface |
|
| 690 | - */ |
|
| 691 | - protected static function translator() |
|
| 692 | - { |
|
| 693 | - if (static::$translator === null) { |
|
| 694 | - static::$translator = Translator::get(); |
|
| 695 | - } |
|
| 696 | - |
|
| 697 | - return static::$translator; |
|
| 698 | - } |
|
| 699 | - |
|
| 700 | - /** |
|
| 701 | - * Get the locale of a given translator. |
|
| 702 | - * |
|
| 703 | - * If null or omitted, current local translator is used. |
|
| 704 | - * If no local translator is in use, current global translator is used. |
|
| 705 | - * |
|
| 706 | - * @param null $translator |
|
| 707 | - * |
|
| 708 | - * @return string|null |
|
| 709 | - */ |
|
| 710 | - protected function getTranslatorLocale($translator = null): ?string |
|
| 711 | - { |
|
| 712 | - if (\func_num_args() === 0) { |
|
| 713 | - $translator = $this->getLocalTranslator(); |
|
| 714 | - } |
|
| 715 | - |
|
| 716 | - $translator = static::getLocaleAwareTranslator($translator); |
|
| 717 | - |
|
| 718 | - return $translator ? $translator->getLocale() : null; |
|
| 719 | - } |
|
| 720 | - |
|
| 721 | - /** |
|
| 722 | - * Throw an error if passed object is not LocaleAwareInterface. |
|
| 723 | - * |
|
| 724 | - * @param LocaleAwareInterface|null $translator |
|
| 725 | - * |
|
| 726 | - * @return LocaleAwareInterface|null |
|
| 727 | - */ |
|
| 728 | - protected static function getLocaleAwareTranslator($translator = null) |
|
| 729 | - { |
|
| 730 | - if (\func_num_args() === 0) { |
|
| 731 | - $translator = static::translator(); |
|
| 732 | - } |
|
| 733 | - |
|
| 734 | - if ($translator && !($translator instanceof LocaleAwareInterface || method_exists($translator, 'getLocale'))) { |
|
| 735 | - throw new NotLocaleAwareException($translator); // @codeCoverageIgnore |
|
| 736 | - } |
|
| 737 | - |
|
| 738 | - return $translator; |
|
| 739 | - } |
|
| 740 | - |
|
| 741 | - /** |
|
| 742 | - * @param mixed $translator |
|
| 743 | - * @param \Symfony\Component\Translation\MessageCatalogueInterface $catalogue |
|
| 744 | - * |
|
| 745 | - * @return mixed |
|
| 746 | - */ |
|
| 747 | - private static function getFromCatalogue($translator, $catalogue, string $id, string $domain = 'messages') |
|
| 748 | - { |
|
| 749 | - return $translator instanceof TranslatorStrongTypeInterface |
|
| 750 | - ? $translator->getFromCatalogue($catalogue, $id, $domain) // @codeCoverageIgnore |
|
| 751 | - : $catalogue->get($id, $domain); |
|
| 752 | - } |
|
| 753 | - |
|
| 754 | - /** |
|
| 755 | - * Return the word cleaned from its translation codes. |
|
| 756 | - * |
|
| 757 | - * @param string $word |
|
| 758 | - * |
|
| 759 | - * @return string |
|
| 760 | - */ |
|
| 761 | - private static function cleanWordFromTranslationString($word) |
|
| 762 | - { |
|
| 763 | - $word = str_replace([':count', '%count', ':time'], '', $word); |
|
| 764 | - $word = strtr($word, ['’' => "'"]); |
|
| 765 | - $word = preg_replace('/({\d+(,(\d+|Inf))?}|[\[\]]\d+(,(\d+|Inf))?[\[\]])/', '', $word); |
|
| 766 | - |
|
| 767 | - return trim($word); |
|
| 768 | - } |
|
| 769 | - |
|
| 770 | - /** |
|
| 771 | - * Translate a list of words. |
|
| 772 | - * |
|
| 773 | - * @param string[] $keys keys to translate. |
|
| 774 | - * @param string[] $messages messages bag handling translations. |
|
| 775 | - * @param string $key 'to' (to get the translation) or 'from' (to get the detection RegExp pattern). |
|
| 776 | - * |
|
| 777 | - * @return string[] |
|
| 778 | - */ |
|
| 779 | - private static function translateWordsByKeys($keys, $messages, $key): array |
|
| 780 | - { |
|
| 781 | - return array_map(function ($wordKey) use ($messages, $key) { |
|
| 782 | - $message = $key === 'from' && isset($messages[$wordKey.'_regexp']) |
|
| 783 | - ? $messages[$wordKey.'_regexp'] |
|
| 784 | - : ($messages[$wordKey] ?? null); |
|
| 785 | - |
|
| 786 | - if (!$message) { |
|
| 787 | - return '>>DO NOT REPLACE<<'; |
|
| 788 | - } |
|
| 789 | - |
|
| 790 | - $parts = explode('|', $message); |
|
| 791 | - |
|
| 792 | - return $key === 'to' |
|
| 793 | - ? self::cleanWordFromTranslationString(end($parts)) |
|
| 794 | - : '(?:'.implode('|', array_map([static::class, 'cleanWordFromTranslationString'], $parts)).')'; |
|
| 795 | - }, $keys); |
|
| 796 | - } |
|
| 797 | - |
|
| 798 | - /** |
|
| 799 | - * Get an array of translations based on the current date. |
|
| 800 | - * |
|
| 801 | - * @param callable $translation |
|
| 802 | - * @param int $length |
|
| 803 | - * @param string $timeString |
|
| 804 | - * |
|
| 805 | - * @return string[] |
|
| 806 | - */ |
|
| 807 | - private static function getTranslationArray($translation, $length, $timeString): array |
|
| 808 | - { |
|
| 809 | - $filler = '>>DO NOT REPLACE<<'; |
|
| 810 | - |
|
| 811 | - if (\is_array($translation)) { |
|
| 812 | - return array_pad($translation, $length, $filler); |
|
| 813 | - } |
|
| 814 | - |
|
| 815 | - $list = []; |
|
| 816 | - $date = static::now(); |
|
| 817 | - |
|
| 818 | - for ($i = 0; $i < $length; $i++) { |
|
| 819 | - $list[] = $translation($date, $timeString, $i) ?? $filler; |
|
| 820 | - } |
|
| 821 | - |
|
| 822 | - return $list; |
|
| 823 | - } |
|
| 42 | + /** |
|
| 43 | + * Default translator. |
|
| 44 | + * |
|
| 45 | + * @var \Symfony\Component\Translation\TranslatorInterface |
|
| 46 | + */ |
|
| 47 | + protected static $translator; |
|
| 48 | + |
|
| 49 | + /** |
|
| 50 | + * Specific translator of the current instance. |
|
| 51 | + * |
|
| 52 | + * @var \Symfony\Component\Translation\TranslatorInterface |
|
| 53 | + */ |
|
| 54 | + protected $localTranslator; |
|
| 55 | + |
|
| 56 | + /** |
|
| 57 | + * Options for diffForHumans(). |
|
| 58 | + * |
|
| 59 | + * @var int |
|
| 60 | + */ |
|
| 61 | + protected static $humanDiffOptions = CarbonInterface::NO_ZERO_DIFF; |
|
| 62 | + |
|
| 63 | + /** |
|
| 64 | + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. |
|
| 65 | + * You should rather use the ->settings() method. |
|
| 66 | + * @see settings |
|
| 67 | + * |
|
| 68 | + * @param int $humanDiffOptions |
|
| 69 | + */ |
|
| 70 | + public static function setHumanDiffOptions($humanDiffOptions) |
|
| 71 | + { |
|
| 72 | + static::$humanDiffOptions = $humanDiffOptions; |
|
| 73 | + } |
|
| 74 | + |
|
| 75 | + /** |
|
| 76 | + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. |
|
| 77 | + * You should rather use the ->settings() method. |
|
| 78 | + * @see settings |
|
| 79 | + * |
|
| 80 | + * @param int $humanDiffOption |
|
| 81 | + */ |
|
| 82 | + public static function enableHumanDiffOption($humanDiffOption) |
|
| 83 | + { |
|
| 84 | + static::$humanDiffOptions = static::getHumanDiffOptions() | $humanDiffOption; |
|
| 85 | + } |
|
| 86 | + |
|
| 87 | + /** |
|
| 88 | + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. |
|
| 89 | + * You should rather use the ->settings() method. |
|
| 90 | + * @see settings |
|
| 91 | + * |
|
| 92 | + * @param int $humanDiffOption |
|
| 93 | + */ |
|
| 94 | + public static function disableHumanDiffOption($humanDiffOption) |
|
| 95 | + { |
|
| 96 | + static::$humanDiffOptions = static::getHumanDiffOptions() & ~$humanDiffOption; |
|
| 97 | + } |
|
| 98 | + |
|
| 99 | + /** |
|
| 100 | + * Return default humanDiff() options (merged flags as integer). |
|
| 101 | + * |
|
| 102 | + * @return int |
|
| 103 | + */ |
|
| 104 | + public static function getHumanDiffOptions() |
|
| 105 | + { |
|
| 106 | + return static::$humanDiffOptions; |
|
| 107 | + } |
|
| 108 | + |
|
| 109 | + /** |
|
| 110 | + * Get the default translator instance in use. |
|
| 111 | + * |
|
| 112 | + * @return \Symfony\Component\Translation\TranslatorInterface |
|
| 113 | + */ |
|
| 114 | + public static function getTranslator() |
|
| 115 | + { |
|
| 116 | + return static::translator(); |
|
| 117 | + } |
|
| 118 | + |
|
| 119 | + /** |
|
| 120 | + * Set the default translator instance to use. |
|
| 121 | + * |
|
| 122 | + * @param \Symfony\Component\Translation\TranslatorInterface $translator |
|
| 123 | + * |
|
| 124 | + * @return void |
|
| 125 | + */ |
|
| 126 | + public static function setTranslator(TranslatorInterface $translator) |
|
| 127 | + { |
|
| 128 | + static::$translator = $translator; |
|
| 129 | + } |
|
| 130 | + |
|
| 131 | + /** |
|
| 132 | + * Return true if the current instance has its own translator. |
|
| 133 | + * |
|
| 134 | + * @return bool |
|
| 135 | + */ |
|
| 136 | + public function hasLocalTranslator() |
|
| 137 | + { |
|
| 138 | + return isset($this->localTranslator); |
|
| 139 | + } |
|
| 140 | + |
|
| 141 | + /** |
|
| 142 | + * Get the translator of the current instance or the default if none set. |
|
| 143 | + * |
|
| 144 | + * @return \Symfony\Component\Translation\TranslatorInterface |
|
| 145 | + */ |
|
| 146 | + public function getLocalTranslator() |
|
| 147 | + { |
|
| 148 | + return $this->localTranslator ?: static::translator(); |
|
| 149 | + } |
|
| 150 | + |
|
| 151 | + /** |
|
| 152 | + * Set the translator for the current instance. |
|
| 153 | + * |
|
| 154 | + * @param \Symfony\Component\Translation\TranslatorInterface $translator |
|
| 155 | + * |
|
| 156 | + * @return $this |
|
| 157 | + */ |
|
| 158 | + public function setLocalTranslator(TranslatorInterface $translator) |
|
| 159 | + { |
|
| 160 | + $this->localTranslator = $translator; |
|
| 161 | + |
|
| 162 | + return $this; |
|
| 163 | + } |
|
| 164 | + |
|
| 165 | + /** |
|
| 166 | + * Returns raw translation message for a given key. |
|
| 167 | + * |
|
| 168 | + * @param \Symfony\Component\Translation\TranslatorInterface $translator the translator to use |
|
| 169 | + * @param string $key key to find |
|
| 170 | + * @param string|null $locale current locale used if null |
|
| 171 | + * @param string|null $default default value if translation returns the key |
|
| 172 | + * |
|
| 173 | + * @return string |
|
| 174 | + */ |
|
| 175 | + public static function getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) |
|
| 176 | + { |
|
| 177 | + if (!($translator instanceof TranslatorBagInterface && $translator instanceof TranslatorInterface)) { |
|
| 178 | + throw new InvalidTypeException( |
|
| 179 | + 'Translator does not implement '.TranslatorInterface::class.' and '.TranslatorBagInterface::class.'. '. |
|
| 180 | + (\is_object($translator) ? \get_class($translator) : \gettype($translator)).' has been given.' |
|
| 181 | + ); |
|
| 182 | + } |
|
| 183 | + |
|
| 184 | + if (!$locale && $translator instanceof LocaleAwareInterface) { |
|
| 185 | + $locale = $translator->getLocale(); |
|
| 186 | + } |
|
| 187 | + |
|
| 188 | + $result = self::getFromCatalogue($translator, $translator->getCatalogue($locale), $key); |
|
| 189 | + |
|
| 190 | + return $result === $key ? $default : $result; |
|
| 191 | + } |
|
| 192 | + |
|
| 193 | + /** |
|
| 194 | + * Returns raw translation message for a given key. |
|
| 195 | + * |
|
| 196 | + * @param string $key key to find |
|
| 197 | + * @param string|null $locale current locale used if null |
|
| 198 | + * @param string|null $default default value if translation returns the key |
|
| 199 | + * @param \Symfony\Component\Translation\TranslatorInterface $translator an optional translator to use |
|
| 200 | + * |
|
| 201 | + * @return string |
|
| 202 | + */ |
|
| 203 | + public function getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null) |
|
| 204 | + { |
|
| 205 | + return static::getTranslationMessageWith($translator ?: $this->getLocalTranslator(), $key, $locale, $default); |
|
| 206 | + } |
|
| 207 | + |
|
| 208 | + /** |
|
| 209 | + * Translate using translation string or callback available. |
|
| 210 | + * |
|
| 211 | + * @param \Symfony\Component\Translation\TranslatorInterface $translator |
|
| 212 | + * @param string $key |
|
| 213 | + * @param array $parameters |
|
| 214 | + * @param null $number |
|
| 215 | + * |
|
| 216 | + * @return string |
|
| 217 | + */ |
|
| 218 | + public static function translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string |
|
| 219 | + { |
|
| 220 | + $message = static::getTranslationMessageWith($translator, $key, null, $key); |
|
| 221 | + if ($message instanceof Closure) { |
|
| 222 | + return (string) $message(...array_values($parameters)); |
|
| 223 | + } |
|
| 224 | + |
|
| 225 | + if ($number !== null) { |
|
| 226 | + $parameters['%count%'] = $number; |
|
| 227 | + } |
|
| 228 | + if (isset($parameters['%count%'])) { |
|
| 229 | + $parameters[':count'] = $parameters['%count%']; |
|
| 230 | + } |
|
| 231 | + |
|
| 232 | + // @codeCoverageIgnoreStart |
|
| 233 | + $choice = $translator instanceof ContractsTranslatorInterface |
|
| 234 | + ? $translator->trans($key, $parameters) |
|
| 235 | + : $translator->transChoice($key, $number, $parameters); |
|
| 236 | + // @codeCoverageIgnoreEnd |
|
| 237 | + |
|
| 238 | + return (string) $choice; |
|
| 239 | + } |
|
| 240 | + |
|
| 241 | + /** |
|
| 242 | + * Translate using translation string or callback available. |
|
| 243 | + * |
|
| 244 | + * @param string $key |
|
| 245 | + * @param array $parameters |
|
| 246 | + * @param string|int|float|null $number |
|
| 247 | + * @param \Symfony\Component\Translation\TranslatorInterface|null $translator |
|
| 248 | + * @param bool $altNumbers |
|
| 249 | + * |
|
| 250 | + * @return string |
|
| 251 | + */ |
|
| 252 | + public function translate(string $key, array $parameters = [], $number = null, ?TranslatorInterface $translator = null, bool $altNumbers = false): string |
|
| 253 | + { |
|
| 254 | + $translation = static::translateWith($translator ?: $this->getLocalTranslator(), $key, $parameters, $number); |
|
| 255 | + |
|
| 256 | + if ($number !== null && $altNumbers) { |
|
| 257 | + return str_replace($number, $this->translateNumber($number), $translation); |
|
| 258 | + } |
|
| 259 | + |
|
| 260 | + return $translation; |
|
| 261 | + } |
|
| 262 | + |
|
| 263 | + /** |
|
| 264 | + * Returns the alternative number for a given integer if available in the current locale. |
|
| 265 | + * |
|
| 266 | + * @param int $number |
|
| 267 | + * |
|
| 268 | + * @return string |
|
| 269 | + */ |
|
| 270 | + public function translateNumber(int $number): string |
|
| 271 | + { |
|
| 272 | + $translateKey = "alt_numbers.$number"; |
|
| 273 | + $symbol = $this->translate($translateKey); |
|
| 274 | + |
|
| 275 | + if ($symbol !== $translateKey) { |
|
| 276 | + return $symbol; |
|
| 277 | + } |
|
| 278 | + |
|
| 279 | + if ($number > 99 && $this->translate('alt_numbers.99') !== 'alt_numbers.99') { |
|
| 280 | + $start = ''; |
|
| 281 | + foreach ([10000, 1000, 100] as $exp) { |
|
| 282 | + $key = "alt_numbers_pow.$exp"; |
|
| 283 | + if ($number >= $exp && $number < $exp * 10 && ($pow = $this->translate($key)) !== $key) { |
|
| 284 | + $unit = floor($number / $exp); |
|
| 285 | + $number -= $unit * $exp; |
|
| 286 | + $start .= ($unit > 1 ? $this->translate("alt_numbers.$unit") : '').$pow; |
|
| 287 | + } |
|
| 288 | + } |
|
| 289 | + $result = ''; |
|
| 290 | + while ($number) { |
|
| 291 | + $chunk = $number % 100; |
|
| 292 | + $result = $this->translate("alt_numbers.$chunk").$result; |
|
| 293 | + $number = floor($number / 100); |
|
| 294 | + } |
|
| 295 | + |
|
| 296 | + return "$start$result"; |
|
| 297 | + } |
|
| 298 | + |
|
| 299 | + if ($number > 9 && $this->translate('alt_numbers.9') !== 'alt_numbers.9') { |
|
| 300 | + $result = ''; |
|
| 301 | + while ($number) { |
|
| 302 | + $chunk = $number % 10; |
|
| 303 | + $result = $this->translate("alt_numbers.$chunk").$result; |
|
| 304 | + $number = floor($number / 10); |
|
| 305 | + } |
|
| 306 | + |
|
| 307 | + return $result; |
|
| 308 | + } |
|
| 309 | + |
|
| 310 | + return (string) $number; |
|
| 311 | + } |
|
| 312 | + |
|
| 313 | + /** |
|
| 314 | + * Translate a time string from a locale to an other. |
|
| 315 | + * |
|
| 316 | + * @param string $timeString date/time/duration string to translate (may also contain English) |
|
| 317 | + * @param string|null $from input locale of the $timeString parameter (`Carbon::getLocale()` by default) |
|
| 318 | + * @param string|null $to output locale of the result returned (`"en"` by default) |
|
| 319 | + * @param int $mode specify what to translate with options: |
|
| 320 | + * - CarbonInterface::TRANSLATE_ALL (default) |
|
| 321 | + * - CarbonInterface::TRANSLATE_MONTHS |
|
| 322 | + * - CarbonInterface::TRANSLATE_DAYS |
|
| 323 | + * - CarbonInterface::TRANSLATE_UNITS |
|
| 324 | + * - CarbonInterface::TRANSLATE_MERIDIEM |
|
| 325 | + * You can use pipe to group: CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS |
|
| 326 | + * |
|
| 327 | + * @return string |
|
| 328 | + */ |
|
| 329 | + public static function translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) |
|
| 330 | + { |
|
| 331 | + // Fallback source and destination locales |
|
| 332 | + $from = $from ?: static::getLocale(); |
|
| 333 | + $to = $to ?: 'en'; |
|
| 334 | + |
|
| 335 | + if ($from === $to) { |
|
| 336 | + return $timeString; |
|
| 337 | + } |
|
| 338 | + |
|
| 339 | + // Standardize apostrophe |
|
| 340 | + $timeString = strtr($timeString, ['’' => "'"]); |
|
| 341 | + |
|
| 342 | + $fromTranslations = []; |
|
| 343 | + $toTranslations = []; |
|
| 344 | + |
|
| 345 | + foreach (['from', 'to'] as $key) { |
|
| 346 | + $language = $$key; |
|
| 347 | + $translator = Translator::get($language); |
|
| 348 | + $translations = $translator->getMessages(); |
|
| 349 | + |
|
| 350 | + if (!isset($translations[$language])) { |
|
| 351 | + return $timeString; |
|
| 352 | + } |
|
| 353 | + |
|
| 354 | + $translationKey = $key.'Translations'; |
|
| 355 | + $messages = $translations[$language]; |
|
| 356 | + $months = $messages['months'] ?? []; |
|
| 357 | + $weekdays = $messages['weekdays'] ?? []; |
|
| 358 | + $meridiem = $messages['meridiem'] ?? ['AM', 'PM']; |
|
| 359 | + |
|
| 360 | + if ($key === 'from') { |
|
| 361 | + foreach (['months', 'weekdays'] as $variable) { |
|
| 362 | + $list = $messages[$variable.'_standalone'] ?? null; |
|
| 363 | + |
|
| 364 | + if ($list) { |
|
| 365 | + foreach ($$variable as $index => &$name) { |
|
| 366 | + $name .= '|'.$messages[$variable.'_standalone'][$index]; |
|
| 367 | + } |
|
| 368 | + } |
|
| 369 | + } |
|
| 370 | + } |
|
| 371 | + |
|
| 372 | + $$translationKey = array_merge( |
|
| 373 | + $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($months, 12, $timeString) : [], |
|
| 374 | + $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($messages['months_short'] ?? [], 12, $timeString) : [], |
|
| 375 | + $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($weekdays, 7, $timeString) : [], |
|
| 376 | + $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($messages['weekdays_short'] ?? [], 7, $timeString) : [], |
|
| 377 | + $mode & CarbonInterface::TRANSLATE_DIFF ? static::translateWordsByKeys([ |
|
| 378 | + 'diff_now', |
|
| 379 | + 'diff_today', |
|
| 380 | + 'diff_yesterday', |
|
| 381 | + 'diff_tomorrow', |
|
| 382 | + 'diff_before_yesterday', |
|
| 383 | + 'diff_after_tomorrow', |
|
| 384 | + ], $messages, $key) : [], |
|
| 385 | + $mode & CarbonInterface::TRANSLATE_UNITS ? static::translateWordsByKeys([ |
|
| 386 | + 'year', |
|
| 387 | + 'month', |
|
| 388 | + 'week', |
|
| 389 | + 'day', |
|
| 390 | + 'hour', |
|
| 391 | + 'minute', |
|
| 392 | + 'second', |
|
| 393 | + ], $messages, $key) : [], |
|
| 394 | + $mode & CarbonInterface::TRANSLATE_MERIDIEM ? array_map(function ($hour) use ($meridiem) { |
|
| 395 | + if (\is_array($meridiem)) { |
|
| 396 | + return $meridiem[$hour < 12 ? 0 : 1]; |
|
| 397 | + } |
|
| 398 | + |
|
| 399 | + return $meridiem($hour, 0, false); |
|
| 400 | + }, range(0, 23)) : [] |
|
| 401 | + ); |
|
| 402 | + } |
|
| 403 | + |
|
| 404 | + return substr(preg_replace_callback('/(?<=[\d\s+.\/,_-])('.implode('|', $fromTranslations).')(?=[\d\s+.\/,_-])/iu', function ($match) use ($fromTranslations, $toTranslations) { |
|
| 405 | + [$chunk] = $match; |
|
| 406 | + |
|
| 407 | + foreach ($fromTranslations as $index => $word) { |
|
| 408 | + if (preg_match("/^$word\$/iu", $chunk)) { |
|
| 409 | + return $toTranslations[$index] ?? ''; |
|
| 410 | + } |
|
| 411 | + } |
|
| 412 | + |
|
| 413 | + return $chunk; // @codeCoverageIgnore |
|
| 414 | + }, " $timeString "), 1, -1); |
|
| 415 | + } |
|
| 416 | + |
|
| 417 | + /** |
|
| 418 | + * Translate a time string from the current locale (`$date->locale()`) to an other. |
|
| 419 | + * |
|
| 420 | + * @param string $timeString time string to translate |
|
| 421 | + * @param string|null $to output locale of the result returned ("en" by default) |
|
| 422 | + * |
|
| 423 | + * @return string |
|
| 424 | + */ |
|
| 425 | + public function translateTimeStringTo($timeString, $to = null) |
|
| 426 | + { |
|
| 427 | + return static::translateTimeString($timeString, $this->getTranslatorLocale(), $to); |
|
| 428 | + } |
|
| 429 | + |
|
| 430 | + /** |
|
| 431 | + * Get/set the locale for the current instance. |
|
| 432 | + * |
|
| 433 | + * @param string|null $locale |
|
| 434 | + * @param string ...$fallbackLocales |
|
| 435 | + * |
|
| 436 | + * @return $this|string |
|
| 437 | + */ |
|
| 438 | + public function locale(string $locale = null, ...$fallbackLocales) |
|
| 439 | + { |
|
| 440 | + if ($locale === null) { |
|
| 441 | + return $this->getTranslatorLocale(); |
|
| 442 | + } |
|
| 443 | + |
|
| 444 | + if (!$this->localTranslator || $this->getTranslatorLocale($this->localTranslator) !== $locale) { |
|
| 445 | + $translator = Translator::get($locale); |
|
| 446 | + |
|
| 447 | + if (!empty($fallbackLocales)) { |
|
| 448 | + $translator->setFallbackLocales($fallbackLocales); |
|
| 449 | + |
|
| 450 | + foreach ($fallbackLocales as $fallbackLocale) { |
|
| 451 | + $messages = Translator::get($fallbackLocale)->getMessages(); |
|
| 452 | + |
|
| 453 | + if (isset($messages[$fallbackLocale])) { |
|
| 454 | + $translator->setMessages($fallbackLocale, $messages[$fallbackLocale]); |
|
| 455 | + } |
|
| 456 | + } |
|
| 457 | + } |
|
| 458 | + |
|
| 459 | + $this->localTranslator = $translator; |
|
| 460 | + } |
|
| 461 | + |
|
| 462 | + return $this; |
|
| 463 | + } |
|
| 464 | + |
|
| 465 | + /** |
|
| 466 | + * Get the current translator locale. |
|
| 467 | + * |
|
| 468 | + * @return string |
|
| 469 | + */ |
|
| 470 | + public static function getLocale() |
|
| 471 | + { |
|
| 472 | + return static::getLocaleAwareTranslator()->getLocale(); |
|
| 473 | + } |
|
| 474 | + |
|
| 475 | + /** |
|
| 476 | + * Set the current translator locale and indicate if the source locale file exists. |
|
| 477 | + * Pass 'auto' as locale to use closest language from the current LC_TIME locale. |
|
| 478 | + * |
|
| 479 | + * @param string $locale locale ex. en |
|
| 480 | + * |
|
| 481 | + * @return bool |
|
| 482 | + */ |
|
| 483 | + public static function setLocale($locale) |
|
| 484 | + { |
|
| 485 | + return static::getLocaleAwareTranslator()->setLocale($locale) !== false; |
|
| 486 | + } |
|
| 487 | + |
|
| 488 | + /** |
|
| 489 | + * Set the fallback locale. |
|
| 490 | + * |
|
| 491 | + * @see https://symfony.com/doc/current/components/translation.html#fallback-locales |
|
| 492 | + * |
|
| 493 | + * @param string $locale |
|
| 494 | + */ |
|
| 495 | + public static function setFallbackLocale($locale) |
|
| 496 | + { |
|
| 497 | + $translator = static::getTranslator(); |
|
| 498 | + |
|
| 499 | + if (method_exists($translator, 'setFallbackLocales')) { |
|
| 500 | + $translator->setFallbackLocales([$locale]); |
|
| 501 | + |
|
| 502 | + if ($translator instanceof Translator) { |
|
| 503 | + $preferredLocale = $translator->getLocale(); |
|
| 504 | + $translator->setMessages($preferredLocale, array_replace_recursive( |
|
| 505 | + $translator->getMessages()[$locale] ?? [], |
|
| 506 | + Translator::get($locale)->getMessages()[$locale] ?? [], |
|
| 507 | + $translator->getMessages($preferredLocale) |
|
| 508 | + )); |
|
| 509 | + } |
|
| 510 | + } |
|
| 511 | + } |
|
| 512 | + |
|
| 513 | + /** |
|
| 514 | + * Get the fallback locale. |
|
| 515 | + * |
|
| 516 | + * @see https://symfony.com/doc/current/components/translation.html#fallback-locales |
|
| 517 | + * |
|
| 518 | + * @return string|null |
|
| 519 | + */ |
|
| 520 | + public static function getFallbackLocale() |
|
| 521 | + { |
|
| 522 | + $translator = static::getTranslator(); |
|
| 523 | + |
|
| 524 | + if (method_exists($translator, 'getFallbackLocales')) { |
|
| 525 | + return $translator->getFallbackLocales()[0] ?? null; |
|
| 526 | + } |
|
| 527 | + |
|
| 528 | + return null; |
|
| 529 | + } |
|
| 530 | + |
|
| 531 | + /** |
|
| 532 | + * Set the current locale to the given, execute the passed function, reset the locale to previous one, |
|
| 533 | + * then return the result of the closure (or null if the closure was void). |
|
| 534 | + * |
|
| 535 | + * @param string $locale locale ex. en |
|
| 536 | + * @param callable $func |
|
| 537 | + * |
|
| 538 | + * @return mixed |
|
| 539 | + */ |
|
| 540 | + public static function executeWithLocale($locale, $func) |
|
| 541 | + { |
|
| 542 | + $currentLocale = static::getLocale(); |
|
| 543 | + $result = $func(static::setLocale($locale) ? static::getLocale() : false, static::translator()); |
|
| 544 | + static::setLocale($currentLocale); |
|
| 545 | + |
|
| 546 | + return $result; |
|
| 547 | + } |
|
| 548 | + |
|
| 549 | + /** |
|
| 550 | + * Returns true if the given locale is internally supported and has short-units support. |
|
| 551 | + * Support is considered enabled if either year, day or hour has a short variant translated. |
|
| 552 | + * |
|
| 553 | + * @param string $locale locale ex. en |
|
| 554 | + * |
|
| 555 | + * @return bool |
|
| 556 | + */ |
|
| 557 | + public static function localeHasShortUnits($locale) |
|
| 558 | + { |
|
| 559 | + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 560 | + return ($newLocale && (($y = static::translateWith($translator, 'y')) !== 'y' && $y !== static::translateWith($translator, 'year'))) || ( |
|
| 561 | + ($y = static::translateWith($translator, 'd')) !== 'd' && |
|
| 562 | + $y !== static::translateWith($translator, 'day') |
|
| 563 | + ) || ( |
|
| 564 | + ($y = static::translateWith($translator, 'h')) !== 'h' && |
|
| 565 | + $y !== static::translateWith($translator, 'hour') |
|
| 566 | + ); |
|
| 567 | + }); |
|
| 568 | + } |
|
| 569 | + |
|
| 570 | + /** |
|
| 571 | + * Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). |
|
| 572 | + * Support is considered enabled if the 4 sentences are translated in the given locale. |
|
| 573 | + * |
|
| 574 | + * @param string $locale locale ex. en |
|
| 575 | + * |
|
| 576 | + * @return bool |
|
| 577 | + */ |
|
| 578 | + public static function localeHasDiffSyntax($locale) |
|
| 579 | + { |
|
| 580 | + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 581 | + if (!$newLocale) { |
|
| 582 | + return false; |
|
| 583 | + } |
|
| 584 | + |
|
| 585 | + foreach (['ago', 'from_now', 'before', 'after'] as $key) { |
|
| 586 | + if ($translator instanceof TranslatorBagInterface && |
|
| 587 | + self::getFromCatalogue($translator, $translator->getCatalogue($newLocale), $key) instanceof Closure |
|
| 588 | + ) { |
|
| 589 | + continue; |
|
| 590 | + } |
|
| 591 | + |
|
| 592 | + if ($translator->trans($key) === $key) { |
|
| 593 | + return false; |
|
| 594 | + } |
|
| 595 | + } |
|
| 596 | + |
|
| 597 | + return true; |
|
| 598 | + }); |
|
| 599 | + } |
|
| 600 | + |
|
| 601 | + /** |
|
| 602 | + * Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). |
|
| 603 | + * Support is considered enabled if the 3 words are translated in the given locale. |
|
| 604 | + * |
|
| 605 | + * @param string $locale locale ex. en |
|
| 606 | + * |
|
| 607 | + * @return bool |
|
| 608 | + */ |
|
| 609 | + public static function localeHasDiffOneDayWords($locale) |
|
| 610 | + { |
|
| 611 | + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 612 | + return $newLocale && |
|
| 613 | + $translator->trans('diff_now') !== 'diff_now' && |
|
| 614 | + $translator->trans('diff_yesterday') !== 'diff_yesterday' && |
|
| 615 | + $translator->trans('diff_tomorrow') !== 'diff_tomorrow'; |
|
| 616 | + }); |
|
| 617 | + } |
|
| 618 | + |
|
| 619 | + /** |
|
| 620 | + * Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). |
|
| 621 | + * Support is considered enabled if the 2 words are translated in the given locale. |
|
| 622 | + * |
|
| 623 | + * @param string $locale locale ex. en |
|
| 624 | + * |
|
| 625 | + * @return bool |
|
| 626 | + */ |
|
| 627 | + public static function localeHasDiffTwoDayWords($locale) |
|
| 628 | + { |
|
| 629 | + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 630 | + return $newLocale && |
|
| 631 | + $translator->trans('diff_before_yesterday') !== 'diff_before_yesterday' && |
|
| 632 | + $translator->trans('diff_after_tomorrow') !== 'diff_after_tomorrow'; |
|
| 633 | + }); |
|
| 634 | + } |
|
| 635 | + |
|
| 636 | + /** |
|
| 637 | + * Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). |
|
| 638 | + * Support is considered enabled if the 4 sentences are translated in the given locale. |
|
| 639 | + * |
|
| 640 | + * @param string $locale locale ex. en |
|
| 641 | + * |
|
| 642 | + * @return bool |
|
| 643 | + */ |
|
| 644 | + public static function localeHasPeriodSyntax($locale) |
|
| 645 | + { |
|
| 646 | + return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 647 | + return $newLocale && |
|
| 648 | + $translator->trans('period_recurrences') !== 'period_recurrences' && |
|
| 649 | + $translator->trans('period_interval') !== 'period_interval' && |
|
| 650 | + $translator->trans('period_start_date') !== 'period_start_date' && |
|
| 651 | + $translator->trans('period_end_date') !== 'period_end_date'; |
|
| 652 | + }); |
|
| 653 | + } |
|
| 654 | + |
|
| 655 | + /** |
|
| 656 | + * Returns the list of internally available locales and already loaded custom locales. |
|
| 657 | + * (It will ignore custom translator dynamic loading.) |
|
| 658 | + * |
|
| 659 | + * @return array |
|
| 660 | + */ |
|
| 661 | + public static function getAvailableLocales() |
|
| 662 | + { |
|
| 663 | + $translator = static::getLocaleAwareTranslator(); |
|
| 664 | + |
|
| 665 | + return $translator instanceof Translator |
|
| 666 | + ? $translator->getAvailableLocales() |
|
| 667 | + : [$translator->getLocale()]; |
|
| 668 | + } |
|
| 669 | + |
|
| 670 | + /** |
|
| 671 | + * Returns list of Language object for each available locale. This object allow you to get the ISO name, native |
|
| 672 | + * name, region and variant of the locale. |
|
| 673 | + * |
|
| 674 | + * @return Language[] |
|
| 675 | + */ |
|
| 676 | + public static function getAvailableLocalesInfo() |
|
| 677 | + { |
|
| 678 | + $languages = []; |
|
| 679 | + foreach (static::getAvailableLocales() as $id) { |
|
| 680 | + $languages[$id] = new Language($id); |
|
| 681 | + } |
|
| 682 | + |
|
| 683 | + return $languages; |
|
| 684 | + } |
|
| 685 | + |
|
| 686 | + /** |
|
| 687 | + * Initialize the default translator instance if necessary. |
|
| 688 | + * |
|
| 689 | + * @return \Symfony\Component\Translation\TranslatorInterface |
|
| 690 | + */ |
|
| 691 | + protected static function translator() |
|
| 692 | + { |
|
| 693 | + if (static::$translator === null) { |
|
| 694 | + static::$translator = Translator::get(); |
|
| 695 | + } |
|
| 696 | + |
|
| 697 | + return static::$translator; |
|
| 698 | + } |
|
| 699 | + |
|
| 700 | + /** |
|
| 701 | + * Get the locale of a given translator. |
|
| 702 | + * |
|
| 703 | + * If null or omitted, current local translator is used. |
|
| 704 | + * If no local translator is in use, current global translator is used. |
|
| 705 | + * |
|
| 706 | + * @param null $translator |
|
| 707 | + * |
|
| 708 | + * @return string|null |
|
| 709 | + */ |
|
| 710 | + protected function getTranslatorLocale($translator = null): ?string |
|
| 711 | + { |
|
| 712 | + if (\func_num_args() === 0) { |
|
| 713 | + $translator = $this->getLocalTranslator(); |
|
| 714 | + } |
|
| 715 | + |
|
| 716 | + $translator = static::getLocaleAwareTranslator($translator); |
|
| 717 | + |
|
| 718 | + return $translator ? $translator->getLocale() : null; |
|
| 719 | + } |
|
| 720 | + |
|
| 721 | + /** |
|
| 722 | + * Throw an error if passed object is not LocaleAwareInterface. |
|
| 723 | + * |
|
| 724 | + * @param LocaleAwareInterface|null $translator |
|
| 725 | + * |
|
| 726 | + * @return LocaleAwareInterface|null |
|
| 727 | + */ |
|
| 728 | + protected static function getLocaleAwareTranslator($translator = null) |
|
| 729 | + { |
|
| 730 | + if (\func_num_args() === 0) { |
|
| 731 | + $translator = static::translator(); |
|
| 732 | + } |
|
| 733 | + |
|
| 734 | + if ($translator && !($translator instanceof LocaleAwareInterface || method_exists($translator, 'getLocale'))) { |
|
| 735 | + throw new NotLocaleAwareException($translator); // @codeCoverageIgnore |
|
| 736 | + } |
|
| 737 | + |
|
| 738 | + return $translator; |
|
| 739 | + } |
|
| 740 | + |
|
| 741 | + /** |
|
| 742 | + * @param mixed $translator |
|
| 743 | + * @param \Symfony\Component\Translation\MessageCatalogueInterface $catalogue |
|
| 744 | + * |
|
| 745 | + * @return mixed |
|
| 746 | + */ |
|
| 747 | + private static function getFromCatalogue($translator, $catalogue, string $id, string $domain = 'messages') |
|
| 748 | + { |
|
| 749 | + return $translator instanceof TranslatorStrongTypeInterface |
|
| 750 | + ? $translator->getFromCatalogue($catalogue, $id, $domain) // @codeCoverageIgnore |
|
| 751 | + : $catalogue->get($id, $domain); |
|
| 752 | + } |
|
| 753 | + |
|
| 754 | + /** |
|
| 755 | + * Return the word cleaned from its translation codes. |
|
| 756 | + * |
|
| 757 | + * @param string $word |
|
| 758 | + * |
|
| 759 | + * @return string |
|
| 760 | + */ |
|
| 761 | + private static function cleanWordFromTranslationString($word) |
|
| 762 | + { |
|
| 763 | + $word = str_replace([':count', '%count', ':time'], '', $word); |
|
| 764 | + $word = strtr($word, ['’' => "'"]); |
|
| 765 | + $word = preg_replace('/({\d+(,(\d+|Inf))?}|[\[\]]\d+(,(\d+|Inf))?[\[\]])/', '', $word); |
|
| 766 | + |
|
| 767 | + return trim($word); |
|
| 768 | + } |
|
| 769 | + |
|
| 770 | + /** |
|
| 771 | + * Translate a list of words. |
|
| 772 | + * |
|
| 773 | + * @param string[] $keys keys to translate. |
|
| 774 | + * @param string[] $messages messages bag handling translations. |
|
| 775 | + * @param string $key 'to' (to get the translation) or 'from' (to get the detection RegExp pattern). |
|
| 776 | + * |
|
| 777 | + * @return string[] |
|
| 778 | + */ |
|
| 779 | + private static function translateWordsByKeys($keys, $messages, $key): array |
|
| 780 | + { |
|
| 781 | + return array_map(function ($wordKey) use ($messages, $key) { |
|
| 782 | + $message = $key === 'from' && isset($messages[$wordKey.'_regexp']) |
|
| 783 | + ? $messages[$wordKey.'_regexp'] |
|
| 784 | + : ($messages[$wordKey] ?? null); |
|
| 785 | + |
|
| 786 | + if (!$message) { |
|
| 787 | + return '>>DO NOT REPLACE<<'; |
|
| 788 | + } |
|
| 789 | + |
|
| 790 | + $parts = explode('|', $message); |
|
| 791 | + |
|
| 792 | + return $key === 'to' |
|
| 793 | + ? self::cleanWordFromTranslationString(end($parts)) |
|
| 794 | + : '(?:'.implode('|', array_map([static::class, 'cleanWordFromTranslationString'], $parts)).')'; |
|
| 795 | + }, $keys); |
|
| 796 | + } |
|
| 797 | + |
|
| 798 | + /** |
|
| 799 | + * Get an array of translations based on the current date. |
|
| 800 | + * |
|
| 801 | + * @param callable $translation |
|
| 802 | + * @param int $length |
|
| 803 | + * @param string $timeString |
|
| 804 | + * |
|
| 805 | + * @return string[] |
|
| 806 | + */ |
|
| 807 | + private static function getTranslationArray($translation, $length, $timeString): array |
|
| 808 | + { |
|
| 809 | + $filler = '>>DO NOT REPLACE<<'; |
|
| 810 | + |
|
| 811 | + if (\is_array($translation)) { |
|
| 812 | + return array_pad($translation, $length, $filler); |
|
| 813 | + } |
|
| 814 | + |
|
| 815 | + $list = []; |
|
| 816 | + $date = static::now(); |
|
| 817 | + |
|
| 818 | + for ($i = 0; $i < $length; $i++) { |
|
| 819 | + $list[] = $translation($date, $timeString, $i) ?? $filler; |
|
| 820 | + } |
|
| 821 | + |
|
| 822 | + return $list; |
|
| 823 | + } |
|
| 824 | 824 | } |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | 'minute', |
| 392 | 392 | 'second', |
| 393 | 393 | ], $messages, $key) : [], |
| 394 | - $mode & CarbonInterface::TRANSLATE_MERIDIEM ? array_map(function ($hour) use ($meridiem) { |
|
| 394 | + $mode & CarbonInterface::TRANSLATE_MERIDIEM ? array_map(function($hour) use ($meridiem) { |
|
| 395 | 395 | if (\is_array($meridiem)) { |
| 396 | 396 | return $meridiem[$hour < 12 ? 0 : 1]; |
| 397 | 397 | } |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | ); |
| 402 | 402 | } |
| 403 | 403 | |
| 404 | - return substr(preg_replace_callback('/(?<=[\d\s+.\/,_-])('.implode('|', $fromTranslations).')(?=[\d\s+.\/,_-])/iu', function ($match) use ($fromTranslations, $toTranslations) { |
|
| 404 | + return substr(preg_replace_callback('/(?<=[\d\s+.\/,_-])('.implode('|', $fromTranslations).')(?=[\d\s+.\/,_-])/iu', function($match) use ($fromTranslations, $toTranslations) { |
|
| 405 | 405 | [$chunk] = $match; |
| 406 | 406 | |
| 407 | 407 | foreach ($fromTranslations as $index => $word) { |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | */ |
| 557 | 557 | public static function localeHasShortUnits($locale) |
| 558 | 558 | { |
| 559 | - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 559 | + return static::executeWithLocale($locale, function($newLocale, TranslatorInterface $translator) { |
|
| 560 | 560 | return ($newLocale && (($y = static::translateWith($translator, 'y')) !== 'y' && $y !== static::translateWith($translator, 'year'))) || ( |
| 561 | 561 | ($y = static::translateWith($translator, 'd')) !== 'd' && |
| 562 | 562 | $y !== static::translateWith($translator, 'day') |
@@ -577,7 +577,7 @@ discard block |
||
| 577 | 577 | */ |
| 578 | 578 | public static function localeHasDiffSyntax($locale) |
| 579 | 579 | { |
| 580 | - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 580 | + return static::executeWithLocale($locale, function($newLocale, TranslatorInterface $translator) { |
|
| 581 | 581 | if (!$newLocale) { |
| 582 | 582 | return false; |
| 583 | 583 | } |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | */ |
| 609 | 609 | public static function localeHasDiffOneDayWords($locale) |
| 610 | 610 | { |
| 611 | - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 611 | + return static::executeWithLocale($locale, function($newLocale, TranslatorInterface $translator) { |
|
| 612 | 612 | return $newLocale && |
| 613 | 613 | $translator->trans('diff_now') !== 'diff_now' && |
| 614 | 614 | $translator->trans('diff_yesterday') !== 'diff_yesterday' && |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | */ |
| 627 | 627 | public static function localeHasDiffTwoDayWords($locale) |
| 628 | 628 | { |
| 629 | - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 629 | + return static::executeWithLocale($locale, function($newLocale, TranslatorInterface $translator) { |
|
| 630 | 630 | return $newLocale && |
| 631 | 631 | $translator->trans('diff_before_yesterday') !== 'diff_before_yesterday' && |
| 632 | 632 | $translator->trans('diff_after_tomorrow') !== 'diff_after_tomorrow'; |
@@ -643,7 +643,7 @@ discard block |
||
| 643 | 643 | */ |
| 644 | 644 | public static function localeHasPeriodSyntax($locale) |
| 645 | 645 | { |
| 646 | - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { |
|
| 646 | + return static::executeWithLocale($locale, function($newLocale, TranslatorInterface $translator) { |
|
| 647 | 647 | return $newLocale && |
| 648 | 648 | $translator->trans('period_recurrences') !== 'period_recurrences' && |
| 649 | 649 | $translator->trans('period_interval') !== 'period_interval' && |
@@ -778,7 +778,7 @@ discard block |
||
| 778 | 778 | */ |
| 779 | 779 | private static function translateWordsByKeys($keys, $messages, $key): array |
| 780 | 780 | { |
| 781 | - return array_map(function ($wordKey) use ($messages, $key) { |
|
| 781 | + return array_map(function($wordKey) use ($messages, $key) { |
|
| 782 | 782 | $message = $key === 'from' && isset($messages[$wordKey.'_regexp']) |
| 783 | 783 | ? $messages[$wordKey.'_regexp'] |
| 784 | 784 | : ($messages[$wordKey] ?? null); |
@@ -34,271 +34,271 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | trait Serialization |
| 36 | 36 | { |
| 37 | - use ObjectInitialisation; |
|
| 38 | - |
|
| 39 | - /** |
|
| 40 | - * The custom Carbon JSON serializer. |
|
| 41 | - * |
|
| 42 | - * @var callable|null |
|
| 43 | - */ |
|
| 44 | - protected static $serializer; |
|
| 45 | - |
|
| 46 | - /** |
|
| 47 | - * List of key to use for dump/serialization. |
|
| 48 | - * |
|
| 49 | - * @var string[] |
|
| 50 | - */ |
|
| 51 | - protected $dumpProperties = ['date', 'timezone_type', 'timezone']; |
|
| 52 | - |
|
| 53 | - /** |
|
| 54 | - * Locale to dump comes here before serialization. |
|
| 55 | - * |
|
| 56 | - * @var string|null |
|
| 57 | - */ |
|
| 58 | - protected $dumpLocale; |
|
| 59 | - |
|
| 60 | - /** |
|
| 61 | - * Embed date properties to dump in a dedicated variables so it won't overlap native |
|
| 62 | - * DateTime ones. |
|
| 63 | - * |
|
| 64 | - * @var array|null |
|
| 65 | - */ |
|
| 66 | - protected $dumpDateProperties; |
|
| 67 | - |
|
| 68 | - /** |
|
| 69 | - * Return a serialized string of the instance. |
|
| 70 | - * |
|
| 71 | - * @return string |
|
| 72 | - */ |
|
| 73 | - public function serialize() |
|
| 74 | - { |
|
| 75 | - return serialize($this); |
|
| 76 | - } |
|
| 77 | - |
|
| 78 | - /** |
|
| 79 | - * Create an instance from a serialized string. |
|
| 80 | - * |
|
| 81 | - * @param string $value |
|
| 82 | - * |
|
| 83 | - * @throws InvalidFormatException |
|
| 84 | - * |
|
| 85 | - * @return static |
|
| 86 | - */ |
|
| 87 | - public static function fromSerialized($value) |
|
| 88 | - { |
|
| 89 | - $instance = @unserialize((string) $value); |
|
| 90 | - |
|
| 91 | - if (!$instance instanceof static) { |
|
| 92 | - throw new InvalidFormatException("Invalid serialized value: $value"); |
|
| 93 | - } |
|
| 94 | - |
|
| 95 | - return $instance; |
|
| 96 | - } |
|
| 97 | - |
|
| 98 | - /** |
|
| 99 | - * The __set_state handler. |
|
| 100 | - * |
|
| 101 | - * @param string|array $dump |
|
| 102 | - * |
|
| 103 | - * @return static |
|
| 104 | - */ |
|
| 105 | - #[ReturnTypeWillChange] |
|
| 106 | - public static function __set_state($dump) |
|
| 107 | - { |
|
| 108 | - if (\is_string($dump)) { |
|
| 109 | - return static::parse($dump); |
|
| 110 | - } |
|
| 111 | - |
|
| 112 | - /** @var \DateTimeInterface $date */ |
|
| 113 | - $date = get_parent_class(static::class) && method_exists(parent::class, '__set_state') |
|
| 114 | - ? parent::__set_state((array) $dump) |
|
| 115 | - : (object) $dump; |
|
| 116 | - |
|
| 117 | - return static::instance($date); |
|
| 118 | - } |
|
| 119 | - |
|
| 120 | - /** |
|
| 121 | - * Returns the list of properties to dump on serialize() called on. |
|
| 122 | - * |
|
| 123 | - * @return array |
|
| 124 | - */ |
|
| 125 | - public function __sleep() |
|
| 126 | - { |
|
| 127 | - $properties = $this->getSleepProperties(); |
|
| 128 | - |
|
| 129 | - if ($this->localTranslator ?? null) { |
|
| 130 | - $properties[] = 'dumpLocale'; |
|
| 131 | - $this->dumpLocale = $this->locale ?? null; |
|
| 132 | - } |
|
| 133 | - |
|
| 134 | - return $properties; |
|
| 135 | - } |
|
| 136 | - |
|
| 137 | - public function __serialize(): array |
|
| 138 | - { |
|
| 139 | - if (isset($this->timezone_type)) { |
|
| 140 | - return [ |
|
| 141 | - 'date' => $this->date ?? null, |
|
| 142 | - 'timezone_type' => $this->timezone_type, |
|
| 143 | - 'timezone' => $this->timezone ?? null, |
|
| 144 | - ]; |
|
| 145 | - } |
|
| 146 | - |
|
| 147 | - $timezone = $this->getTimezone(); |
|
| 148 | - $export = [ |
|
| 149 | - 'date' => $this->format('Y-m-d H:i:s.u'), |
|
| 150 | - 'timezone_type' => $timezone->getType(), |
|
| 151 | - 'timezone' => $timezone->getName(), |
|
| 152 | - ]; |
|
| 153 | - |
|
| 154 | - // @codeCoverageIgnoreStart |
|
| 155 | - if (\extension_loaded('msgpack') && isset($this->constructedObjectId)) { |
|
| 156 | - $export['dumpDateProperties'] = [ |
|
| 157 | - 'date' => $this->format('Y-m-d H:i:s.u'), |
|
| 158 | - 'timezone' => serialize($this->timezone ?? null), |
|
| 159 | - ]; |
|
| 160 | - } |
|
| 161 | - // @codeCoverageIgnoreEnd |
|
| 162 | - |
|
| 163 | - if ($this->localTranslator ?? null) { |
|
| 164 | - $export['dumpLocale'] = $this->locale ?? null; |
|
| 165 | - } |
|
| 166 | - |
|
| 167 | - return $export; |
|
| 168 | - } |
|
| 169 | - |
|
| 170 | - /** |
|
| 171 | - * Set locale if specified on unserialize() called. |
|
| 172 | - * |
|
| 173 | - * @return void |
|
| 174 | - */ |
|
| 175 | - #[ReturnTypeWillChange] |
|
| 176 | - public function __wakeup() |
|
| 177 | - { |
|
| 178 | - if (parent::class && method_exists(parent::class, '__wakeup')) { |
|
| 179 | - // @codeCoverageIgnoreStart |
|
| 180 | - try { |
|
| 181 | - parent::__wakeup(); |
|
| 182 | - } catch (Throwable $exception) { |
|
| 183 | - try { |
|
| 184 | - // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. |
|
| 185 | - ['date' => $date, 'timezone' => $timezone] = $this->dumpDateProperties; |
|
| 186 | - parent::__construct($date, unserialize($timezone)); |
|
| 187 | - } catch (Throwable $ignoredException) { |
|
| 188 | - throw $exception; |
|
| 189 | - } |
|
| 190 | - } |
|
| 191 | - // @codeCoverageIgnoreEnd |
|
| 192 | - } |
|
| 193 | - |
|
| 194 | - $this->constructedObjectId = spl_object_hash($this); |
|
| 195 | - |
|
| 196 | - if (isset($this->dumpLocale)) { |
|
| 197 | - $this->locale($this->dumpLocale); |
|
| 198 | - $this->dumpLocale = null; |
|
| 199 | - } |
|
| 200 | - |
|
| 201 | - $this->cleanupDumpProperties(); |
|
| 202 | - } |
|
| 203 | - |
|
| 204 | - public function __unserialize(array $data): void |
|
| 205 | - { |
|
| 206 | - // @codeCoverageIgnoreStart |
|
| 207 | - try { |
|
| 208 | - $this->__construct($data['date'] ?? null, $data['timezone'] ?? null); |
|
| 209 | - } catch (Throwable $exception) { |
|
| 210 | - if (!isset($data['dumpDateProperties']['date'], $data['dumpDateProperties']['timezone'])) { |
|
| 211 | - throw $exception; |
|
| 212 | - } |
|
| 213 | - |
|
| 214 | - try { |
|
| 215 | - // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. |
|
| 216 | - ['date' => $date, 'timezone' => $timezone] = $data['dumpDateProperties']; |
|
| 217 | - $this->__construct($date, unserialize($timezone)); |
|
| 218 | - } catch (Throwable $ignoredException) { |
|
| 219 | - throw $exception; |
|
| 220 | - } |
|
| 221 | - } |
|
| 222 | - // @codeCoverageIgnoreEnd |
|
| 223 | - |
|
| 224 | - if (isset($data['dumpLocale'])) { |
|
| 225 | - $this->locale($data['dumpLocale']); |
|
| 226 | - } |
|
| 227 | - } |
|
| 228 | - |
|
| 229 | - /** |
|
| 230 | - * Prepare the object for JSON serialization. |
|
| 231 | - * |
|
| 232 | - * @return array|string |
|
| 233 | - */ |
|
| 234 | - #[ReturnTypeWillChange] |
|
| 235 | - public function jsonSerialize() |
|
| 236 | - { |
|
| 237 | - $serializer = $this->localSerializer ?? static::$serializer; |
|
| 238 | - |
|
| 239 | - if ($serializer) { |
|
| 240 | - return \is_string($serializer) |
|
| 241 | - ? $this->rawFormat($serializer) |
|
| 242 | - : $serializer($this); |
|
| 243 | - } |
|
| 244 | - |
|
| 245 | - return $this->toJSON(); |
|
| 246 | - } |
|
| 247 | - |
|
| 248 | - /** |
|
| 249 | - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. |
|
| 250 | - * You should rather transform Carbon object before the serialization. |
|
| 251 | - * |
|
| 252 | - * JSON serialize all Carbon instances using the given callback. |
|
| 253 | - * |
|
| 254 | - * @param callable $callback |
|
| 255 | - * |
|
| 256 | - * @return void |
|
| 257 | - */ |
|
| 258 | - public static function serializeUsing($callback) |
|
| 259 | - { |
|
| 260 | - static::$serializer = $callback; |
|
| 261 | - } |
|
| 262 | - |
|
| 263 | - /** |
|
| 264 | - * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested. |
|
| 265 | - * foreach ($date as $_) {} |
|
| 266 | - * serializer($date) |
|
| 267 | - * var_export($date) |
|
| 268 | - * get_object_vars($date) |
|
| 269 | - */ |
|
| 270 | - public function cleanupDumpProperties() |
|
| 271 | - { |
|
| 272 | - if (PHP_VERSION < 8.2) { |
|
| 273 | - foreach ($this->dumpProperties as $property) { |
|
| 274 | - if (isset($this->$property)) { |
|
| 275 | - unset($this->$property); |
|
| 276 | - } |
|
| 277 | - } |
|
| 278 | - } |
|
| 279 | - |
|
| 280 | - return $this; |
|
| 281 | - } |
|
| 282 | - |
|
| 283 | - private function getSleepProperties(): array |
|
| 284 | - { |
|
| 285 | - $properties = $this->dumpProperties; |
|
| 286 | - |
|
| 287 | - // @codeCoverageIgnoreStart |
|
| 288 | - if (!\extension_loaded('msgpack')) { |
|
| 289 | - return $properties; |
|
| 290 | - } |
|
| 291 | - |
|
| 292 | - if (isset($this->constructedObjectId)) { |
|
| 293 | - $this->dumpDateProperties = [ |
|
| 294 | - 'date' => $this->format('Y-m-d H:i:s.u'), |
|
| 295 | - 'timezone' => serialize($this->timezone ?? null), |
|
| 296 | - ]; |
|
| 297 | - |
|
| 298 | - $properties[] = 'dumpDateProperties'; |
|
| 299 | - } |
|
| 300 | - |
|
| 301 | - return $properties; |
|
| 302 | - // @codeCoverageIgnoreEnd |
|
| 303 | - } |
|
| 37 | + use ObjectInitialisation; |
|
| 38 | + |
|
| 39 | + /** |
|
| 40 | + * The custom Carbon JSON serializer. |
|
| 41 | + * |
|
| 42 | + * @var callable|null |
|
| 43 | + */ |
|
| 44 | + protected static $serializer; |
|
| 45 | + |
|
| 46 | + /** |
|
| 47 | + * List of key to use for dump/serialization. |
|
| 48 | + * |
|
| 49 | + * @var string[] |
|
| 50 | + */ |
|
| 51 | + protected $dumpProperties = ['date', 'timezone_type', 'timezone']; |
|
| 52 | + |
|
| 53 | + /** |
|
| 54 | + * Locale to dump comes here before serialization. |
|
| 55 | + * |
|
| 56 | + * @var string|null |
|
| 57 | + */ |
|
| 58 | + protected $dumpLocale; |
|
| 59 | + |
|
| 60 | + /** |
|
| 61 | + * Embed date properties to dump in a dedicated variables so it won't overlap native |
|
| 62 | + * DateTime ones. |
|
| 63 | + * |
|
| 64 | + * @var array|null |
|
| 65 | + */ |
|
| 66 | + protected $dumpDateProperties; |
|
| 67 | + |
|
| 68 | + /** |
|
| 69 | + * Return a serialized string of the instance. |
|
| 70 | + * |
|
| 71 | + * @return string |
|
| 72 | + */ |
|
| 73 | + public function serialize() |
|
| 74 | + { |
|
| 75 | + return serialize($this); |
|
| 76 | + } |
|
| 77 | + |
|
| 78 | + /** |
|
| 79 | + * Create an instance from a serialized string. |
|
| 80 | + * |
|
| 81 | + * @param string $value |
|
| 82 | + * |
|
| 83 | + * @throws InvalidFormatException |
|
| 84 | + * |
|
| 85 | + * @return static |
|
| 86 | + */ |
|
| 87 | + public static function fromSerialized($value) |
|
| 88 | + { |
|
| 89 | + $instance = @unserialize((string) $value); |
|
| 90 | + |
|
| 91 | + if (!$instance instanceof static) { |
|
| 92 | + throw new InvalidFormatException("Invalid serialized value: $value"); |
|
| 93 | + } |
|
| 94 | + |
|
| 95 | + return $instance; |
|
| 96 | + } |
|
| 97 | + |
|
| 98 | + /** |
|
| 99 | + * The __set_state handler. |
|
| 100 | + * |
|
| 101 | + * @param string|array $dump |
|
| 102 | + * |
|
| 103 | + * @return static |
|
| 104 | + */ |
|
| 105 | + #[ReturnTypeWillChange] |
|
| 106 | + public static function __set_state($dump) |
|
| 107 | + { |
|
| 108 | + if (\is_string($dump)) { |
|
| 109 | + return static::parse($dump); |
|
| 110 | + } |
|
| 111 | + |
|
| 112 | + /** @var \DateTimeInterface $date */ |
|
| 113 | + $date = get_parent_class(static::class) && method_exists(parent::class, '__set_state') |
|
| 114 | + ? parent::__set_state((array) $dump) |
|
| 115 | + : (object) $dump; |
|
| 116 | + |
|
| 117 | + return static::instance($date); |
|
| 118 | + } |
|
| 119 | + |
|
| 120 | + /** |
|
| 121 | + * Returns the list of properties to dump on serialize() called on. |
|
| 122 | + * |
|
| 123 | + * @return array |
|
| 124 | + */ |
|
| 125 | + public function __sleep() |
|
| 126 | + { |
|
| 127 | + $properties = $this->getSleepProperties(); |
|
| 128 | + |
|
| 129 | + if ($this->localTranslator ?? null) { |
|
| 130 | + $properties[] = 'dumpLocale'; |
|
| 131 | + $this->dumpLocale = $this->locale ?? null; |
|
| 132 | + } |
|
| 133 | + |
|
| 134 | + return $properties; |
|
| 135 | + } |
|
| 136 | + |
|
| 137 | + public function __serialize(): array |
|
| 138 | + { |
|
| 139 | + if (isset($this->timezone_type)) { |
|
| 140 | + return [ |
|
| 141 | + 'date' => $this->date ?? null, |
|
| 142 | + 'timezone_type' => $this->timezone_type, |
|
| 143 | + 'timezone' => $this->timezone ?? null, |
|
| 144 | + ]; |
|
| 145 | + } |
|
| 146 | + |
|
| 147 | + $timezone = $this->getTimezone(); |
|
| 148 | + $export = [ |
|
| 149 | + 'date' => $this->format('Y-m-d H:i:s.u'), |
|
| 150 | + 'timezone_type' => $timezone->getType(), |
|
| 151 | + 'timezone' => $timezone->getName(), |
|
| 152 | + ]; |
|
| 153 | + |
|
| 154 | + // @codeCoverageIgnoreStart |
|
| 155 | + if (\extension_loaded('msgpack') && isset($this->constructedObjectId)) { |
|
| 156 | + $export['dumpDateProperties'] = [ |
|
| 157 | + 'date' => $this->format('Y-m-d H:i:s.u'), |
|
| 158 | + 'timezone' => serialize($this->timezone ?? null), |
|
| 159 | + ]; |
|
| 160 | + } |
|
| 161 | + // @codeCoverageIgnoreEnd |
|
| 162 | + |
|
| 163 | + if ($this->localTranslator ?? null) { |
|
| 164 | + $export['dumpLocale'] = $this->locale ?? null; |
|
| 165 | + } |
|
| 166 | + |
|
| 167 | + return $export; |
|
| 168 | + } |
|
| 169 | + |
|
| 170 | + /** |
|
| 171 | + * Set locale if specified on unserialize() called. |
|
| 172 | + * |
|
| 173 | + * @return void |
|
| 174 | + */ |
|
| 175 | + #[ReturnTypeWillChange] |
|
| 176 | + public function __wakeup() |
|
| 177 | + { |
|
| 178 | + if (parent::class && method_exists(parent::class, '__wakeup')) { |
|
| 179 | + // @codeCoverageIgnoreStart |
|
| 180 | + try { |
|
| 181 | + parent::__wakeup(); |
|
| 182 | + } catch (Throwable $exception) { |
|
| 183 | + try { |
|
| 184 | + // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. |
|
| 185 | + ['date' => $date, 'timezone' => $timezone] = $this->dumpDateProperties; |
|
| 186 | + parent::__construct($date, unserialize($timezone)); |
|
| 187 | + } catch (Throwable $ignoredException) { |
|
| 188 | + throw $exception; |
|
| 189 | + } |
|
| 190 | + } |
|
| 191 | + // @codeCoverageIgnoreEnd |
|
| 192 | + } |
|
| 193 | + |
|
| 194 | + $this->constructedObjectId = spl_object_hash($this); |
|
| 195 | + |
|
| 196 | + if (isset($this->dumpLocale)) { |
|
| 197 | + $this->locale($this->dumpLocale); |
|
| 198 | + $this->dumpLocale = null; |
|
| 199 | + } |
|
| 200 | + |
|
| 201 | + $this->cleanupDumpProperties(); |
|
| 202 | + } |
|
| 203 | + |
|
| 204 | + public function __unserialize(array $data): void |
|
| 205 | + { |
|
| 206 | + // @codeCoverageIgnoreStart |
|
| 207 | + try { |
|
| 208 | + $this->__construct($data['date'] ?? null, $data['timezone'] ?? null); |
|
| 209 | + } catch (Throwable $exception) { |
|
| 210 | + if (!isset($data['dumpDateProperties']['date'], $data['dumpDateProperties']['timezone'])) { |
|
| 211 | + throw $exception; |
|
| 212 | + } |
|
| 213 | + |
|
| 214 | + try { |
|
| 215 | + // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. |
|
| 216 | + ['date' => $date, 'timezone' => $timezone] = $data['dumpDateProperties']; |
|
| 217 | + $this->__construct($date, unserialize($timezone)); |
|
| 218 | + } catch (Throwable $ignoredException) { |
|
| 219 | + throw $exception; |
|
| 220 | + } |
|
| 221 | + } |
|
| 222 | + // @codeCoverageIgnoreEnd |
|
| 223 | + |
|
| 224 | + if (isset($data['dumpLocale'])) { |
|
| 225 | + $this->locale($data['dumpLocale']); |
|
| 226 | + } |
|
| 227 | + } |
|
| 228 | + |
|
| 229 | + /** |
|
| 230 | + * Prepare the object for JSON serialization. |
|
| 231 | + * |
|
| 232 | + * @return array|string |
|
| 233 | + */ |
|
| 234 | + #[ReturnTypeWillChange] |
|
| 235 | + public function jsonSerialize() |
|
| 236 | + { |
|
| 237 | + $serializer = $this->localSerializer ?? static::$serializer; |
|
| 238 | + |
|
| 239 | + if ($serializer) { |
|
| 240 | + return \is_string($serializer) |
|
| 241 | + ? $this->rawFormat($serializer) |
|
| 242 | + : $serializer($this); |
|
| 243 | + } |
|
| 244 | + |
|
| 245 | + return $this->toJSON(); |
|
| 246 | + } |
|
| 247 | + |
|
| 248 | + /** |
|
| 249 | + * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. |
|
| 250 | + * You should rather transform Carbon object before the serialization. |
|
| 251 | + * |
|
| 252 | + * JSON serialize all Carbon instances using the given callback. |
|
| 253 | + * |
|
| 254 | + * @param callable $callback |
|
| 255 | + * |
|
| 256 | + * @return void |
|
| 257 | + */ |
|
| 258 | + public static function serializeUsing($callback) |
|
| 259 | + { |
|
| 260 | + static::$serializer = $callback; |
|
| 261 | + } |
|
| 262 | + |
|
| 263 | + /** |
|
| 264 | + * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested. |
|
| 265 | + * foreach ($date as $_) {} |
|
| 266 | + * serializer($date) |
|
| 267 | + * var_export($date) |
|
| 268 | + * get_object_vars($date) |
|
| 269 | + */ |
|
| 270 | + public function cleanupDumpProperties() |
|
| 271 | + { |
|
| 272 | + if (PHP_VERSION < 8.2) { |
|
| 273 | + foreach ($this->dumpProperties as $property) { |
|
| 274 | + if (isset($this->$property)) { |
|
| 275 | + unset($this->$property); |
|
| 276 | + } |
|
| 277 | + } |
|
| 278 | + } |
|
| 279 | + |
|
| 280 | + return $this; |
|
| 281 | + } |
|
| 282 | + |
|
| 283 | + private function getSleepProperties(): array |
|
| 284 | + { |
|
| 285 | + $properties = $this->dumpProperties; |
|
| 286 | + |
|
| 287 | + // @codeCoverageIgnoreStart |
|
| 288 | + if (!\extension_loaded('msgpack')) { |
|
| 289 | + return $properties; |
|
| 290 | + } |
|
| 291 | + |
|
| 292 | + if (isset($this->constructedObjectId)) { |
|
| 293 | + $this->dumpDateProperties = [ |
|
| 294 | + 'date' => $this->format('Y-m-d H:i:s.u'), |
|
| 295 | + 'timezone' => serialize($this->timezone ?? null), |
|
| 296 | + ]; |
|
| 297 | + |
|
| 298 | + $properties[] = 'dumpDateProperties'; |
|
| 299 | + } |
|
| 300 | + |
|
| 301 | + return $properties; |
|
| 302 | + // @codeCoverageIgnoreEnd |
|
| 303 | + } |
|
| 304 | 304 | } |
@@ -32,1068 +32,1068 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | trait Comparison |
| 34 | 34 | { |
| 35 | - /** @var bool */ |
|
| 36 | - protected $endOfTime = false; |
|
| 37 | - |
|
| 38 | - /** @var bool */ |
|
| 39 | - protected $startOfTime = false; |
|
| 40 | - |
|
| 41 | - /** |
|
| 42 | - * Determines if the instance is equal to another |
|
| 43 | - * |
|
| 44 | - * @example |
|
| 45 | - * ``` |
|
| 46 | - * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:16'); // true |
|
| 47 | - * Carbon::parse('2018-07-25 12:45:16')->eq(Carbon::parse('2018-07-25 12:45:16')); // true |
|
| 48 | - * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:17'); // false |
|
| 49 | - * ``` |
|
| 50 | - * |
|
| 51 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 52 | - * |
|
| 53 | - * @see equalTo() |
|
| 54 | - * |
|
| 55 | - * @return bool |
|
| 56 | - */ |
|
| 57 | - public function eq($date): bool |
|
| 58 | - { |
|
| 59 | - return $this->equalTo($date); |
|
| 60 | - } |
|
| 61 | - |
|
| 62 | - /** |
|
| 63 | - * Determines if the instance is equal to another |
|
| 64 | - * |
|
| 65 | - * @example |
|
| 66 | - * ``` |
|
| 67 | - * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:16'); // true |
|
| 68 | - * Carbon::parse('2018-07-25 12:45:16')->equalTo(Carbon::parse('2018-07-25 12:45:16')); // true |
|
| 69 | - * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:17'); // false |
|
| 70 | - * ``` |
|
| 71 | - * |
|
| 72 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 73 | - * |
|
| 74 | - * @return bool |
|
| 75 | - */ |
|
| 76 | - public function equalTo($date): bool |
|
| 77 | - { |
|
| 78 | - $this->discourageNull($date); |
|
| 79 | - $this->discourageBoolean($date); |
|
| 80 | - |
|
| 81 | - return $this == $this->resolveCarbon($date); |
|
| 82 | - } |
|
| 83 | - |
|
| 84 | - /** |
|
| 85 | - * Determines if the instance is not equal to another |
|
| 86 | - * |
|
| 87 | - * @example |
|
| 88 | - * ``` |
|
| 89 | - * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:16'); // false |
|
| 90 | - * Carbon::parse('2018-07-25 12:45:16')->ne(Carbon::parse('2018-07-25 12:45:16')); // false |
|
| 91 | - * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:17'); // true |
|
| 92 | - * ``` |
|
| 93 | - * |
|
| 94 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 95 | - * |
|
| 96 | - * @see notEqualTo() |
|
| 97 | - * |
|
| 98 | - * @return bool |
|
| 99 | - */ |
|
| 100 | - public function ne($date): bool |
|
| 101 | - { |
|
| 102 | - return $this->notEqualTo($date); |
|
| 103 | - } |
|
| 104 | - |
|
| 105 | - /** |
|
| 106 | - * Determines if the instance is not equal to another |
|
| 107 | - * |
|
| 108 | - * @example |
|
| 109 | - * ``` |
|
| 110 | - * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:16'); // false |
|
| 111 | - * Carbon::parse('2018-07-25 12:45:16')->notEqualTo(Carbon::parse('2018-07-25 12:45:16')); // false |
|
| 112 | - * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:17'); // true |
|
| 113 | - * ``` |
|
| 114 | - * |
|
| 115 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 116 | - * |
|
| 117 | - * @return bool |
|
| 118 | - */ |
|
| 119 | - public function notEqualTo($date): bool |
|
| 120 | - { |
|
| 121 | - return !$this->equalTo($date); |
|
| 122 | - } |
|
| 123 | - |
|
| 124 | - /** |
|
| 125 | - * Determines if the instance is greater (after) than another |
|
| 126 | - * |
|
| 127 | - * @example |
|
| 128 | - * ``` |
|
| 129 | - * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:15'); // true |
|
| 130 | - * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:16'); // false |
|
| 131 | - * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:17'); // false |
|
| 132 | - * ``` |
|
| 133 | - * |
|
| 134 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 135 | - * |
|
| 136 | - * @see greaterThan() |
|
| 137 | - * |
|
| 138 | - * @return bool |
|
| 139 | - */ |
|
| 140 | - public function gt($date): bool |
|
| 141 | - { |
|
| 142 | - return $this->greaterThan($date); |
|
| 143 | - } |
|
| 144 | - |
|
| 145 | - /** |
|
| 146 | - * Determines if the instance is greater (after) than another |
|
| 147 | - * |
|
| 148 | - * @example |
|
| 149 | - * ``` |
|
| 150 | - * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:15'); // true |
|
| 151 | - * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:16'); // false |
|
| 152 | - * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:17'); // false |
|
| 153 | - * ``` |
|
| 154 | - * |
|
| 155 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 156 | - * |
|
| 157 | - * @return bool |
|
| 158 | - */ |
|
| 159 | - public function greaterThan($date): bool |
|
| 160 | - { |
|
| 161 | - $this->discourageNull($date); |
|
| 162 | - $this->discourageBoolean($date); |
|
| 163 | - |
|
| 164 | - return $this > $this->resolveCarbon($date); |
|
| 165 | - } |
|
| 166 | - |
|
| 167 | - /** |
|
| 168 | - * Determines if the instance is greater (after) than another |
|
| 169 | - * |
|
| 170 | - * @example |
|
| 171 | - * ``` |
|
| 172 | - * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:15'); // true |
|
| 173 | - * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:16'); // false |
|
| 174 | - * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:17'); // false |
|
| 175 | - * ``` |
|
| 176 | - * |
|
| 177 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 178 | - * |
|
| 179 | - * @see greaterThan() |
|
| 180 | - * |
|
| 181 | - * @return bool |
|
| 182 | - */ |
|
| 183 | - public function isAfter($date): bool |
|
| 184 | - { |
|
| 185 | - return $this->greaterThan($date); |
|
| 186 | - } |
|
| 187 | - |
|
| 188 | - /** |
|
| 189 | - * Determines if the instance is greater (after) than or equal to another |
|
| 190 | - * |
|
| 191 | - * @example |
|
| 192 | - * ``` |
|
| 193 | - * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:15'); // true |
|
| 194 | - * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:16'); // true |
|
| 195 | - * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:17'); // false |
|
| 196 | - * ``` |
|
| 197 | - * |
|
| 198 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 199 | - * |
|
| 200 | - * @see greaterThanOrEqualTo() |
|
| 201 | - * |
|
| 202 | - * @return bool |
|
| 203 | - */ |
|
| 204 | - public function gte($date): bool |
|
| 205 | - { |
|
| 206 | - return $this->greaterThanOrEqualTo($date); |
|
| 207 | - } |
|
| 208 | - |
|
| 209 | - /** |
|
| 210 | - * Determines if the instance is greater (after) than or equal to another |
|
| 211 | - * |
|
| 212 | - * @example |
|
| 213 | - * ``` |
|
| 214 | - * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:15'); // true |
|
| 215 | - * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:16'); // true |
|
| 216 | - * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:17'); // false |
|
| 217 | - * ``` |
|
| 218 | - * |
|
| 219 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 220 | - * |
|
| 221 | - * @return bool |
|
| 222 | - */ |
|
| 223 | - public function greaterThanOrEqualTo($date): bool |
|
| 224 | - { |
|
| 225 | - $this->discourageNull($date); |
|
| 226 | - $this->discourageBoolean($date); |
|
| 227 | - |
|
| 228 | - return $this >= $this->resolveCarbon($date); |
|
| 229 | - } |
|
| 230 | - |
|
| 231 | - /** |
|
| 232 | - * Determines if the instance is less (before) than another |
|
| 233 | - * |
|
| 234 | - * @example |
|
| 235 | - * ``` |
|
| 236 | - * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:15'); // false |
|
| 237 | - * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:16'); // false |
|
| 238 | - * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:17'); // true |
|
| 239 | - * ``` |
|
| 240 | - * |
|
| 241 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 242 | - * |
|
| 243 | - * @see lessThan() |
|
| 244 | - * |
|
| 245 | - * @return bool |
|
| 246 | - */ |
|
| 247 | - public function lt($date): bool |
|
| 248 | - { |
|
| 249 | - return $this->lessThan($date); |
|
| 250 | - } |
|
| 251 | - |
|
| 252 | - /** |
|
| 253 | - * Determines if the instance is less (before) than another |
|
| 254 | - * |
|
| 255 | - * @example |
|
| 256 | - * ``` |
|
| 257 | - * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:15'); // false |
|
| 258 | - * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:16'); // false |
|
| 259 | - * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:17'); // true |
|
| 260 | - * ``` |
|
| 261 | - * |
|
| 262 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 263 | - * |
|
| 264 | - * @return bool |
|
| 265 | - */ |
|
| 266 | - public function lessThan($date): bool |
|
| 267 | - { |
|
| 268 | - $this->discourageNull($date); |
|
| 269 | - $this->discourageBoolean($date); |
|
| 270 | - |
|
| 271 | - return $this < $this->resolveCarbon($date); |
|
| 272 | - } |
|
| 273 | - |
|
| 274 | - /** |
|
| 275 | - * Determines if the instance is less (before) than another |
|
| 276 | - * |
|
| 277 | - * @example |
|
| 278 | - * ``` |
|
| 279 | - * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:15'); // false |
|
| 280 | - * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:16'); // false |
|
| 281 | - * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:17'); // true |
|
| 282 | - * ``` |
|
| 283 | - * |
|
| 284 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 285 | - * |
|
| 286 | - * @see lessThan() |
|
| 287 | - * |
|
| 288 | - * @return bool |
|
| 289 | - */ |
|
| 290 | - public function isBefore($date): bool |
|
| 291 | - { |
|
| 292 | - return $this->lessThan($date); |
|
| 293 | - } |
|
| 294 | - |
|
| 295 | - /** |
|
| 296 | - * Determines if the instance is less (before) or equal to another |
|
| 297 | - * |
|
| 298 | - * @example |
|
| 299 | - * ``` |
|
| 300 | - * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:15'); // false |
|
| 301 | - * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:16'); // true |
|
| 302 | - * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:17'); // true |
|
| 303 | - * ``` |
|
| 304 | - * |
|
| 305 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 306 | - * |
|
| 307 | - * @see lessThanOrEqualTo() |
|
| 308 | - * |
|
| 309 | - * @return bool |
|
| 310 | - */ |
|
| 311 | - public function lte($date): bool |
|
| 312 | - { |
|
| 313 | - return $this->lessThanOrEqualTo($date); |
|
| 314 | - } |
|
| 315 | - |
|
| 316 | - /** |
|
| 317 | - * Determines if the instance is less (before) or equal to another |
|
| 318 | - * |
|
| 319 | - * @example |
|
| 320 | - * ``` |
|
| 321 | - * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:15'); // false |
|
| 322 | - * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:16'); // true |
|
| 323 | - * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:17'); // true |
|
| 324 | - * ``` |
|
| 325 | - * |
|
| 326 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 327 | - * |
|
| 328 | - * @return bool |
|
| 329 | - */ |
|
| 330 | - public function lessThanOrEqualTo($date): bool |
|
| 331 | - { |
|
| 332 | - $this->discourageNull($date); |
|
| 333 | - $this->discourageBoolean($date); |
|
| 334 | - |
|
| 335 | - return $this <= $this->resolveCarbon($date); |
|
| 336 | - } |
|
| 337 | - |
|
| 338 | - /** |
|
| 339 | - * Determines if the instance is between two others. |
|
| 340 | - * |
|
| 341 | - * The third argument allow you to specify if bounds are included or not (true by default) |
|
| 342 | - * but for when you including/excluding bounds may produce different results in your application, |
|
| 343 | - * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. |
|
| 344 | - * |
|
| 345 | - * @example |
|
| 346 | - * ``` |
|
| 347 | - * Carbon::parse('2018-07-25')->between('2018-07-14', '2018-08-01'); // true |
|
| 348 | - * Carbon::parse('2018-07-25')->between('2018-08-01', '2018-08-20'); // false |
|
| 349 | - * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01'); // true |
|
| 350 | - * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01', false); // false |
|
| 351 | - * ``` |
|
| 352 | - * |
|
| 353 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 |
|
| 354 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 |
|
| 355 | - * @param bool $equal Indicates if an equal to comparison should be done |
|
| 356 | - * |
|
| 357 | - * @return bool |
|
| 358 | - */ |
|
| 359 | - public function between($date1, $date2, $equal = true): bool |
|
| 360 | - { |
|
| 361 | - $date1 = $this->resolveCarbon($date1); |
|
| 362 | - $date2 = $this->resolveCarbon($date2); |
|
| 363 | - |
|
| 364 | - if ($date1->greaterThan($date2)) { |
|
| 365 | - [$date1, $date2] = [$date2, $date1]; |
|
| 366 | - } |
|
| 367 | - |
|
| 368 | - if ($equal) { |
|
| 369 | - return $this >= $date1 && $this <= $date2; |
|
| 370 | - } |
|
| 371 | - |
|
| 372 | - return $this > $date1 && $this < $date2; |
|
| 373 | - } |
|
| 374 | - |
|
| 375 | - /** |
|
| 376 | - * Determines if the instance is between two others, bounds included. |
|
| 377 | - * |
|
| 378 | - * @example |
|
| 379 | - * ``` |
|
| 380 | - * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-14', '2018-08-01'); // true |
|
| 381 | - * Carbon::parse('2018-07-25')->betweenIncluded('2018-08-01', '2018-08-20'); // false |
|
| 382 | - * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-25', '2018-08-01'); // true |
|
| 383 | - * ``` |
|
| 384 | - * |
|
| 385 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 |
|
| 386 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 |
|
| 387 | - * |
|
| 388 | - * @return bool |
|
| 389 | - */ |
|
| 390 | - public function betweenIncluded($date1, $date2): bool |
|
| 391 | - { |
|
| 392 | - return $this->between($date1, $date2, true); |
|
| 393 | - } |
|
| 394 | - |
|
| 395 | - /** |
|
| 396 | - * Determines if the instance is between two others, bounds excluded. |
|
| 397 | - * |
|
| 398 | - * @example |
|
| 399 | - * ``` |
|
| 400 | - * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-14', '2018-08-01'); // true |
|
| 401 | - * Carbon::parse('2018-07-25')->betweenExcluded('2018-08-01', '2018-08-20'); // false |
|
| 402 | - * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-25', '2018-08-01'); // false |
|
| 403 | - * ``` |
|
| 404 | - * |
|
| 405 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 |
|
| 406 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 |
|
| 407 | - * |
|
| 408 | - * @return bool |
|
| 409 | - */ |
|
| 410 | - public function betweenExcluded($date1, $date2): bool |
|
| 411 | - { |
|
| 412 | - return $this->between($date1, $date2, false); |
|
| 413 | - } |
|
| 414 | - |
|
| 415 | - /** |
|
| 416 | - * Determines if the instance is between two others |
|
| 417 | - * |
|
| 418 | - * @example |
|
| 419 | - * ``` |
|
| 420 | - * Carbon::parse('2018-07-25')->isBetween('2018-07-14', '2018-08-01'); // true |
|
| 421 | - * Carbon::parse('2018-07-25')->isBetween('2018-08-01', '2018-08-20'); // false |
|
| 422 | - * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01'); // true |
|
| 423 | - * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01', false); // false |
|
| 424 | - * ``` |
|
| 425 | - * |
|
| 426 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 |
|
| 427 | - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 |
|
| 428 | - * @param bool $equal Indicates if an equal to comparison should be done |
|
| 429 | - * |
|
| 430 | - * @return bool |
|
| 431 | - */ |
|
| 432 | - public function isBetween($date1, $date2, $equal = true): bool |
|
| 433 | - { |
|
| 434 | - return $this->between($date1, $date2, $equal); |
|
| 435 | - } |
|
| 436 | - |
|
| 437 | - /** |
|
| 438 | - * Determines if the instance is a weekday. |
|
| 439 | - * |
|
| 440 | - * @example |
|
| 441 | - * ``` |
|
| 442 | - * Carbon::parse('2019-07-14')->isWeekday(); // false |
|
| 443 | - * Carbon::parse('2019-07-15')->isWeekday(); // true |
|
| 444 | - * ``` |
|
| 445 | - * |
|
| 446 | - * @return bool |
|
| 447 | - */ |
|
| 448 | - public function isWeekday() |
|
| 449 | - { |
|
| 450 | - return !$this->isWeekend(); |
|
| 451 | - } |
|
| 452 | - |
|
| 453 | - /** |
|
| 454 | - * Determines if the instance is a weekend day. |
|
| 455 | - * |
|
| 456 | - * @example |
|
| 457 | - * ``` |
|
| 458 | - * Carbon::parse('2019-07-14')->isWeekend(); // true |
|
| 459 | - * Carbon::parse('2019-07-15')->isWeekend(); // false |
|
| 460 | - * ``` |
|
| 461 | - * |
|
| 462 | - * @return bool |
|
| 463 | - */ |
|
| 464 | - public function isWeekend() |
|
| 465 | - { |
|
| 466 | - return \in_array($this->dayOfWeek, static::$weekendDays, true); |
|
| 467 | - } |
|
| 468 | - |
|
| 469 | - /** |
|
| 470 | - * Determines if the instance is yesterday. |
|
| 471 | - * |
|
| 472 | - * @example |
|
| 473 | - * ``` |
|
| 474 | - * Carbon::yesterday()->isYesterday(); // true |
|
| 475 | - * Carbon::tomorrow()->isYesterday(); // false |
|
| 476 | - * ``` |
|
| 477 | - * |
|
| 478 | - * @return bool |
|
| 479 | - */ |
|
| 480 | - public function isYesterday() |
|
| 481 | - { |
|
| 482 | - return $this->toDateString() === static::yesterday($this->getTimezone())->toDateString(); |
|
| 483 | - } |
|
| 484 | - |
|
| 485 | - /** |
|
| 486 | - * Determines if the instance is today. |
|
| 487 | - * |
|
| 488 | - * @example |
|
| 489 | - * ``` |
|
| 490 | - * Carbon::today()->isToday(); // true |
|
| 491 | - * Carbon::tomorrow()->isToday(); // false |
|
| 492 | - * ``` |
|
| 493 | - * |
|
| 494 | - * @return bool |
|
| 495 | - */ |
|
| 496 | - public function isToday() |
|
| 497 | - { |
|
| 498 | - return $this->toDateString() === $this->nowWithSameTz()->toDateString(); |
|
| 499 | - } |
|
| 500 | - |
|
| 501 | - /** |
|
| 502 | - * Determines if the instance is tomorrow. |
|
| 503 | - * |
|
| 504 | - * @example |
|
| 505 | - * ``` |
|
| 506 | - * Carbon::tomorrow()->isTomorrow(); // true |
|
| 507 | - * Carbon::yesterday()->isTomorrow(); // false |
|
| 508 | - * ``` |
|
| 509 | - * |
|
| 510 | - * @return bool |
|
| 511 | - */ |
|
| 512 | - public function isTomorrow() |
|
| 513 | - { |
|
| 514 | - return $this->toDateString() === static::tomorrow($this->getTimezone())->toDateString(); |
|
| 515 | - } |
|
| 516 | - |
|
| 517 | - /** |
|
| 518 | - * Determines if the instance is in the future, ie. greater (after) than now. |
|
| 519 | - * |
|
| 520 | - * @example |
|
| 521 | - * ``` |
|
| 522 | - * Carbon::now()->addHours(5)->isFuture(); // true |
|
| 523 | - * Carbon::now()->subHours(5)->isFuture(); // false |
|
| 524 | - * ``` |
|
| 525 | - * |
|
| 526 | - * @return bool |
|
| 527 | - */ |
|
| 528 | - public function isFuture() |
|
| 529 | - { |
|
| 530 | - return $this->greaterThan($this->nowWithSameTz()); |
|
| 531 | - } |
|
| 532 | - |
|
| 533 | - /** |
|
| 534 | - * Determines if the instance is in the past, ie. less (before) than now. |
|
| 535 | - * |
|
| 536 | - * @example |
|
| 537 | - * ``` |
|
| 538 | - * Carbon::now()->subHours(5)->isPast(); // true |
|
| 539 | - * Carbon::now()->addHours(5)->isPast(); // false |
|
| 540 | - * ``` |
|
| 541 | - * |
|
| 542 | - * @return bool |
|
| 543 | - */ |
|
| 544 | - public function isPast() |
|
| 545 | - { |
|
| 546 | - return $this->lessThan($this->nowWithSameTz()); |
|
| 547 | - } |
|
| 548 | - |
|
| 549 | - /** |
|
| 550 | - * Determines if the instance is a leap year. |
|
| 551 | - * |
|
| 552 | - * @example |
|
| 553 | - * ``` |
|
| 554 | - * Carbon::parse('2020-01-01')->isLeapYear(); // true |
|
| 555 | - * Carbon::parse('2019-01-01')->isLeapYear(); // false |
|
| 556 | - * ``` |
|
| 557 | - * |
|
| 558 | - * @return bool |
|
| 559 | - */ |
|
| 560 | - public function isLeapYear() |
|
| 561 | - { |
|
| 562 | - return $this->rawFormat('L') === '1'; |
|
| 563 | - } |
|
| 564 | - |
|
| 565 | - /** |
|
| 566 | - * Determines if the instance is a long year |
|
| 567 | - * |
|
| 568 | - * @example |
|
| 569 | - * ``` |
|
| 570 | - * Carbon::parse('2015-01-01')->isLongYear(); // true |
|
| 571 | - * Carbon::parse('2016-01-01')->isLongYear(); // false |
|
| 572 | - * ``` |
|
| 573 | - * |
|
| 574 | - * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates |
|
| 575 | - * |
|
| 576 | - * @return bool |
|
| 577 | - */ |
|
| 578 | - public function isLongYear() |
|
| 579 | - { |
|
| 580 | - return static::create($this->year, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; |
|
| 581 | - } |
|
| 582 | - |
|
| 583 | - /** |
|
| 584 | - * Compares the formatted values of the two dates. |
|
| 585 | - * |
|
| 586 | - * @example |
|
| 587 | - * ``` |
|
| 588 | - * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-12-13')); // true |
|
| 589 | - * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-06-14')); // false |
|
| 590 | - * ``` |
|
| 591 | - * |
|
| 592 | - * @param string $format date formats to compare. |
|
| 593 | - * @param \Carbon\Carbon|\DateTimeInterface|string|null $date instance to compare with or null to use current day. |
|
| 594 | - * |
|
| 595 | - * @return bool |
|
| 596 | - */ |
|
| 597 | - public function isSameAs($format, $date = null) |
|
| 598 | - { |
|
| 599 | - return $this->rawFormat($format) === $this->resolveCarbon($date)->rawFormat($format); |
|
| 600 | - } |
|
| 601 | - |
|
| 602 | - /** |
|
| 603 | - * Determines if the instance is in the current unit given. |
|
| 604 | - * |
|
| 605 | - * @example |
|
| 606 | - * ``` |
|
| 607 | - * Carbon::parse('2019-01-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // true |
|
| 608 | - * Carbon::parse('2018-12-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // false |
|
| 609 | - * ``` |
|
| 610 | - * |
|
| 611 | - * @param string $unit singular unit string |
|
| 612 | - * @param \Carbon\Carbon|\DateTimeInterface|null $date instance to compare with or null to use current day. |
|
| 613 | - * |
|
| 614 | - * @throws BadComparisonUnitException |
|
| 615 | - * |
|
| 616 | - * @return bool |
|
| 617 | - */ |
|
| 618 | - public function isSameUnit($unit, $date = null) |
|
| 619 | - { |
|
| 620 | - $units = [ |
|
| 621 | - // @call isSameUnit |
|
| 622 | - 'year' => 'Y', |
|
| 623 | - // @call isSameUnit |
|
| 624 | - 'week' => 'o-W', |
|
| 625 | - // @call isSameUnit |
|
| 626 | - 'day' => 'Y-m-d', |
|
| 627 | - // @call isSameUnit |
|
| 628 | - 'hour' => 'Y-m-d H', |
|
| 629 | - // @call isSameUnit |
|
| 630 | - 'minute' => 'Y-m-d H:i', |
|
| 631 | - // @call isSameUnit |
|
| 632 | - 'second' => 'Y-m-d H:i:s', |
|
| 633 | - // @call isSameUnit |
|
| 634 | - 'micro' => 'Y-m-d H:i:s.u', |
|
| 635 | - // @call isSameUnit |
|
| 636 | - 'microsecond' => 'Y-m-d H:i:s.u', |
|
| 637 | - ]; |
|
| 638 | - |
|
| 639 | - if (isset($units[$unit])) { |
|
| 640 | - return $this->isSameAs($units[$unit], $date); |
|
| 641 | - } |
|
| 642 | - |
|
| 643 | - if (isset($this->$unit)) { |
|
| 644 | - return $this->resolveCarbon($date)->$unit === $this->$unit; |
|
| 645 | - } |
|
| 646 | - |
|
| 647 | - if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { |
|
| 648 | - throw new BadComparisonUnitException($unit); |
|
| 649 | - } |
|
| 650 | - |
|
| 651 | - return false; |
|
| 652 | - } |
|
| 653 | - |
|
| 654 | - /** |
|
| 655 | - * Determines if the instance is in the current unit given. |
|
| 656 | - * |
|
| 657 | - * @example |
|
| 658 | - * ``` |
|
| 659 | - * Carbon::now()->isCurrentUnit('hour'); // true |
|
| 660 | - * Carbon::now()->subHours(2)->isCurrentUnit('hour'); // false |
|
| 661 | - * ``` |
|
| 662 | - * |
|
| 663 | - * @param string $unit The unit to test. |
|
| 664 | - * |
|
| 665 | - * @throws BadMethodCallException |
|
| 666 | - * |
|
| 667 | - * @return bool |
|
| 668 | - */ |
|
| 669 | - public function isCurrentUnit($unit) |
|
| 670 | - { |
|
| 671 | - return $this->{'isSame'.ucfirst($unit)}(); |
|
| 672 | - } |
|
| 673 | - |
|
| 674 | - /** |
|
| 675 | - * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). |
|
| 676 | - * |
|
| 677 | - * @example |
|
| 678 | - * ``` |
|
| 679 | - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-03-01')); // true |
|
| 680 | - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-04-01')); // false |
|
| 681 | - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01')); // false |
|
| 682 | - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01'), false); // true |
|
| 683 | - * ``` |
|
| 684 | - * |
|
| 685 | - * @param \Carbon\Carbon|\DateTimeInterface|string|null $date The instance to compare with or null to use current day. |
|
| 686 | - * @param bool $ofSameYear Check if it is the same month in the same year. |
|
| 687 | - * |
|
| 688 | - * @return bool |
|
| 689 | - */ |
|
| 690 | - public function isSameQuarter($date = null, $ofSameYear = true) |
|
| 691 | - { |
|
| 692 | - $date = $this->resolveCarbon($date); |
|
| 693 | - |
|
| 694 | - return $this->quarter === $date->quarter && (!$ofSameYear || $this->isSameYear($date)); |
|
| 695 | - } |
|
| 696 | - |
|
| 697 | - /** |
|
| 698 | - * Checks if the passed in date is in the same month as the instance´s month. |
|
| 699 | - * |
|
| 700 | - * @example |
|
| 701 | - * ``` |
|
| 702 | - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-01-01')); // true |
|
| 703 | - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-02-01')); // false |
|
| 704 | - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01')); // false |
|
| 705 | - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01'), false); // true |
|
| 706 | - * ``` |
|
| 707 | - * |
|
| 708 | - * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. |
|
| 709 | - * @param bool $ofSameYear Check if it is the same month in the same year. |
|
| 710 | - * |
|
| 711 | - * @return bool |
|
| 712 | - */ |
|
| 713 | - public function isSameMonth($date = null, $ofSameYear = true) |
|
| 714 | - { |
|
| 715 | - return $this->isSameAs($ofSameYear ? 'Y-m' : 'm', $date); |
|
| 716 | - } |
|
| 717 | - |
|
| 718 | - /** |
|
| 719 | - * Checks if this day is a specific day of the week. |
|
| 720 | - * |
|
| 721 | - * @example |
|
| 722 | - * ``` |
|
| 723 | - * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::WEDNESDAY); // true |
|
| 724 | - * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::FRIDAY); // false |
|
| 725 | - * Carbon::parse('2019-07-17')->isDayOfWeek('Wednesday'); // true |
|
| 726 | - * Carbon::parse('2019-07-17')->isDayOfWeek('Friday'); // false |
|
| 727 | - * ``` |
|
| 728 | - * |
|
| 729 | - * @param int $dayOfWeek |
|
| 730 | - * |
|
| 731 | - * @return bool |
|
| 732 | - */ |
|
| 733 | - public function isDayOfWeek($dayOfWeek) |
|
| 734 | - { |
|
| 735 | - if (\is_string($dayOfWeek) && \defined($constant = static::class.'::'.strtoupper($dayOfWeek))) { |
|
| 736 | - $dayOfWeek = \constant($constant); |
|
| 737 | - } |
|
| 738 | - |
|
| 739 | - return $this->dayOfWeek === $dayOfWeek; |
|
| 740 | - } |
|
| 741 | - |
|
| 742 | - /** |
|
| 743 | - * Check if its the birthday. Compares the date/month values of the two dates. |
|
| 744 | - * |
|
| 745 | - * @example |
|
| 746 | - * ``` |
|
| 747 | - * Carbon::now()->subYears(5)->isBirthday(); // true |
|
| 748 | - * Carbon::now()->subYears(5)->subDay()->isBirthday(); // false |
|
| 749 | - * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-05')); // true |
|
| 750 | - * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-06')); // false |
|
| 751 | - * ``` |
|
| 752 | - * |
|
| 753 | - * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. |
|
| 754 | - * |
|
| 755 | - * @return bool |
|
| 756 | - */ |
|
| 757 | - public function isBirthday($date = null) |
|
| 758 | - { |
|
| 759 | - return $this->isSameAs('md', $date); |
|
| 760 | - } |
|
| 761 | - |
|
| 762 | - /** |
|
| 763 | - * Check if today is the last day of the Month |
|
| 764 | - * |
|
| 765 | - * @example |
|
| 766 | - * ``` |
|
| 767 | - * Carbon::parse('2019-02-28')->isLastOfMonth(); // true |
|
| 768 | - * Carbon::parse('2019-03-28')->isLastOfMonth(); // false |
|
| 769 | - * Carbon::parse('2019-03-30')->isLastOfMonth(); // false |
|
| 770 | - * Carbon::parse('2019-03-31')->isLastOfMonth(); // true |
|
| 771 | - * Carbon::parse('2019-04-30')->isLastOfMonth(); // true |
|
| 772 | - * ``` |
|
| 773 | - * |
|
| 774 | - * @return bool |
|
| 775 | - */ |
|
| 776 | - public function isLastOfMonth() |
|
| 777 | - { |
|
| 778 | - return $this->day === $this->daysInMonth; |
|
| 779 | - } |
|
| 780 | - |
|
| 781 | - /** |
|
| 782 | - * Check if the instance is start of day / midnight. |
|
| 783 | - * |
|
| 784 | - * @example |
|
| 785 | - * ``` |
|
| 786 | - * Carbon::parse('2019-02-28 00:00:00')->isStartOfDay(); // true |
|
| 787 | - * Carbon::parse('2019-02-28 00:00:00.999999')->isStartOfDay(); // true |
|
| 788 | - * Carbon::parse('2019-02-28 00:00:01')->isStartOfDay(); // false |
|
| 789 | - * Carbon::parse('2019-02-28 00:00:00.000000')->isStartOfDay(true); // true |
|
| 790 | - * Carbon::parse('2019-02-28 00:00:00.000012')->isStartOfDay(true); // false |
|
| 791 | - * ``` |
|
| 792 | - * |
|
| 793 | - * @param bool $checkMicroseconds check time at microseconds precision |
|
| 794 | - * |
|
| 795 | - * @return bool |
|
| 796 | - */ |
|
| 797 | - public function isStartOfDay($checkMicroseconds = false) |
|
| 798 | - { |
|
| 799 | - /* @var CarbonInterface $this */ |
|
| 800 | - return $checkMicroseconds |
|
| 801 | - ? $this->rawFormat('H:i:s.u') === '00:00:00.000000' |
|
| 802 | - : $this->rawFormat('H:i:s') === '00:00:00'; |
|
| 803 | - } |
|
| 804 | - |
|
| 805 | - /** |
|
| 806 | - * Check if the instance is end of day. |
|
| 807 | - * |
|
| 808 | - * @example |
|
| 809 | - * ``` |
|
| 810 | - * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(); // true |
|
| 811 | - * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(); // true |
|
| 812 | - * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(); // true |
|
| 813 | - * Carbon::parse('2019-02-28 23:59:58.999999')->isEndOfDay(); // false |
|
| 814 | - * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(true); // true |
|
| 815 | - * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(true); // false |
|
| 816 | - * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(true); // false |
|
| 817 | - * ``` |
|
| 818 | - * |
|
| 819 | - * @param bool $checkMicroseconds check time at microseconds precision |
|
| 820 | - * |
|
| 821 | - * @return bool |
|
| 822 | - */ |
|
| 823 | - public function isEndOfDay($checkMicroseconds = false) |
|
| 824 | - { |
|
| 825 | - /* @var CarbonInterface $this */ |
|
| 826 | - return $checkMicroseconds |
|
| 827 | - ? $this->rawFormat('H:i:s.u') === '23:59:59.999999' |
|
| 828 | - : $this->rawFormat('H:i:s') === '23:59:59'; |
|
| 829 | - } |
|
| 830 | - |
|
| 831 | - /** |
|
| 832 | - * Check if the instance is start of day / midnight. |
|
| 833 | - * |
|
| 834 | - * @example |
|
| 835 | - * ``` |
|
| 836 | - * Carbon::parse('2019-02-28 00:00:00')->isMidnight(); // true |
|
| 837 | - * Carbon::parse('2019-02-28 00:00:00.999999')->isMidnight(); // true |
|
| 838 | - * Carbon::parse('2019-02-28 00:00:01')->isMidnight(); // false |
|
| 839 | - * ``` |
|
| 840 | - * |
|
| 841 | - * @return bool |
|
| 842 | - */ |
|
| 843 | - public function isMidnight() |
|
| 844 | - { |
|
| 845 | - return $this->isStartOfDay(); |
|
| 846 | - } |
|
| 847 | - |
|
| 848 | - /** |
|
| 849 | - * Check if the instance is midday. |
|
| 850 | - * |
|
| 851 | - * @example |
|
| 852 | - * ``` |
|
| 853 | - * Carbon::parse('2019-02-28 11:59:59.999999')->isMidday(); // false |
|
| 854 | - * Carbon::parse('2019-02-28 12:00:00')->isMidday(); // true |
|
| 855 | - * Carbon::parse('2019-02-28 12:00:00.999999')->isMidday(); // true |
|
| 856 | - * Carbon::parse('2019-02-28 12:00:01')->isMidday(); // false |
|
| 857 | - * ``` |
|
| 858 | - * |
|
| 859 | - * @return bool |
|
| 860 | - */ |
|
| 861 | - public function isMidday() |
|
| 862 | - { |
|
| 863 | - /* @var CarbonInterface $this */ |
|
| 864 | - return $this->rawFormat('G:i:s') === static::$midDayAt.':00:00'; |
|
| 865 | - } |
|
| 866 | - |
|
| 867 | - /** |
|
| 868 | - * Checks if the (date)time string is in a given format. |
|
| 869 | - * |
|
| 870 | - * @example |
|
| 871 | - * ``` |
|
| 872 | - * Carbon::hasFormat('11:12:45', 'h:i:s'); // true |
|
| 873 | - * Carbon::hasFormat('13:12:45', 'h:i:s'); // false |
|
| 874 | - * ``` |
|
| 875 | - * |
|
| 876 | - * @param string $date |
|
| 877 | - * @param string $format |
|
| 878 | - * |
|
| 879 | - * @return bool |
|
| 880 | - */ |
|
| 881 | - public static function hasFormat($date, $format) |
|
| 882 | - { |
|
| 883 | - // createFromFormat() is known to handle edge cases silently. |
|
| 884 | - // E.g. "1975-5-1" (Y-n-j) will still be parsed correctly when "Y-m-d" is supplied as the format. |
|
| 885 | - // To ensure we're really testing against our desired format, perform an additional regex validation. |
|
| 886 | - |
|
| 887 | - return self::matchFormatPattern((string) $date, preg_quote((string) $format, '/'), static::$regexFormats); |
|
| 888 | - } |
|
| 889 | - |
|
| 890 | - /** |
|
| 891 | - * Checks if the (date)time string is in a given format. |
|
| 892 | - * |
|
| 893 | - * @example |
|
| 894 | - * ``` |
|
| 895 | - * Carbon::hasFormatWithModifiers('31/08/2015', 'd#m#Y'); // true |
|
| 896 | - * Carbon::hasFormatWithModifiers('31/08/2015', 'm#d#Y'); // false |
|
| 897 | - * ``` |
|
| 898 | - * |
|
| 899 | - * @param string $date |
|
| 900 | - * @param string $format |
|
| 901 | - * |
|
| 902 | - * @return bool |
|
| 903 | - */ |
|
| 904 | - public static function hasFormatWithModifiers($date, $format): bool |
|
| 905 | - { |
|
| 906 | - return self::matchFormatPattern((string) $date, (string) $format, array_merge(static::$regexFormats, static::$regexFormatModifiers)); |
|
| 907 | - } |
|
| 908 | - |
|
| 909 | - /** |
|
| 910 | - * Checks if the (date)time string is in a given format and valid to create a |
|
| 911 | - * new instance. |
|
| 912 | - * |
|
| 913 | - * @example |
|
| 914 | - * ``` |
|
| 915 | - * Carbon::canBeCreatedFromFormat('11:12:45', 'h:i:s'); // true |
|
| 916 | - * Carbon::canBeCreatedFromFormat('13:12:45', 'h:i:s'); // false |
|
| 917 | - * ``` |
|
| 918 | - * |
|
| 919 | - * @param string $date |
|
| 920 | - * @param string $format |
|
| 921 | - * |
|
| 922 | - * @return bool |
|
| 923 | - */ |
|
| 924 | - public static function canBeCreatedFromFormat($date, $format) |
|
| 925 | - { |
|
| 926 | - try { |
|
| 927 | - // Try to create a DateTime object. Throws an InvalidArgumentException if the provided time string |
|
| 928 | - // doesn't match the format in any way. |
|
| 929 | - if (!static::rawCreateFromFormat($format, $date)) { |
|
| 930 | - return false; |
|
| 931 | - } |
|
| 932 | - } catch (InvalidArgumentException $e) { |
|
| 933 | - return false; |
|
| 934 | - } |
|
| 935 | - |
|
| 936 | - return static::hasFormatWithModifiers($date, $format); |
|
| 937 | - } |
|
| 938 | - |
|
| 939 | - /** |
|
| 940 | - * Returns true if the current date matches the given string. |
|
| 941 | - * |
|
| 942 | - * @example |
|
| 943 | - * ``` |
|
| 944 | - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019')); // true |
|
| 945 | - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2018')); // false |
|
| 946 | - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06')); // true |
|
| 947 | - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('06-02')); // true |
|
| 948 | - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06-02')); // true |
|
| 949 | - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('Sunday')); // true |
|
| 950 | - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('June')); // true |
|
| 951 | - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23')); // true |
|
| 952 | - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:45')); // true |
|
| 953 | - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:00')); // false |
|
| 954 | - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12h')); // true |
|
| 955 | - * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3pm')); // true |
|
| 956 | - * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3am')); // false |
|
| 957 | - * ``` |
|
| 958 | - * |
|
| 959 | - * @param string $tester day name, month name, hour, date, etc. as string |
|
| 960 | - * |
|
| 961 | - * @return bool |
|
| 962 | - */ |
|
| 963 | - public function is(string $tester) |
|
| 964 | - { |
|
| 965 | - $tester = trim($tester); |
|
| 966 | - |
|
| 967 | - if (preg_match('/^\d+$/', $tester)) { |
|
| 968 | - return $this->year === (int) $tester; |
|
| 969 | - } |
|
| 970 | - |
|
| 971 | - if (preg_match('/^\d{3,}-\d{1,2}$/', $tester)) { |
|
| 972 | - return $this->isSameMonth(static::parse($tester)); |
|
| 973 | - } |
|
| 974 | - |
|
| 975 | - if (preg_match('/^\d{1,2}-\d{1,2}$/', $tester)) { |
|
| 976 | - return $this->isSameDay(static::parse($this->year.'-'.$tester)); |
|
| 977 | - } |
|
| 978 | - |
|
| 979 | - $modifier = preg_replace('/(\d)h$/i', '$1:00', $tester); |
|
| 980 | - |
|
| 981 | - /* @var CarbonInterface $max */ |
|
| 982 | - $median = static::parse('5555-06-15 12:30:30.555555')->modify($modifier); |
|
| 983 | - $current = $this->avoidMutation(); |
|
| 984 | - /* @var CarbonInterface $other */ |
|
| 985 | - $other = $this->avoidMutation()->modify($modifier); |
|
| 986 | - |
|
| 987 | - if ($current->eq($other)) { |
|
| 988 | - return true; |
|
| 989 | - } |
|
| 990 | - |
|
| 991 | - if (preg_match('/\d:\d{1,2}:\d{1,2}$/', $tester)) { |
|
| 992 | - return $current->startOfSecond()->eq($other); |
|
| 993 | - } |
|
| 994 | - |
|
| 995 | - if (preg_match('/\d:\d{1,2}$/', $tester)) { |
|
| 996 | - return $current->startOfMinute()->eq($other); |
|
| 997 | - } |
|
| 998 | - |
|
| 999 | - if (preg_match('/\d(h|am|pm)$/', $tester)) { |
|
| 1000 | - return $current->startOfHour()->eq($other); |
|
| 1001 | - } |
|
| 1002 | - |
|
| 1003 | - if (preg_match( |
|
| 1004 | - '/^(january|february|march|april|may|june|july|august|september|october|november|december)\s+\d+$/i', |
|
| 1005 | - $tester |
|
| 1006 | - )) { |
|
| 1007 | - return $current->startOfMonth()->eq($other->startOfMonth()); |
|
| 1008 | - } |
|
| 1009 | - |
|
| 1010 | - $units = [ |
|
| 1011 | - 'month' => [1, 'year'], |
|
| 1012 | - 'day' => [1, 'month'], |
|
| 1013 | - 'hour' => [0, 'day'], |
|
| 1014 | - 'minute' => [0, 'hour'], |
|
| 1015 | - 'second' => [0, 'minute'], |
|
| 1016 | - 'microsecond' => [0, 'second'], |
|
| 1017 | - ]; |
|
| 1018 | - |
|
| 1019 | - foreach ($units as $unit => [$minimum, $startUnit]) { |
|
| 1020 | - if ($minimum === $median->$unit) { |
|
| 1021 | - $current = $current->startOf($startUnit); |
|
| 1022 | - |
|
| 1023 | - break; |
|
| 1024 | - } |
|
| 1025 | - } |
|
| 1026 | - |
|
| 1027 | - return $current->eq($other); |
|
| 1028 | - } |
|
| 1029 | - |
|
| 1030 | - /** |
|
| 1031 | - * Checks if the (date)time string is in a given format with |
|
| 1032 | - * given list of pattern replacements. |
|
| 1033 | - * |
|
| 1034 | - * @example |
|
| 1035 | - * ``` |
|
| 1036 | - * Carbon::hasFormat('11:12:45', 'h:i:s'); // true |
|
| 1037 | - * Carbon::hasFormat('13:12:45', 'h:i:s'); // false |
|
| 1038 | - * ``` |
|
| 1039 | - * |
|
| 1040 | - * @param string $date |
|
| 1041 | - * @param string $format |
|
| 1042 | - * @param array $replacements |
|
| 1043 | - * |
|
| 1044 | - * @return bool |
|
| 1045 | - */ |
|
| 1046 | - private static function matchFormatPattern(string $date, string $format, array $replacements): bool |
|
| 1047 | - { |
|
| 1048 | - // Preg quote, but remove escaped backslashes since we'll deal with escaped characters in the format string. |
|
| 1049 | - $regex = str_replace('\\\\', '\\', $format); |
|
| 1050 | - // Replace not-escaped letters |
|
| 1051 | - $regex = preg_replace_callback( |
|
| 1052 | - '/(?<!\\\\)((?:\\\\{2})*)(['.implode('', array_keys($replacements)).'])/', |
|
| 1053 | - function ($match) use ($replacements) { |
|
| 1054 | - return $match[1].strtr($match[2], $replacements); |
|
| 1055 | - }, |
|
| 1056 | - $regex |
|
| 1057 | - ); |
|
| 1058 | - // Replace escaped letters by the letter itself |
|
| 1059 | - $regex = preg_replace('/(?<!\\\\)((?:\\\\{2})*)\\\\(\w)/', '$1$2', $regex); |
|
| 1060 | - // Escape not escaped slashes |
|
| 1061 | - $regex = preg_replace('#(?<!\\\\)((?:\\\\{2})*)/#', '$1\\/', $regex); |
|
| 1062 | - |
|
| 1063 | - return (bool) @preg_match('/^'.$regex.'$/', $date); |
|
| 1064 | - } |
|
| 1065 | - |
|
| 1066 | - /** |
|
| 1067 | - * Returns true if the date was created using CarbonImmutable::startOfTime() |
|
| 1068 | - * |
|
| 1069 | - * @return bool |
|
| 1070 | - */ |
|
| 1071 | - public function isStartOfTime(): bool |
|
| 1072 | - { |
|
| 1073 | - return $this->startOfTime ?? false; |
|
| 1074 | - } |
|
| 1075 | - |
|
| 1076 | - /** |
|
| 1077 | - * Returns true if the date was created using CarbonImmutable::endOfTime() |
|
| 1078 | - * |
|
| 1079 | - * @return bool |
|
| 1080 | - */ |
|
| 1081 | - public function isEndOfTime(): bool |
|
| 1082 | - { |
|
| 1083 | - return $this->endOfTime ?? false; |
|
| 1084 | - } |
|
| 1085 | - |
|
| 1086 | - private function discourageNull($value): void |
|
| 1087 | - { |
|
| 1088 | - if ($value === null) { |
|
| 1089 | - @trigger_error("Since 2.61.0, it's deprecated to compare a date to null, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate null values.", \E_USER_DEPRECATED); |
|
| 1090 | - } |
|
| 1091 | - } |
|
| 1092 | - |
|
| 1093 | - private function discourageBoolean($value): void |
|
| 1094 | - { |
|
| 1095 | - if (\is_bool($value)) { |
|
| 1096 | - @trigger_error("Since 2.61.0, it's deprecated to compare a date to true or false, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate boolean values.", \E_USER_DEPRECATED); |
|
| 1097 | - } |
|
| 1098 | - } |
|
| 35 | + /** @var bool */ |
|
| 36 | + protected $endOfTime = false; |
|
| 37 | + |
|
| 38 | + /** @var bool */ |
|
| 39 | + protected $startOfTime = false; |
|
| 40 | + |
|
| 41 | + /** |
|
| 42 | + * Determines if the instance is equal to another |
|
| 43 | + * |
|
| 44 | + * @example |
|
| 45 | + * ``` |
|
| 46 | + * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:16'); // true |
|
| 47 | + * Carbon::parse('2018-07-25 12:45:16')->eq(Carbon::parse('2018-07-25 12:45:16')); // true |
|
| 48 | + * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:17'); // false |
|
| 49 | + * ``` |
|
| 50 | + * |
|
| 51 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 52 | + * |
|
| 53 | + * @see equalTo() |
|
| 54 | + * |
|
| 55 | + * @return bool |
|
| 56 | + */ |
|
| 57 | + public function eq($date): bool |
|
| 58 | + { |
|
| 59 | + return $this->equalTo($date); |
|
| 60 | + } |
|
| 61 | + |
|
| 62 | + /** |
|
| 63 | + * Determines if the instance is equal to another |
|
| 64 | + * |
|
| 65 | + * @example |
|
| 66 | + * ``` |
|
| 67 | + * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:16'); // true |
|
| 68 | + * Carbon::parse('2018-07-25 12:45:16')->equalTo(Carbon::parse('2018-07-25 12:45:16')); // true |
|
| 69 | + * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:17'); // false |
|
| 70 | + * ``` |
|
| 71 | + * |
|
| 72 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 73 | + * |
|
| 74 | + * @return bool |
|
| 75 | + */ |
|
| 76 | + public function equalTo($date): bool |
|
| 77 | + { |
|
| 78 | + $this->discourageNull($date); |
|
| 79 | + $this->discourageBoolean($date); |
|
| 80 | + |
|
| 81 | + return $this == $this->resolveCarbon($date); |
|
| 82 | + } |
|
| 83 | + |
|
| 84 | + /** |
|
| 85 | + * Determines if the instance is not equal to another |
|
| 86 | + * |
|
| 87 | + * @example |
|
| 88 | + * ``` |
|
| 89 | + * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:16'); // false |
|
| 90 | + * Carbon::parse('2018-07-25 12:45:16')->ne(Carbon::parse('2018-07-25 12:45:16')); // false |
|
| 91 | + * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:17'); // true |
|
| 92 | + * ``` |
|
| 93 | + * |
|
| 94 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 95 | + * |
|
| 96 | + * @see notEqualTo() |
|
| 97 | + * |
|
| 98 | + * @return bool |
|
| 99 | + */ |
|
| 100 | + public function ne($date): bool |
|
| 101 | + { |
|
| 102 | + return $this->notEqualTo($date); |
|
| 103 | + } |
|
| 104 | + |
|
| 105 | + /** |
|
| 106 | + * Determines if the instance is not equal to another |
|
| 107 | + * |
|
| 108 | + * @example |
|
| 109 | + * ``` |
|
| 110 | + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:16'); // false |
|
| 111 | + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo(Carbon::parse('2018-07-25 12:45:16')); // false |
|
| 112 | + * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:17'); // true |
|
| 113 | + * ``` |
|
| 114 | + * |
|
| 115 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 116 | + * |
|
| 117 | + * @return bool |
|
| 118 | + */ |
|
| 119 | + public function notEqualTo($date): bool |
|
| 120 | + { |
|
| 121 | + return !$this->equalTo($date); |
|
| 122 | + } |
|
| 123 | + |
|
| 124 | + /** |
|
| 125 | + * Determines if the instance is greater (after) than another |
|
| 126 | + * |
|
| 127 | + * @example |
|
| 128 | + * ``` |
|
| 129 | + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:15'); // true |
|
| 130 | + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:16'); // false |
|
| 131 | + * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:17'); // false |
|
| 132 | + * ``` |
|
| 133 | + * |
|
| 134 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 135 | + * |
|
| 136 | + * @see greaterThan() |
|
| 137 | + * |
|
| 138 | + * @return bool |
|
| 139 | + */ |
|
| 140 | + public function gt($date): bool |
|
| 141 | + { |
|
| 142 | + return $this->greaterThan($date); |
|
| 143 | + } |
|
| 144 | + |
|
| 145 | + /** |
|
| 146 | + * Determines if the instance is greater (after) than another |
|
| 147 | + * |
|
| 148 | + * @example |
|
| 149 | + * ``` |
|
| 150 | + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:15'); // true |
|
| 151 | + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:16'); // false |
|
| 152 | + * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:17'); // false |
|
| 153 | + * ``` |
|
| 154 | + * |
|
| 155 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 156 | + * |
|
| 157 | + * @return bool |
|
| 158 | + */ |
|
| 159 | + public function greaterThan($date): bool |
|
| 160 | + { |
|
| 161 | + $this->discourageNull($date); |
|
| 162 | + $this->discourageBoolean($date); |
|
| 163 | + |
|
| 164 | + return $this > $this->resolveCarbon($date); |
|
| 165 | + } |
|
| 166 | + |
|
| 167 | + /** |
|
| 168 | + * Determines if the instance is greater (after) than another |
|
| 169 | + * |
|
| 170 | + * @example |
|
| 171 | + * ``` |
|
| 172 | + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:15'); // true |
|
| 173 | + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:16'); // false |
|
| 174 | + * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:17'); // false |
|
| 175 | + * ``` |
|
| 176 | + * |
|
| 177 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 178 | + * |
|
| 179 | + * @see greaterThan() |
|
| 180 | + * |
|
| 181 | + * @return bool |
|
| 182 | + */ |
|
| 183 | + public function isAfter($date): bool |
|
| 184 | + { |
|
| 185 | + return $this->greaterThan($date); |
|
| 186 | + } |
|
| 187 | + |
|
| 188 | + /** |
|
| 189 | + * Determines if the instance is greater (after) than or equal to another |
|
| 190 | + * |
|
| 191 | + * @example |
|
| 192 | + * ``` |
|
| 193 | + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:15'); // true |
|
| 194 | + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:16'); // true |
|
| 195 | + * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:17'); // false |
|
| 196 | + * ``` |
|
| 197 | + * |
|
| 198 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 199 | + * |
|
| 200 | + * @see greaterThanOrEqualTo() |
|
| 201 | + * |
|
| 202 | + * @return bool |
|
| 203 | + */ |
|
| 204 | + public function gte($date): bool |
|
| 205 | + { |
|
| 206 | + return $this->greaterThanOrEqualTo($date); |
|
| 207 | + } |
|
| 208 | + |
|
| 209 | + /** |
|
| 210 | + * Determines if the instance is greater (after) than or equal to another |
|
| 211 | + * |
|
| 212 | + * @example |
|
| 213 | + * ``` |
|
| 214 | + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:15'); // true |
|
| 215 | + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:16'); // true |
|
| 216 | + * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:17'); // false |
|
| 217 | + * ``` |
|
| 218 | + * |
|
| 219 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 220 | + * |
|
| 221 | + * @return bool |
|
| 222 | + */ |
|
| 223 | + public function greaterThanOrEqualTo($date): bool |
|
| 224 | + { |
|
| 225 | + $this->discourageNull($date); |
|
| 226 | + $this->discourageBoolean($date); |
|
| 227 | + |
|
| 228 | + return $this >= $this->resolveCarbon($date); |
|
| 229 | + } |
|
| 230 | + |
|
| 231 | + /** |
|
| 232 | + * Determines if the instance is less (before) than another |
|
| 233 | + * |
|
| 234 | + * @example |
|
| 235 | + * ``` |
|
| 236 | + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:15'); // false |
|
| 237 | + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:16'); // false |
|
| 238 | + * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:17'); // true |
|
| 239 | + * ``` |
|
| 240 | + * |
|
| 241 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 242 | + * |
|
| 243 | + * @see lessThan() |
|
| 244 | + * |
|
| 245 | + * @return bool |
|
| 246 | + */ |
|
| 247 | + public function lt($date): bool |
|
| 248 | + { |
|
| 249 | + return $this->lessThan($date); |
|
| 250 | + } |
|
| 251 | + |
|
| 252 | + /** |
|
| 253 | + * Determines if the instance is less (before) than another |
|
| 254 | + * |
|
| 255 | + * @example |
|
| 256 | + * ``` |
|
| 257 | + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:15'); // false |
|
| 258 | + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:16'); // false |
|
| 259 | + * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:17'); // true |
|
| 260 | + * ``` |
|
| 261 | + * |
|
| 262 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 263 | + * |
|
| 264 | + * @return bool |
|
| 265 | + */ |
|
| 266 | + public function lessThan($date): bool |
|
| 267 | + { |
|
| 268 | + $this->discourageNull($date); |
|
| 269 | + $this->discourageBoolean($date); |
|
| 270 | + |
|
| 271 | + return $this < $this->resolveCarbon($date); |
|
| 272 | + } |
|
| 273 | + |
|
| 274 | + /** |
|
| 275 | + * Determines if the instance is less (before) than another |
|
| 276 | + * |
|
| 277 | + * @example |
|
| 278 | + * ``` |
|
| 279 | + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:15'); // false |
|
| 280 | + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:16'); // false |
|
| 281 | + * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:17'); // true |
|
| 282 | + * ``` |
|
| 283 | + * |
|
| 284 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 285 | + * |
|
| 286 | + * @see lessThan() |
|
| 287 | + * |
|
| 288 | + * @return bool |
|
| 289 | + */ |
|
| 290 | + public function isBefore($date): bool |
|
| 291 | + { |
|
| 292 | + return $this->lessThan($date); |
|
| 293 | + } |
|
| 294 | + |
|
| 295 | + /** |
|
| 296 | + * Determines if the instance is less (before) or equal to another |
|
| 297 | + * |
|
| 298 | + * @example |
|
| 299 | + * ``` |
|
| 300 | + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:15'); // false |
|
| 301 | + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:16'); // true |
|
| 302 | + * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:17'); // true |
|
| 303 | + * ``` |
|
| 304 | + * |
|
| 305 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 306 | + * |
|
| 307 | + * @see lessThanOrEqualTo() |
|
| 308 | + * |
|
| 309 | + * @return bool |
|
| 310 | + */ |
|
| 311 | + public function lte($date): bool |
|
| 312 | + { |
|
| 313 | + return $this->lessThanOrEqualTo($date); |
|
| 314 | + } |
|
| 315 | + |
|
| 316 | + /** |
|
| 317 | + * Determines if the instance is less (before) or equal to another |
|
| 318 | + * |
|
| 319 | + * @example |
|
| 320 | + * ``` |
|
| 321 | + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:15'); // false |
|
| 322 | + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:16'); // true |
|
| 323 | + * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:17'); // true |
|
| 324 | + * ``` |
|
| 325 | + * |
|
| 326 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date |
|
| 327 | + * |
|
| 328 | + * @return bool |
|
| 329 | + */ |
|
| 330 | + public function lessThanOrEqualTo($date): bool |
|
| 331 | + { |
|
| 332 | + $this->discourageNull($date); |
|
| 333 | + $this->discourageBoolean($date); |
|
| 334 | + |
|
| 335 | + return $this <= $this->resolveCarbon($date); |
|
| 336 | + } |
|
| 337 | + |
|
| 338 | + /** |
|
| 339 | + * Determines if the instance is between two others. |
|
| 340 | + * |
|
| 341 | + * The third argument allow you to specify if bounds are included or not (true by default) |
|
| 342 | + * but for when you including/excluding bounds may produce different results in your application, |
|
| 343 | + * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. |
|
| 344 | + * |
|
| 345 | + * @example |
|
| 346 | + * ``` |
|
| 347 | + * Carbon::parse('2018-07-25')->between('2018-07-14', '2018-08-01'); // true |
|
| 348 | + * Carbon::parse('2018-07-25')->between('2018-08-01', '2018-08-20'); // false |
|
| 349 | + * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01'); // true |
|
| 350 | + * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01', false); // false |
|
| 351 | + * ``` |
|
| 352 | + * |
|
| 353 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 |
|
| 354 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 |
|
| 355 | + * @param bool $equal Indicates if an equal to comparison should be done |
|
| 356 | + * |
|
| 357 | + * @return bool |
|
| 358 | + */ |
|
| 359 | + public function between($date1, $date2, $equal = true): bool |
|
| 360 | + { |
|
| 361 | + $date1 = $this->resolveCarbon($date1); |
|
| 362 | + $date2 = $this->resolveCarbon($date2); |
|
| 363 | + |
|
| 364 | + if ($date1->greaterThan($date2)) { |
|
| 365 | + [$date1, $date2] = [$date2, $date1]; |
|
| 366 | + } |
|
| 367 | + |
|
| 368 | + if ($equal) { |
|
| 369 | + return $this >= $date1 && $this <= $date2; |
|
| 370 | + } |
|
| 371 | + |
|
| 372 | + return $this > $date1 && $this < $date2; |
|
| 373 | + } |
|
| 374 | + |
|
| 375 | + /** |
|
| 376 | + * Determines if the instance is between two others, bounds included. |
|
| 377 | + * |
|
| 378 | + * @example |
|
| 379 | + * ``` |
|
| 380 | + * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-14', '2018-08-01'); // true |
|
| 381 | + * Carbon::parse('2018-07-25')->betweenIncluded('2018-08-01', '2018-08-20'); // false |
|
| 382 | + * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-25', '2018-08-01'); // true |
|
| 383 | + * ``` |
|
| 384 | + * |
|
| 385 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 |
|
| 386 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 |
|
| 387 | + * |
|
| 388 | + * @return bool |
|
| 389 | + */ |
|
| 390 | + public function betweenIncluded($date1, $date2): bool |
|
| 391 | + { |
|
| 392 | + return $this->between($date1, $date2, true); |
|
| 393 | + } |
|
| 394 | + |
|
| 395 | + /** |
|
| 396 | + * Determines if the instance is between two others, bounds excluded. |
|
| 397 | + * |
|
| 398 | + * @example |
|
| 399 | + * ``` |
|
| 400 | + * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-14', '2018-08-01'); // true |
|
| 401 | + * Carbon::parse('2018-07-25')->betweenExcluded('2018-08-01', '2018-08-20'); // false |
|
| 402 | + * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-25', '2018-08-01'); // false |
|
| 403 | + * ``` |
|
| 404 | + * |
|
| 405 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 |
|
| 406 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 |
|
| 407 | + * |
|
| 408 | + * @return bool |
|
| 409 | + */ |
|
| 410 | + public function betweenExcluded($date1, $date2): bool |
|
| 411 | + { |
|
| 412 | + return $this->between($date1, $date2, false); |
|
| 413 | + } |
|
| 414 | + |
|
| 415 | + /** |
|
| 416 | + * Determines if the instance is between two others |
|
| 417 | + * |
|
| 418 | + * @example |
|
| 419 | + * ``` |
|
| 420 | + * Carbon::parse('2018-07-25')->isBetween('2018-07-14', '2018-08-01'); // true |
|
| 421 | + * Carbon::parse('2018-07-25')->isBetween('2018-08-01', '2018-08-20'); // false |
|
| 422 | + * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01'); // true |
|
| 423 | + * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01', false); // false |
|
| 424 | + * ``` |
|
| 425 | + * |
|
| 426 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 |
|
| 427 | + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 |
|
| 428 | + * @param bool $equal Indicates if an equal to comparison should be done |
|
| 429 | + * |
|
| 430 | + * @return bool |
|
| 431 | + */ |
|
| 432 | + public function isBetween($date1, $date2, $equal = true): bool |
|
| 433 | + { |
|
| 434 | + return $this->between($date1, $date2, $equal); |
|
| 435 | + } |
|
| 436 | + |
|
| 437 | + /** |
|
| 438 | + * Determines if the instance is a weekday. |
|
| 439 | + * |
|
| 440 | + * @example |
|
| 441 | + * ``` |
|
| 442 | + * Carbon::parse('2019-07-14')->isWeekday(); // false |
|
| 443 | + * Carbon::parse('2019-07-15')->isWeekday(); // true |
|
| 444 | + * ``` |
|
| 445 | + * |
|
| 446 | + * @return bool |
|
| 447 | + */ |
|
| 448 | + public function isWeekday() |
|
| 449 | + { |
|
| 450 | + return !$this->isWeekend(); |
|
| 451 | + } |
|
| 452 | + |
|
| 453 | + /** |
|
| 454 | + * Determines if the instance is a weekend day. |
|
| 455 | + * |
|
| 456 | + * @example |
|
| 457 | + * ``` |
|
| 458 | + * Carbon::parse('2019-07-14')->isWeekend(); // true |
|
| 459 | + * Carbon::parse('2019-07-15')->isWeekend(); // false |
|
| 460 | + * ``` |
|
| 461 | + * |
|
| 462 | + * @return bool |
|
| 463 | + */ |
|
| 464 | + public function isWeekend() |
|
| 465 | + { |
|
| 466 | + return \in_array($this->dayOfWeek, static::$weekendDays, true); |
|
| 467 | + } |
|
| 468 | + |
|
| 469 | + /** |
|
| 470 | + * Determines if the instance is yesterday. |
|
| 471 | + * |
|
| 472 | + * @example |
|
| 473 | + * ``` |
|
| 474 | + * Carbon::yesterday()->isYesterday(); // true |
|
| 475 | + * Carbon::tomorrow()->isYesterday(); // false |
|
| 476 | + * ``` |
|
| 477 | + * |
|
| 478 | + * @return bool |
|
| 479 | + */ |
|
| 480 | + public function isYesterday() |
|
| 481 | + { |
|
| 482 | + return $this->toDateString() === static::yesterday($this->getTimezone())->toDateString(); |
|
| 483 | + } |
|
| 484 | + |
|
| 485 | + /** |
|
| 486 | + * Determines if the instance is today. |
|
| 487 | + * |
|
| 488 | + * @example |
|
| 489 | + * ``` |
|
| 490 | + * Carbon::today()->isToday(); // true |
|
| 491 | + * Carbon::tomorrow()->isToday(); // false |
|
| 492 | + * ``` |
|
| 493 | + * |
|
| 494 | + * @return bool |
|
| 495 | + */ |
|
| 496 | + public function isToday() |
|
| 497 | + { |
|
| 498 | + return $this->toDateString() === $this->nowWithSameTz()->toDateString(); |
|
| 499 | + } |
|
| 500 | + |
|
| 501 | + /** |
|
| 502 | + * Determines if the instance is tomorrow. |
|
| 503 | + * |
|
| 504 | + * @example |
|
| 505 | + * ``` |
|
| 506 | + * Carbon::tomorrow()->isTomorrow(); // true |
|
| 507 | + * Carbon::yesterday()->isTomorrow(); // false |
|
| 508 | + * ``` |
|
| 509 | + * |
|
| 510 | + * @return bool |
|
| 511 | + */ |
|
| 512 | + public function isTomorrow() |
|
| 513 | + { |
|
| 514 | + return $this->toDateString() === static::tomorrow($this->getTimezone())->toDateString(); |
|
| 515 | + } |
|
| 516 | + |
|
| 517 | + /** |
|
| 518 | + * Determines if the instance is in the future, ie. greater (after) than now. |
|
| 519 | + * |
|
| 520 | + * @example |
|
| 521 | + * ``` |
|
| 522 | + * Carbon::now()->addHours(5)->isFuture(); // true |
|
| 523 | + * Carbon::now()->subHours(5)->isFuture(); // false |
|
| 524 | + * ``` |
|
| 525 | + * |
|
| 526 | + * @return bool |
|
| 527 | + */ |
|
| 528 | + public function isFuture() |
|
| 529 | + { |
|
| 530 | + return $this->greaterThan($this->nowWithSameTz()); |
|
| 531 | + } |
|
| 532 | + |
|
| 533 | + /** |
|
| 534 | + * Determines if the instance is in the past, ie. less (before) than now. |
|
| 535 | + * |
|
| 536 | + * @example |
|
| 537 | + * ``` |
|
| 538 | + * Carbon::now()->subHours(5)->isPast(); // true |
|
| 539 | + * Carbon::now()->addHours(5)->isPast(); // false |
|
| 540 | + * ``` |
|
| 541 | + * |
|
| 542 | + * @return bool |
|
| 543 | + */ |
|
| 544 | + public function isPast() |
|
| 545 | + { |
|
| 546 | + return $this->lessThan($this->nowWithSameTz()); |
|
| 547 | + } |
|
| 548 | + |
|
| 549 | + /** |
|
| 550 | + * Determines if the instance is a leap year. |
|
| 551 | + * |
|
| 552 | + * @example |
|
| 553 | + * ``` |
|
| 554 | + * Carbon::parse('2020-01-01')->isLeapYear(); // true |
|
| 555 | + * Carbon::parse('2019-01-01')->isLeapYear(); // false |
|
| 556 | + * ``` |
|
| 557 | + * |
|
| 558 | + * @return bool |
|
| 559 | + */ |
|
| 560 | + public function isLeapYear() |
|
| 561 | + { |
|
| 562 | + return $this->rawFormat('L') === '1'; |
|
| 563 | + } |
|
| 564 | + |
|
| 565 | + /** |
|
| 566 | + * Determines if the instance is a long year |
|
| 567 | + * |
|
| 568 | + * @example |
|
| 569 | + * ``` |
|
| 570 | + * Carbon::parse('2015-01-01')->isLongYear(); // true |
|
| 571 | + * Carbon::parse('2016-01-01')->isLongYear(); // false |
|
| 572 | + * ``` |
|
| 573 | + * |
|
| 574 | + * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates |
|
| 575 | + * |
|
| 576 | + * @return bool |
|
| 577 | + */ |
|
| 578 | + public function isLongYear() |
|
| 579 | + { |
|
| 580 | + return static::create($this->year, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; |
|
| 581 | + } |
|
| 582 | + |
|
| 583 | + /** |
|
| 584 | + * Compares the formatted values of the two dates. |
|
| 585 | + * |
|
| 586 | + * @example |
|
| 587 | + * ``` |
|
| 588 | + * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-12-13')); // true |
|
| 589 | + * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-06-14')); // false |
|
| 590 | + * ``` |
|
| 591 | + * |
|
| 592 | + * @param string $format date formats to compare. |
|
| 593 | + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date instance to compare with or null to use current day. |
|
| 594 | + * |
|
| 595 | + * @return bool |
|
| 596 | + */ |
|
| 597 | + public function isSameAs($format, $date = null) |
|
| 598 | + { |
|
| 599 | + return $this->rawFormat($format) === $this->resolveCarbon($date)->rawFormat($format); |
|
| 600 | + } |
|
| 601 | + |
|
| 602 | + /** |
|
| 603 | + * Determines if the instance is in the current unit given. |
|
| 604 | + * |
|
| 605 | + * @example |
|
| 606 | + * ``` |
|
| 607 | + * Carbon::parse('2019-01-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // true |
|
| 608 | + * Carbon::parse('2018-12-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // false |
|
| 609 | + * ``` |
|
| 610 | + * |
|
| 611 | + * @param string $unit singular unit string |
|
| 612 | + * @param \Carbon\Carbon|\DateTimeInterface|null $date instance to compare with or null to use current day. |
|
| 613 | + * |
|
| 614 | + * @throws BadComparisonUnitException |
|
| 615 | + * |
|
| 616 | + * @return bool |
|
| 617 | + */ |
|
| 618 | + public function isSameUnit($unit, $date = null) |
|
| 619 | + { |
|
| 620 | + $units = [ |
|
| 621 | + // @call isSameUnit |
|
| 622 | + 'year' => 'Y', |
|
| 623 | + // @call isSameUnit |
|
| 624 | + 'week' => 'o-W', |
|
| 625 | + // @call isSameUnit |
|
| 626 | + 'day' => 'Y-m-d', |
|
| 627 | + // @call isSameUnit |
|
| 628 | + 'hour' => 'Y-m-d H', |
|
| 629 | + // @call isSameUnit |
|
| 630 | + 'minute' => 'Y-m-d H:i', |
|
| 631 | + // @call isSameUnit |
|
| 632 | + 'second' => 'Y-m-d H:i:s', |
|
| 633 | + // @call isSameUnit |
|
| 634 | + 'micro' => 'Y-m-d H:i:s.u', |
|
| 635 | + // @call isSameUnit |
|
| 636 | + 'microsecond' => 'Y-m-d H:i:s.u', |
|
| 637 | + ]; |
|
| 638 | + |
|
| 639 | + if (isset($units[$unit])) { |
|
| 640 | + return $this->isSameAs($units[$unit], $date); |
|
| 641 | + } |
|
| 642 | + |
|
| 643 | + if (isset($this->$unit)) { |
|
| 644 | + return $this->resolveCarbon($date)->$unit === $this->$unit; |
|
| 645 | + } |
|
| 646 | + |
|
| 647 | + if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { |
|
| 648 | + throw new BadComparisonUnitException($unit); |
|
| 649 | + } |
|
| 650 | + |
|
| 651 | + return false; |
|
| 652 | + } |
|
| 653 | + |
|
| 654 | + /** |
|
| 655 | + * Determines if the instance is in the current unit given. |
|
| 656 | + * |
|
| 657 | + * @example |
|
| 658 | + * ``` |
|
| 659 | + * Carbon::now()->isCurrentUnit('hour'); // true |
|
| 660 | + * Carbon::now()->subHours(2)->isCurrentUnit('hour'); // false |
|
| 661 | + * ``` |
|
| 662 | + * |
|
| 663 | + * @param string $unit The unit to test. |
|
| 664 | + * |
|
| 665 | + * @throws BadMethodCallException |
|
| 666 | + * |
|
| 667 | + * @return bool |
|
| 668 | + */ |
|
| 669 | + public function isCurrentUnit($unit) |
|
| 670 | + { |
|
| 671 | + return $this->{'isSame'.ucfirst($unit)}(); |
|
| 672 | + } |
|
| 673 | + |
|
| 674 | + /** |
|
| 675 | + * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). |
|
| 676 | + * |
|
| 677 | + * @example |
|
| 678 | + * ``` |
|
| 679 | + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-03-01')); // true |
|
| 680 | + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-04-01')); // false |
|
| 681 | + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01')); // false |
|
| 682 | + * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01'), false); // true |
|
| 683 | + * ``` |
|
| 684 | + * |
|
| 685 | + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date The instance to compare with or null to use current day. |
|
| 686 | + * @param bool $ofSameYear Check if it is the same month in the same year. |
|
| 687 | + * |
|
| 688 | + * @return bool |
|
| 689 | + */ |
|
| 690 | + public function isSameQuarter($date = null, $ofSameYear = true) |
|
| 691 | + { |
|
| 692 | + $date = $this->resolveCarbon($date); |
|
| 693 | + |
|
| 694 | + return $this->quarter === $date->quarter && (!$ofSameYear || $this->isSameYear($date)); |
|
| 695 | + } |
|
| 696 | + |
|
| 697 | + /** |
|
| 698 | + * Checks if the passed in date is in the same month as the instance´s month. |
|
| 699 | + * |
|
| 700 | + * @example |
|
| 701 | + * ``` |
|
| 702 | + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-01-01')); // true |
|
| 703 | + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-02-01')); // false |
|
| 704 | + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01')); // false |
|
| 705 | + * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01'), false); // true |
|
| 706 | + * ``` |
|
| 707 | + * |
|
| 708 | + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. |
|
| 709 | + * @param bool $ofSameYear Check if it is the same month in the same year. |
|
| 710 | + * |
|
| 711 | + * @return bool |
|
| 712 | + */ |
|
| 713 | + public function isSameMonth($date = null, $ofSameYear = true) |
|
| 714 | + { |
|
| 715 | + return $this->isSameAs($ofSameYear ? 'Y-m' : 'm', $date); |
|
| 716 | + } |
|
| 717 | + |
|
| 718 | + /** |
|
| 719 | + * Checks if this day is a specific day of the week. |
|
| 720 | + * |
|
| 721 | + * @example |
|
| 722 | + * ``` |
|
| 723 | + * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::WEDNESDAY); // true |
|
| 724 | + * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::FRIDAY); // false |
|
| 725 | + * Carbon::parse('2019-07-17')->isDayOfWeek('Wednesday'); // true |
|
| 726 | + * Carbon::parse('2019-07-17')->isDayOfWeek('Friday'); // false |
|
| 727 | + * ``` |
|
| 728 | + * |
|
| 729 | + * @param int $dayOfWeek |
|
| 730 | + * |
|
| 731 | + * @return bool |
|
| 732 | + */ |
|
| 733 | + public function isDayOfWeek($dayOfWeek) |
|
| 734 | + { |
|
| 735 | + if (\is_string($dayOfWeek) && \defined($constant = static::class.'::'.strtoupper($dayOfWeek))) { |
|
| 736 | + $dayOfWeek = \constant($constant); |
|
| 737 | + } |
|
| 738 | + |
|
| 739 | + return $this->dayOfWeek === $dayOfWeek; |
|
| 740 | + } |
|
| 741 | + |
|
| 742 | + /** |
|
| 743 | + * Check if its the birthday. Compares the date/month values of the two dates. |
|
| 744 | + * |
|
| 745 | + * @example |
|
| 746 | + * ``` |
|
| 747 | + * Carbon::now()->subYears(5)->isBirthday(); // true |
|
| 748 | + * Carbon::now()->subYears(5)->subDay()->isBirthday(); // false |
|
| 749 | + * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-05')); // true |
|
| 750 | + * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-06')); // false |
|
| 751 | + * ``` |
|
| 752 | + * |
|
| 753 | + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. |
|
| 754 | + * |
|
| 755 | + * @return bool |
|
| 756 | + */ |
|
| 757 | + public function isBirthday($date = null) |
|
| 758 | + { |
|
| 759 | + return $this->isSameAs('md', $date); |
|
| 760 | + } |
|
| 761 | + |
|
| 762 | + /** |
|
| 763 | + * Check if today is the last day of the Month |
|
| 764 | + * |
|
| 765 | + * @example |
|
| 766 | + * ``` |
|
| 767 | + * Carbon::parse('2019-02-28')->isLastOfMonth(); // true |
|
| 768 | + * Carbon::parse('2019-03-28')->isLastOfMonth(); // false |
|
| 769 | + * Carbon::parse('2019-03-30')->isLastOfMonth(); // false |
|
| 770 | + * Carbon::parse('2019-03-31')->isLastOfMonth(); // true |
|
| 771 | + * Carbon::parse('2019-04-30')->isLastOfMonth(); // true |
|
| 772 | + * ``` |
|
| 773 | + * |
|
| 774 | + * @return bool |
|
| 775 | + */ |
|
| 776 | + public function isLastOfMonth() |
|
| 777 | + { |
|
| 778 | + return $this->day === $this->daysInMonth; |
|
| 779 | + } |
|
| 780 | + |
|
| 781 | + /** |
|
| 782 | + * Check if the instance is start of day / midnight. |
|
| 783 | + * |
|
| 784 | + * @example |
|
| 785 | + * ``` |
|
| 786 | + * Carbon::parse('2019-02-28 00:00:00')->isStartOfDay(); // true |
|
| 787 | + * Carbon::parse('2019-02-28 00:00:00.999999')->isStartOfDay(); // true |
|
| 788 | + * Carbon::parse('2019-02-28 00:00:01')->isStartOfDay(); // false |
|
| 789 | + * Carbon::parse('2019-02-28 00:00:00.000000')->isStartOfDay(true); // true |
|
| 790 | + * Carbon::parse('2019-02-28 00:00:00.000012')->isStartOfDay(true); // false |
|
| 791 | + * ``` |
|
| 792 | + * |
|
| 793 | + * @param bool $checkMicroseconds check time at microseconds precision |
|
| 794 | + * |
|
| 795 | + * @return bool |
|
| 796 | + */ |
|
| 797 | + public function isStartOfDay($checkMicroseconds = false) |
|
| 798 | + { |
|
| 799 | + /* @var CarbonInterface $this */ |
|
| 800 | + return $checkMicroseconds |
|
| 801 | + ? $this->rawFormat('H:i:s.u') === '00:00:00.000000' |
|
| 802 | + : $this->rawFormat('H:i:s') === '00:00:00'; |
|
| 803 | + } |
|
| 804 | + |
|
| 805 | + /** |
|
| 806 | + * Check if the instance is end of day. |
|
| 807 | + * |
|
| 808 | + * @example |
|
| 809 | + * ``` |
|
| 810 | + * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(); // true |
|
| 811 | + * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(); // true |
|
| 812 | + * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(); // true |
|
| 813 | + * Carbon::parse('2019-02-28 23:59:58.999999')->isEndOfDay(); // false |
|
| 814 | + * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(true); // true |
|
| 815 | + * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(true); // false |
|
| 816 | + * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(true); // false |
|
| 817 | + * ``` |
|
| 818 | + * |
|
| 819 | + * @param bool $checkMicroseconds check time at microseconds precision |
|
| 820 | + * |
|
| 821 | + * @return bool |
|
| 822 | + */ |
|
| 823 | + public function isEndOfDay($checkMicroseconds = false) |
|
| 824 | + { |
|
| 825 | + /* @var CarbonInterface $this */ |
|
| 826 | + return $checkMicroseconds |
|
| 827 | + ? $this->rawFormat('H:i:s.u') === '23:59:59.999999' |
|
| 828 | + : $this->rawFormat('H:i:s') === '23:59:59'; |
|
| 829 | + } |
|
| 830 | + |
|
| 831 | + /** |
|
| 832 | + * Check if the instance is start of day / midnight. |
|
| 833 | + * |
|
| 834 | + * @example |
|
| 835 | + * ``` |
|
| 836 | + * Carbon::parse('2019-02-28 00:00:00')->isMidnight(); // true |
|
| 837 | + * Carbon::parse('2019-02-28 00:00:00.999999')->isMidnight(); // true |
|
| 838 | + * Carbon::parse('2019-02-28 00:00:01')->isMidnight(); // false |
|
| 839 | + * ``` |
|
| 840 | + * |
|
| 841 | + * @return bool |
|
| 842 | + */ |
|
| 843 | + public function isMidnight() |
|
| 844 | + { |
|
| 845 | + return $this->isStartOfDay(); |
|
| 846 | + } |
|
| 847 | + |
|
| 848 | + /** |
|
| 849 | + * Check if the instance is midday. |
|
| 850 | + * |
|
| 851 | + * @example |
|
| 852 | + * ``` |
|
| 853 | + * Carbon::parse('2019-02-28 11:59:59.999999')->isMidday(); // false |
|
| 854 | + * Carbon::parse('2019-02-28 12:00:00')->isMidday(); // true |
|
| 855 | + * Carbon::parse('2019-02-28 12:00:00.999999')->isMidday(); // true |
|
| 856 | + * Carbon::parse('2019-02-28 12:00:01')->isMidday(); // false |
|
| 857 | + * ``` |
|
| 858 | + * |
|
| 859 | + * @return bool |
|
| 860 | + */ |
|
| 861 | + public function isMidday() |
|
| 862 | + { |
|
| 863 | + /* @var CarbonInterface $this */ |
|
| 864 | + return $this->rawFormat('G:i:s') === static::$midDayAt.':00:00'; |
|
| 865 | + } |
|
| 866 | + |
|
| 867 | + /** |
|
| 868 | + * Checks if the (date)time string is in a given format. |
|
| 869 | + * |
|
| 870 | + * @example |
|
| 871 | + * ``` |
|
| 872 | + * Carbon::hasFormat('11:12:45', 'h:i:s'); // true |
|
| 873 | + * Carbon::hasFormat('13:12:45', 'h:i:s'); // false |
|
| 874 | + * ``` |
|
| 875 | + * |
|
| 876 | + * @param string $date |
|
| 877 | + * @param string $format |
|
| 878 | + * |
|
| 879 | + * @return bool |
|
| 880 | + */ |
|
| 881 | + public static function hasFormat($date, $format) |
|
| 882 | + { |
|
| 883 | + // createFromFormat() is known to handle edge cases silently. |
|
| 884 | + // E.g. "1975-5-1" (Y-n-j) will still be parsed correctly when "Y-m-d" is supplied as the format. |
|
| 885 | + // To ensure we're really testing against our desired format, perform an additional regex validation. |
|
| 886 | + |
|
| 887 | + return self::matchFormatPattern((string) $date, preg_quote((string) $format, '/'), static::$regexFormats); |
|
| 888 | + } |
|
| 889 | + |
|
| 890 | + /** |
|
| 891 | + * Checks if the (date)time string is in a given format. |
|
| 892 | + * |
|
| 893 | + * @example |
|
| 894 | + * ``` |
|
| 895 | + * Carbon::hasFormatWithModifiers('31/08/2015', 'd#m#Y'); // true |
|
| 896 | + * Carbon::hasFormatWithModifiers('31/08/2015', 'm#d#Y'); // false |
|
| 897 | + * ``` |
|
| 898 | + * |
|
| 899 | + * @param string $date |
|
| 900 | + * @param string $format |
|
| 901 | + * |
|
| 902 | + * @return bool |
|
| 903 | + */ |
|
| 904 | + public static function hasFormatWithModifiers($date, $format): bool |
|
| 905 | + { |
|
| 906 | + return self::matchFormatPattern((string) $date, (string) $format, array_merge(static::$regexFormats, static::$regexFormatModifiers)); |
|
| 907 | + } |
|
| 908 | + |
|
| 909 | + /** |
|
| 910 | + * Checks if the (date)time string is in a given format and valid to create a |
|
| 911 | + * new instance. |
|
| 912 | + * |
|
| 913 | + * @example |
|
| 914 | + * ``` |
|
| 915 | + * Carbon::canBeCreatedFromFormat('11:12:45', 'h:i:s'); // true |
|
| 916 | + * Carbon::canBeCreatedFromFormat('13:12:45', 'h:i:s'); // false |
|
| 917 | + * ``` |
|
| 918 | + * |
|
| 919 | + * @param string $date |
|
| 920 | + * @param string $format |
|
| 921 | + * |
|
| 922 | + * @return bool |
|
| 923 | + */ |
|
| 924 | + public static function canBeCreatedFromFormat($date, $format) |
|
| 925 | + { |
|
| 926 | + try { |
|
| 927 | + // Try to create a DateTime object. Throws an InvalidArgumentException if the provided time string |
|
| 928 | + // doesn't match the format in any way. |
|
| 929 | + if (!static::rawCreateFromFormat($format, $date)) { |
|
| 930 | + return false; |
|
| 931 | + } |
|
| 932 | + } catch (InvalidArgumentException $e) { |
|
| 933 | + return false; |
|
| 934 | + } |
|
| 935 | + |
|
| 936 | + return static::hasFormatWithModifiers($date, $format); |
|
| 937 | + } |
|
| 938 | + |
|
| 939 | + /** |
|
| 940 | + * Returns true if the current date matches the given string. |
|
| 941 | + * |
|
| 942 | + * @example |
|
| 943 | + * ``` |
|
| 944 | + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019')); // true |
|
| 945 | + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2018')); // false |
|
| 946 | + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06')); // true |
|
| 947 | + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('06-02')); // true |
|
| 948 | + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06-02')); // true |
|
| 949 | + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('Sunday')); // true |
|
| 950 | + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('June')); // true |
|
| 951 | + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23')); // true |
|
| 952 | + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:45')); // true |
|
| 953 | + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:00')); // false |
|
| 954 | + * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12h')); // true |
|
| 955 | + * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3pm')); // true |
|
| 956 | + * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3am')); // false |
|
| 957 | + * ``` |
|
| 958 | + * |
|
| 959 | + * @param string $tester day name, month name, hour, date, etc. as string |
|
| 960 | + * |
|
| 961 | + * @return bool |
|
| 962 | + */ |
|
| 963 | + public function is(string $tester) |
|
| 964 | + { |
|
| 965 | + $tester = trim($tester); |
|
| 966 | + |
|
| 967 | + if (preg_match('/^\d+$/', $tester)) { |
|
| 968 | + return $this->year === (int) $tester; |
|
| 969 | + } |
|
| 970 | + |
|
| 971 | + if (preg_match('/^\d{3,}-\d{1,2}$/', $tester)) { |
|
| 972 | + return $this->isSameMonth(static::parse($tester)); |
|
| 973 | + } |
|
| 974 | + |
|
| 975 | + if (preg_match('/^\d{1,2}-\d{1,2}$/', $tester)) { |
|
| 976 | + return $this->isSameDay(static::parse($this->year.'-'.$tester)); |
|
| 977 | + } |
|
| 978 | + |
|
| 979 | + $modifier = preg_replace('/(\d)h$/i', '$1:00', $tester); |
|
| 980 | + |
|
| 981 | + /* @var CarbonInterface $max */ |
|
| 982 | + $median = static::parse('5555-06-15 12:30:30.555555')->modify($modifier); |
|
| 983 | + $current = $this->avoidMutation(); |
|
| 984 | + /* @var CarbonInterface $other */ |
|
| 985 | + $other = $this->avoidMutation()->modify($modifier); |
|
| 986 | + |
|
| 987 | + if ($current->eq($other)) { |
|
| 988 | + return true; |
|
| 989 | + } |
|
| 990 | + |
|
| 991 | + if (preg_match('/\d:\d{1,2}:\d{1,2}$/', $tester)) { |
|
| 992 | + return $current->startOfSecond()->eq($other); |
|
| 993 | + } |
|
| 994 | + |
|
| 995 | + if (preg_match('/\d:\d{1,2}$/', $tester)) { |
|
| 996 | + return $current->startOfMinute()->eq($other); |
|
| 997 | + } |
|
| 998 | + |
|
| 999 | + if (preg_match('/\d(h|am|pm)$/', $tester)) { |
|
| 1000 | + return $current->startOfHour()->eq($other); |
|
| 1001 | + } |
|
| 1002 | + |
|
| 1003 | + if (preg_match( |
|
| 1004 | + '/^(january|february|march|april|may|june|july|august|september|october|november|december)\s+\d+$/i', |
|
| 1005 | + $tester |
|
| 1006 | + )) { |
|
| 1007 | + return $current->startOfMonth()->eq($other->startOfMonth()); |
|
| 1008 | + } |
|
| 1009 | + |
|
| 1010 | + $units = [ |
|
| 1011 | + 'month' => [1, 'year'], |
|
| 1012 | + 'day' => [1, 'month'], |
|
| 1013 | + 'hour' => [0, 'day'], |
|
| 1014 | + 'minute' => [0, 'hour'], |
|
| 1015 | + 'second' => [0, 'minute'], |
|
| 1016 | + 'microsecond' => [0, 'second'], |
|
| 1017 | + ]; |
|
| 1018 | + |
|
| 1019 | + foreach ($units as $unit => [$minimum, $startUnit]) { |
|
| 1020 | + if ($minimum === $median->$unit) { |
|
| 1021 | + $current = $current->startOf($startUnit); |
|
| 1022 | + |
|
| 1023 | + break; |
|
| 1024 | + } |
|
| 1025 | + } |
|
| 1026 | + |
|
| 1027 | + return $current->eq($other); |
|
| 1028 | + } |
|
| 1029 | + |
|
| 1030 | + /** |
|
| 1031 | + * Checks if the (date)time string is in a given format with |
|
| 1032 | + * given list of pattern replacements. |
|
| 1033 | + * |
|
| 1034 | + * @example |
|
| 1035 | + * ``` |
|
| 1036 | + * Carbon::hasFormat('11:12:45', 'h:i:s'); // true |
|
| 1037 | + * Carbon::hasFormat('13:12:45', 'h:i:s'); // false |
|
| 1038 | + * ``` |
|
| 1039 | + * |
|
| 1040 | + * @param string $date |
|
| 1041 | + * @param string $format |
|
| 1042 | + * @param array $replacements |
|
| 1043 | + * |
|
| 1044 | + * @return bool |
|
| 1045 | + */ |
|
| 1046 | + private static function matchFormatPattern(string $date, string $format, array $replacements): bool |
|
| 1047 | + { |
|
| 1048 | + // Preg quote, but remove escaped backslashes since we'll deal with escaped characters in the format string. |
|
| 1049 | + $regex = str_replace('\\\\', '\\', $format); |
|
| 1050 | + // Replace not-escaped letters |
|
| 1051 | + $regex = preg_replace_callback( |
|
| 1052 | + '/(?<!\\\\)((?:\\\\{2})*)(['.implode('', array_keys($replacements)).'])/', |
|
| 1053 | + function ($match) use ($replacements) { |
|
| 1054 | + return $match[1].strtr($match[2], $replacements); |
|
| 1055 | + }, |
|
| 1056 | + $regex |
|
| 1057 | + ); |
|
| 1058 | + // Replace escaped letters by the letter itself |
|
| 1059 | + $regex = preg_replace('/(?<!\\\\)((?:\\\\{2})*)\\\\(\w)/', '$1$2', $regex); |
|
| 1060 | + // Escape not escaped slashes |
|
| 1061 | + $regex = preg_replace('#(?<!\\\\)((?:\\\\{2})*)/#', '$1\\/', $regex); |
|
| 1062 | + |
|
| 1063 | + return (bool) @preg_match('/^'.$regex.'$/', $date); |
|
| 1064 | + } |
|
| 1065 | + |
|
| 1066 | + /** |
|
| 1067 | + * Returns true if the date was created using CarbonImmutable::startOfTime() |
|
| 1068 | + * |
|
| 1069 | + * @return bool |
|
| 1070 | + */ |
|
| 1071 | + public function isStartOfTime(): bool |
|
| 1072 | + { |
|
| 1073 | + return $this->startOfTime ?? false; |
|
| 1074 | + } |
|
| 1075 | + |
|
| 1076 | + /** |
|
| 1077 | + * Returns true if the date was created using CarbonImmutable::endOfTime() |
|
| 1078 | + * |
|
| 1079 | + * @return bool |
|
| 1080 | + */ |
|
| 1081 | + public function isEndOfTime(): bool |
|
| 1082 | + { |
|
| 1083 | + return $this->endOfTime ?? false; |
|
| 1084 | + } |
|
| 1085 | + |
|
| 1086 | + private function discourageNull($value): void |
|
| 1087 | + { |
|
| 1088 | + if ($value === null) { |
|
| 1089 | + @trigger_error("Since 2.61.0, it's deprecated to compare a date to null, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate null values.", \E_USER_DEPRECATED); |
|
| 1090 | + } |
|
| 1091 | + } |
|
| 1092 | + |
|
| 1093 | + private function discourageBoolean($value): void |
|
| 1094 | + { |
|
| 1095 | + if (\is_bool($value)) { |
|
| 1096 | + @trigger_error("Since 2.61.0, it's deprecated to compare a date to true or false, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate boolean values.", \E_USER_DEPRECATED); |
|
| 1097 | + } |
|
| 1098 | + } |
|
| 1099 | 1099 | } |
@@ -1050,7 +1050,7 @@ |
||
| 1050 | 1050 | // Replace not-escaped letters |
| 1051 | 1051 | $regex = preg_replace_callback( |
| 1052 | 1052 | '/(?<!\\\\)((?:\\\\{2})*)(['.implode('', array_keys($replacements)).'])/', |
| 1053 | - function ($match) use ($replacements) { |
|
| 1053 | + function($match) use ($replacements) { |
|
| 1054 | 1054 | return $match[1].strtr($match[2], $replacements); |
| 1055 | 1055 | }, |
| 1056 | 1056 | $regex |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | $defaults = null; |
| 376 | - $getDefault = function ($unit) use ($tz, &$defaults) { |
|
| 376 | + $getDefault = function($unit) use ($tz, &$defaults) { |
|
| 377 | 377 | if ($defaults === null) { |
| 378 | 378 | $now = self::createNowInstance($tz); |
| 379 | 379 | |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | */ |
| 722 | 722 | public static function createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) |
| 723 | 723 | { |
| 724 | - $format = preg_replace_callback('/(?<!\\\\)(\\\\{2})*(LTS|LT|[Ll]{1,4})/', function ($match) use ($locale, $translator) { |
|
| 724 | + $format = preg_replace_callback('/(?<!\\\\)(\\\\{2})*(LTS|LT|[Ll]{1,4})/', function($match) use ($locale, $translator) { |
|
| 725 | 725 | [$code] = $match; |
| 726 | 726 | |
| 727 | 727 | static $formats = null; |
@@ -741,14 +741,14 @@ discard block |
||
| 741 | 741 | |
| 742 | 742 | return $formats[$code] ?? preg_replace_callback( |
| 743 | 743 | '/MMMM|MM|DD|dddd/', |
| 744 | - function ($code) { |
|
| 744 | + function($code) { |
|
| 745 | 745 | return mb_substr($code[0], 1); |
| 746 | 746 | }, |
| 747 | 747 | $formats[strtoupper($code)] ?? '' |
| 748 | 748 | ); |
| 749 | 749 | }, $format); |
| 750 | 750 | |
| 751 | - $format = preg_replace_callback('/(?<!\\\\)(\\\\{2})*('.CarbonInterface::ISO_FORMAT_REGEXP.'|[A-Za-z])/', function ($match) { |
|
| 751 | + $format = preg_replace_callback('/(?<!\\\\)(\\\\{2})*('.CarbonInterface::ISO_FORMAT_REGEXP.'|[A-Za-z])/', function($match) { |
|
| 752 | 752 | [$code] = $match; |
| 753 | 753 | |
| 754 | 754 | static $replacements = null; |
@@ -839,7 +839,7 @@ |
||
| 839 | 839 | $format = $replacements[$code] ?? '?'; |
| 840 | 840 | |
| 841 | 841 | if ($format === '!') { |
| 842 | - throw new InvalidFormatException("Format $code not supported for creation."); |
|
| 842 | + throw new InvalidFormatException("format $code not supported for creation."); |
|
| 843 | 843 | } |
| 844 | 844 | |
| 845 | 845 | return $format; |
@@ -35,912 +35,912 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | trait Creator |
| 37 | 37 | { |
| 38 | - use ObjectInitialisation; |
|
| 39 | - |
|
| 40 | - /** |
|
| 41 | - * The errors that can occur. |
|
| 42 | - * |
|
| 43 | - * @var array |
|
| 44 | - */ |
|
| 45 | - protected static $lastErrors; |
|
| 46 | - |
|
| 47 | - /** |
|
| 48 | - * Create a new Carbon instance. |
|
| 49 | - * |
|
| 50 | - * Please see the testing aids section (specifically static::setTestNow()) |
|
| 51 | - * for more on the possibility of this constructor returning a test instance. |
|
| 52 | - * |
|
| 53 | - * @param DateTimeInterface|string|null $time |
|
| 54 | - * @param DateTimeZone|string|null $tz |
|
| 55 | - * |
|
| 56 | - * @throws InvalidFormatException |
|
| 57 | - */ |
|
| 58 | - public function __construct($time = null, $tz = null) |
|
| 59 | - { |
|
| 60 | - if ($time instanceof DateTimeInterface) { |
|
| 61 | - $time = $this->constructTimezoneFromDateTime($time, $tz)->format('Y-m-d H:i:s.u'); |
|
| 62 | - } |
|
| 63 | - |
|
| 64 | - if (is_numeric($time) && (!\is_string($time) || !preg_match('/^\d{1,14}$/', $time))) { |
|
| 65 | - $time = static::createFromTimestampUTC($time)->format('Y-m-d\TH:i:s.uP'); |
|
| 66 | - } |
|
| 67 | - |
|
| 68 | - // If the class has a test now set and we are trying to create a now() |
|
| 69 | - // instance then override as required |
|
| 70 | - $isNow = empty($time) || $time === 'now'; |
|
| 71 | - |
|
| 72 | - if (method_exists(static::class, 'hasTestNow') && |
|
| 73 | - method_exists(static::class, 'getTestNow') && |
|
| 74 | - static::hasTestNow() && |
|
| 75 | - ($isNow || static::hasRelativeKeywords($time)) |
|
| 76 | - ) { |
|
| 77 | - static::mockConstructorParameters($time, $tz); |
|
| 78 | - } |
|
| 79 | - |
|
| 80 | - // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127 |
|
| 81 | - if (!str_contains((string) .1, '.')) { |
|
| 82 | - $locale = setlocale(LC_NUMERIC, '0'); // @codeCoverageIgnore |
|
| 83 | - setlocale(LC_NUMERIC, 'C'); // @codeCoverageIgnore |
|
| 84 | - } |
|
| 85 | - |
|
| 86 | - try { |
|
| 87 | - parent::__construct($time ?: 'now', static::safeCreateDateTimeZone($tz) ?: null); |
|
| 88 | - } catch (Exception $exception) { |
|
| 89 | - throw new InvalidFormatException($exception->getMessage(), 0, $exception); |
|
| 90 | - } |
|
| 91 | - |
|
| 92 | - $this->constructedObjectId = spl_object_hash($this); |
|
| 93 | - |
|
| 94 | - if (isset($locale)) { |
|
| 95 | - setlocale(LC_NUMERIC, $locale); // @codeCoverageIgnore |
|
| 96 | - } |
|
| 97 | - |
|
| 98 | - // @CHANGE |
|
| 99 | - if (parent::getLastErrors()) { |
|
| 100 | - self::setLastErrors(parent::getLastErrors()); |
|
| 101 | - } |
|
| 102 | - } |
|
| 103 | - |
|
| 104 | - /** |
|
| 105 | - * Get timezone from a datetime instance. |
|
| 106 | - * |
|
| 107 | - * @param DateTimeInterface $date |
|
| 108 | - * @param DateTimeZone|string|null $tz |
|
| 109 | - * |
|
| 110 | - * @return DateTimeInterface |
|
| 111 | - */ |
|
| 112 | - private function constructTimezoneFromDateTime(DateTimeInterface $date, &$tz) |
|
| 113 | - { |
|
| 114 | - if ($tz !== null) { |
|
| 115 | - $safeTz = static::safeCreateDateTimeZone($tz); |
|
| 116 | - |
|
| 117 | - if ($safeTz) { |
|
| 118 | - return $date->setTimezone($safeTz); |
|
| 119 | - } |
|
| 120 | - |
|
| 121 | - return $date; |
|
| 122 | - } |
|
| 123 | - |
|
| 124 | - $tz = $date->getTimezone(); |
|
| 125 | - |
|
| 126 | - return $date; |
|
| 127 | - } |
|
| 128 | - |
|
| 129 | - /** |
|
| 130 | - * Update constructedObjectId on cloned. |
|
| 131 | - */ |
|
| 132 | - public function __clone() |
|
| 133 | - { |
|
| 134 | - $this->constructedObjectId = spl_object_hash($this); |
|
| 135 | - } |
|
| 136 | - |
|
| 137 | - /** |
|
| 138 | - * Create a Carbon instance from a DateTime one. |
|
| 139 | - * |
|
| 140 | - * @param DateTimeInterface $date |
|
| 141 | - * |
|
| 142 | - * @return static |
|
| 143 | - */ |
|
| 144 | - public static function instance($date) |
|
| 145 | - { |
|
| 146 | - if ($date instanceof static) { |
|
| 147 | - return clone $date; |
|
| 148 | - } |
|
| 149 | - |
|
| 150 | - static::expectDateTime($date); |
|
| 151 | - |
|
| 152 | - $instance = new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); |
|
| 153 | - |
|
| 154 | - if ($date instanceof CarbonInterface) { |
|
| 155 | - $settings = $date->getSettings(); |
|
| 156 | - |
|
| 157 | - if (!$date->hasLocalTranslator()) { |
|
| 158 | - unset($settings['locale']); |
|
| 159 | - } |
|
| 160 | - |
|
| 161 | - $instance->settings($settings); |
|
| 162 | - } |
|
| 163 | - |
|
| 164 | - return $instance; |
|
| 165 | - } |
|
| 166 | - |
|
| 167 | - /** |
|
| 168 | - * Create a carbon instance from a string. |
|
| 169 | - * |
|
| 170 | - * This is an alias for the constructor that allows better fluent syntax |
|
| 171 | - * as it allows you to do Carbon::parse('Monday next week')->fn() rather |
|
| 172 | - * than (new Carbon('Monday next week'))->fn(). |
|
| 173 | - * |
|
| 174 | - * @param string|DateTimeInterface|null $time |
|
| 175 | - * @param DateTimeZone|string|null $tz |
|
| 176 | - * |
|
| 177 | - * @throws InvalidFormatException |
|
| 178 | - * |
|
| 179 | - * @return static |
|
| 180 | - */ |
|
| 181 | - public static function rawParse($time = null, $tz = null) |
|
| 182 | - { |
|
| 183 | - if ($time instanceof DateTimeInterface) { |
|
| 184 | - return static::instance($time); |
|
| 185 | - } |
|
| 186 | - |
|
| 187 | - try { |
|
| 188 | - return new static($time, $tz); |
|
| 189 | - } catch (Exception $exception) { |
|
| 190 | - $date = @static::now($tz)->change($time); |
|
| 191 | - |
|
| 192 | - if (!$date) { |
|
| 193 | - throw new InvalidFormatException("Could not parse '$time': ".$exception->getMessage(), 0, $exception); |
|
| 194 | - } |
|
| 195 | - |
|
| 196 | - return $date; |
|
| 197 | - } |
|
| 198 | - } |
|
| 199 | - |
|
| 200 | - /** |
|
| 201 | - * Create a carbon instance from a string. |
|
| 202 | - * |
|
| 203 | - * This is an alias for the constructor that allows better fluent syntax |
|
| 204 | - * as it allows you to do Carbon::parse('Monday next week')->fn() rather |
|
| 205 | - * than (new Carbon('Monday next week'))->fn(). |
|
| 206 | - * |
|
| 207 | - * @param string|DateTimeInterface|null $time |
|
| 208 | - * @param DateTimeZone|string|null $tz |
|
| 209 | - * |
|
| 210 | - * @throws InvalidFormatException |
|
| 211 | - * |
|
| 212 | - * @return static |
|
| 213 | - */ |
|
| 214 | - public static function parse($time = null, $tz = null) |
|
| 215 | - { |
|
| 216 | - $function = static::$parseFunction; |
|
| 217 | - |
|
| 218 | - if (!$function) { |
|
| 219 | - return static::rawParse($time, $tz); |
|
| 220 | - } |
|
| 221 | - |
|
| 222 | - if (\is_string($function) && method_exists(static::class, $function)) { |
|
| 223 | - $function = [static::class, $function]; |
|
| 224 | - } |
|
| 225 | - |
|
| 226 | - return $function(...\func_get_args()); |
|
| 227 | - } |
|
| 228 | - |
|
| 229 | - /** |
|
| 230 | - * Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). |
|
| 231 | - * |
|
| 232 | - * @param string $time date/time string in the given language (may also contain English). |
|
| 233 | - * @param string|null $locale if locale is null or not specified, current global locale will be |
|
| 234 | - * used instead. |
|
| 235 | - * @param DateTimeZone|string|null $tz optional timezone for the new instance. |
|
| 236 | - * |
|
| 237 | - * @throws InvalidFormatException |
|
| 238 | - * |
|
| 239 | - * @return static |
|
| 240 | - */ |
|
| 241 | - public static function parseFromLocale($time, $locale = null, $tz = null) |
|
| 242 | - { |
|
| 243 | - return static::rawParse(static::translateTimeString($time, $locale, 'en'), $tz); |
|
| 244 | - } |
|
| 245 | - |
|
| 246 | - /** |
|
| 247 | - * Get a Carbon instance for the current date and time. |
|
| 248 | - * |
|
| 249 | - * @param DateTimeZone|string|null $tz |
|
| 250 | - * |
|
| 251 | - * @return static |
|
| 252 | - */ |
|
| 253 | - public static function now($tz = null) |
|
| 254 | - { |
|
| 255 | - return new static(null, $tz); |
|
| 256 | - } |
|
| 257 | - |
|
| 258 | - /** |
|
| 259 | - * Create a Carbon instance for today. |
|
| 260 | - * |
|
| 261 | - * @param DateTimeZone|string|null $tz |
|
| 262 | - * |
|
| 263 | - * @return static |
|
| 264 | - */ |
|
| 265 | - public static function today($tz = null) |
|
| 266 | - { |
|
| 267 | - return static::rawParse('today', $tz); |
|
| 268 | - } |
|
| 269 | - |
|
| 270 | - /** |
|
| 271 | - * Create a Carbon instance for tomorrow. |
|
| 272 | - * |
|
| 273 | - * @param DateTimeZone|string|null $tz |
|
| 274 | - * |
|
| 275 | - * @return static |
|
| 276 | - */ |
|
| 277 | - public static function tomorrow($tz = null) |
|
| 278 | - { |
|
| 279 | - return static::rawParse('tomorrow', $tz); |
|
| 280 | - } |
|
| 281 | - |
|
| 282 | - /** |
|
| 283 | - * Create a Carbon instance for yesterday. |
|
| 284 | - * |
|
| 285 | - * @param DateTimeZone|string|null $tz |
|
| 286 | - * |
|
| 287 | - * @return static |
|
| 288 | - */ |
|
| 289 | - public static function yesterday($tz = null) |
|
| 290 | - { |
|
| 291 | - return static::rawParse('yesterday', $tz); |
|
| 292 | - } |
|
| 293 | - |
|
| 294 | - /** |
|
| 295 | - * Create a Carbon instance for the greatest supported date. |
|
| 296 | - * |
|
| 297 | - * @return static |
|
| 298 | - */ |
|
| 299 | - public static function maxValue() |
|
| 300 | - { |
|
| 301 | - if (self::$PHPIntSize === 4) { |
|
| 302 | - // 32 bit |
|
| 303 | - return static::createFromTimestamp(PHP_INT_MAX); // @codeCoverageIgnore |
|
| 304 | - } |
|
| 305 | - |
|
| 306 | - // 64 bit |
|
| 307 | - return static::create(9999, 12, 31, 23, 59, 59); |
|
| 308 | - } |
|
| 309 | - |
|
| 310 | - /** |
|
| 311 | - * Create a Carbon instance for the lowest supported date. |
|
| 312 | - * |
|
| 313 | - * @return static |
|
| 314 | - */ |
|
| 315 | - public static function minValue() |
|
| 316 | - { |
|
| 317 | - if (self::$PHPIntSize === 4) { |
|
| 318 | - // 32 bit |
|
| 319 | - return static::createFromTimestamp(~PHP_INT_MAX); // @codeCoverageIgnore |
|
| 320 | - } |
|
| 321 | - |
|
| 322 | - // 64 bit |
|
| 323 | - return static::create(1, 1, 1, 0, 0, 0); |
|
| 324 | - } |
|
| 325 | - |
|
| 326 | - private static function assertBetween($unit, $value, $min, $max) |
|
| 327 | - { |
|
| 328 | - if (static::isStrictModeEnabled() && ($value < $min || $value > $max)) { |
|
| 329 | - throw new OutOfRangeException($unit, $min, $max, $value); |
|
| 330 | - } |
|
| 331 | - } |
|
| 332 | - |
|
| 333 | - private static function createNowInstance($tz) |
|
| 334 | - { |
|
| 335 | - if (!static::hasTestNow()) { |
|
| 336 | - return static::now($tz); |
|
| 337 | - } |
|
| 338 | - |
|
| 339 | - $now = static::getTestNow(); |
|
| 340 | - |
|
| 341 | - if ($now instanceof Closure) { |
|
| 342 | - return $now(static::now($tz)); |
|
| 343 | - } |
|
| 344 | - |
|
| 345 | - return $now->avoidMutation()->tz($tz); |
|
| 346 | - } |
|
| 347 | - |
|
| 348 | - /** |
|
| 349 | - * Create a new Carbon instance from a specific date and time. |
|
| 350 | - * |
|
| 351 | - * If any of $year, $month or $day are set to null their now() values will |
|
| 352 | - * be used. |
|
| 353 | - * |
|
| 354 | - * If $hour is null it will be set to its now() value and the default |
|
| 355 | - * values for $minute and $second will be their now() values. |
|
| 356 | - * |
|
| 357 | - * If $hour is not null then the default values for $minute and $second |
|
| 358 | - * will be 0. |
|
| 359 | - * |
|
| 360 | - * @param int|null $year |
|
| 361 | - * @param int|null $month |
|
| 362 | - * @param int|null $day |
|
| 363 | - * @param int|null $hour |
|
| 364 | - * @param int|null $minute |
|
| 365 | - * @param int|null $second |
|
| 366 | - * @param DateTimeZone|string|null $tz |
|
| 367 | - * |
|
| 368 | - * @throws InvalidFormatException |
|
| 369 | - * |
|
| 370 | - * @return static|false |
|
| 371 | - */ |
|
| 372 | - public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) |
|
| 373 | - { |
|
| 374 | - if ((\is_string($year) && !is_numeric($year)) || $year instanceof DateTimeInterface) { |
|
| 375 | - return static::parse($year, $tz ?: (\is_string($month) || $month instanceof DateTimeZone ? $month : null)); |
|
| 376 | - } |
|
| 377 | - |
|
| 378 | - $defaults = null; |
|
| 379 | - $getDefault = function ($unit) use ($tz, &$defaults) { |
|
| 380 | - if ($defaults === null) { |
|
| 381 | - $now = self::createNowInstance($tz); |
|
| 382 | - |
|
| 383 | - $defaults = array_combine([ |
|
| 384 | - 'year', |
|
| 385 | - 'month', |
|
| 386 | - 'day', |
|
| 387 | - 'hour', |
|
| 388 | - 'minute', |
|
| 389 | - 'second', |
|
| 390 | - ], explode('-', $now->rawFormat('Y-n-j-G-i-s.u'))); |
|
| 391 | - } |
|
| 392 | - |
|
| 393 | - return $defaults[$unit]; |
|
| 394 | - }; |
|
| 395 | - |
|
| 396 | - $year = $year ?? $getDefault('year'); |
|
| 397 | - $month = $month ?? $getDefault('month'); |
|
| 398 | - $day = $day ?? $getDefault('day'); |
|
| 399 | - $hour = $hour ?? $getDefault('hour'); |
|
| 400 | - $minute = $minute ?? $getDefault('minute'); |
|
| 401 | - $second = (float) ($second ?? $getDefault('second')); |
|
| 402 | - |
|
| 403 | - self::assertBetween('month', $month, 0, 99); |
|
| 404 | - self::assertBetween('day', $day, 0, 99); |
|
| 405 | - self::assertBetween('hour', $hour, 0, 99); |
|
| 406 | - self::assertBetween('minute', $minute, 0, 99); |
|
| 407 | - self::assertBetween('second', $second, 0, 99); |
|
| 408 | - |
|
| 409 | - $fixYear = null; |
|
| 410 | - |
|
| 411 | - if ($year < 0) { |
|
| 412 | - $fixYear = $year; |
|
| 413 | - $year = 0; |
|
| 414 | - } elseif ($year > 9999) { |
|
| 415 | - $fixYear = $year - 9999; |
|
| 416 | - $year = 9999; |
|
| 417 | - } |
|
| 418 | - |
|
| 419 | - $second = ($second < 10 ? '0' : '').number_format($second, 6); |
|
| 420 | - $instance = static::rawCreateFromFormat('!Y-n-j G:i:s.u', sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); |
|
| 421 | - |
|
| 422 | - if ($fixYear !== null) { |
|
| 423 | - $instance = $instance->addYears($fixYear); |
|
| 424 | - } |
|
| 425 | - |
|
| 426 | - return $instance; |
|
| 427 | - } |
|
| 428 | - |
|
| 429 | - /** |
|
| 430 | - * Create a new safe Carbon instance from a specific date and time. |
|
| 431 | - * |
|
| 432 | - * If any of $year, $month or $day are set to null their now() values will |
|
| 433 | - * be used. |
|
| 434 | - * |
|
| 435 | - * If $hour is null it will be set to its now() value and the default |
|
| 436 | - * values for $minute and $second will be their now() values. |
|
| 437 | - * |
|
| 438 | - * If $hour is not null then the default values for $minute and $second |
|
| 439 | - * will be 0. |
|
| 440 | - * |
|
| 441 | - * If one of the set values is not valid, an InvalidDateException |
|
| 442 | - * will be thrown. |
|
| 443 | - * |
|
| 444 | - * @param int|null $year |
|
| 445 | - * @param int|null $month |
|
| 446 | - * @param int|null $day |
|
| 447 | - * @param int|null $hour |
|
| 448 | - * @param int|null $minute |
|
| 449 | - * @param int|null $second |
|
| 450 | - * @param DateTimeZone|string|null $tz |
|
| 451 | - * |
|
| 452 | - * @throws InvalidDateException |
|
| 453 | - * |
|
| 454 | - * @return static|false |
|
| 455 | - */ |
|
| 456 | - public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) |
|
| 457 | - { |
|
| 458 | - $fields = static::getRangesByUnit(); |
|
| 459 | - |
|
| 460 | - foreach ($fields as $field => $range) { |
|
| 461 | - if ($$field !== null && (!\is_int($$field) || $$field < $range[0] || $$field > $range[1])) { |
|
| 462 | - if (static::isStrictModeEnabled()) { |
|
| 463 | - throw new InvalidDateException($field, $$field); |
|
| 464 | - } |
|
| 465 | - |
|
| 466 | - return false; |
|
| 467 | - } |
|
| 468 | - } |
|
| 469 | - |
|
| 470 | - $instance = static::create($year, $month, $day, $hour, $minute, $second, $tz); |
|
| 471 | - |
|
| 472 | - foreach (array_reverse($fields) as $field => $range) { |
|
| 473 | - if ($$field !== null && (!\is_int($$field) || $$field !== $instance->$field)) { |
|
| 474 | - if (static::isStrictModeEnabled()) { |
|
| 475 | - throw new InvalidDateException($field, $$field); |
|
| 476 | - } |
|
| 477 | - |
|
| 478 | - return false; |
|
| 479 | - } |
|
| 480 | - } |
|
| 481 | - |
|
| 482 | - return $instance; |
|
| 483 | - } |
|
| 484 | - |
|
| 485 | - /** |
|
| 486 | - * Create a new Carbon instance from a specific date and time using strict validation. |
|
| 487 | - * |
|
| 488 | - * @see create() |
|
| 489 | - * |
|
| 490 | - * @param int|null $year |
|
| 491 | - * @param int|null $month |
|
| 492 | - * @param int|null $day |
|
| 493 | - * @param int|null $hour |
|
| 494 | - * @param int|null $minute |
|
| 495 | - * @param int|null $second |
|
| 496 | - * @param DateTimeZone|string|null $tz |
|
| 497 | - * |
|
| 498 | - * @throws InvalidFormatException |
|
| 499 | - * |
|
| 500 | - * @return static |
|
| 501 | - */ |
|
| 502 | - public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null): self |
|
| 503 | - { |
|
| 504 | - $initialStrictMode = static::isStrictModeEnabled(); |
|
| 505 | - static::useStrictMode(true); |
|
| 506 | - |
|
| 507 | - try { |
|
| 508 | - $date = static::create($year, $month, $day, $hour, $minute, $second, $tz); |
|
| 509 | - } finally { |
|
| 510 | - static::useStrictMode($initialStrictMode); |
|
| 511 | - } |
|
| 512 | - |
|
| 513 | - return $date; |
|
| 514 | - } |
|
| 515 | - |
|
| 516 | - /** |
|
| 517 | - * Create a Carbon instance from just a date. The time portion is set to now. |
|
| 518 | - * |
|
| 519 | - * @param int|null $year |
|
| 520 | - * @param int|null $month |
|
| 521 | - * @param int|null $day |
|
| 522 | - * @param DateTimeZone|string|null $tz |
|
| 523 | - * |
|
| 524 | - * @throws InvalidFormatException |
|
| 525 | - * |
|
| 526 | - * @return static |
|
| 527 | - */ |
|
| 528 | - public static function createFromDate($year = null, $month = null, $day = null, $tz = null) |
|
| 529 | - { |
|
| 530 | - return static::create($year, $month, $day, null, null, null, $tz); |
|
| 531 | - } |
|
| 532 | - |
|
| 533 | - /** |
|
| 534 | - * Create a Carbon instance from just a date. The time portion is set to midnight. |
|
| 535 | - * |
|
| 536 | - * @param int|null $year |
|
| 537 | - * @param int|null $month |
|
| 538 | - * @param int|null $day |
|
| 539 | - * @param DateTimeZone|string|null $tz |
|
| 540 | - * |
|
| 541 | - * @throws InvalidFormatException |
|
| 542 | - * |
|
| 543 | - * @return static |
|
| 544 | - */ |
|
| 545 | - public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null) |
|
| 546 | - { |
|
| 547 | - return static::create($year, $month, $day, 0, 0, 0, $tz); |
|
| 548 | - } |
|
| 549 | - |
|
| 550 | - /** |
|
| 551 | - * Create a Carbon instance from just a time. The date portion is set to today. |
|
| 552 | - * |
|
| 553 | - * @param int|null $hour |
|
| 554 | - * @param int|null $minute |
|
| 555 | - * @param int|null $second |
|
| 556 | - * @param DateTimeZone|string|null $tz |
|
| 557 | - * |
|
| 558 | - * @throws InvalidFormatException |
|
| 559 | - * |
|
| 560 | - * @return static |
|
| 561 | - */ |
|
| 562 | - public static function createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) |
|
| 563 | - { |
|
| 564 | - return static::create(null, null, null, $hour, $minute, $second, $tz); |
|
| 565 | - } |
|
| 566 | - |
|
| 567 | - /** |
|
| 568 | - * Create a Carbon instance from a time string. The date portion is set to today. |
|
| 569 | - * |
|
| 570 | - * @param string $time |
|
| 571 | - * @param DateTimeZone|string|null $tz |
|
| 572 | - * |
|
| 573 | - * @throws InvalidFormatException |
|
| 574 | - * |
|
| 575 | - * @return static |
|
| 576 | - */ |
|
| 577 | - public static function createFromTimeString($time, $tz = null) |
|
| 578 | - { |
|
| 579 | - return static::today($tz)->setTimeFromTimeString($time); |
|
| 580 | - } |
|
| 581 | - |
|
| 582 | - /** |
|
| 583 | - * @param string $format Datetime format |
|
| 584 | - * @param string $time |
|
| 585 | - * @param DateTimeZone|string|false|null $originalTz |
|
| 586 | - * |
|
| 587 | - * @return DateTimeInterface|false |
|
| 588 | - */ |
|
| 589 | - private static function createFromFormatAndTimezone($format, $time, $originalTz) |
|
| 590 | - { |
|
| 591 | - // Work-around for https://bugs.php.net/bug.php?id=75577 |
|
| 592 | - // @codeCoverageIgnoreStart |
|
| 593 | - if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { |
|
| 594 | - $format = str_replace('.v', '.u', $format); |
|
| 595 | - } |
|
| 596 | - // @codeCoverageIgnoreEnd |
|
| 597 | - |
|
| 598 | - if ($originalTz === null) { |
|
| 599 | - return parent::createFromFormat($format, (string) $time); |
|
| 600 | - } |
|
| 601 | - |
|
| 602 | - $tz = \is_int($originalTz) |
|
| 603 | - ? @timezone_name_from_abbr('', (int) ($originalTz * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE), 1) |
|
| 604 | - : $originalTz; |
|
| 605 | - |
|
| 606 | - $tz = static::safeCreateDateTimeZone($tz, $originalTz); |
|
| 607 | - |
|
| 608 | - if ($tz === false) { |
|
| 609 | - return false; |
|
| 610 | - } |
|
| 611 | - |
|
| 612 | - return parent::createFromFormat($format, (string) $time, $tz); |
|
| 613 | - } |
|
| 614 | - |
|
| 615 | - /** |
|
| 616 | - * Create a Carbon instance from a specific format. |
|
| 617 | - * |
|
| 618 | - * @param string $format Datetime format |
|
| 619 | - * @param string $time |
|
| 620 | - * @param DateTimeZone|string|false|null $tz |
|
| 621 | - * |
|
| 622 | - * @throws InvalidFormatException |
|
| 623 | - * |
|
| 624 | - * @return static|false |
|
| 625 | - */ |
|
| 626 | - public static function rawCreateFromFormat($format, $time, $tz = null) |
|
| 627 | - { |
|
| 628 | - // Work-around for https://bugs.php.net/bug.php?id=80141 |
|
| 629 | - $format = preg_replace('/(?<!\\\\)((?:\\\\{2})*)c/', '$1Y-m-d\TH:i:sP', $format); |
|
| 630 | - |
|
| 631 | - if (preg_match('/(?<!\\\\)(?:\\\\{2})*(a|A)/', $format, $aMatches, PREG_OFFSET_CAPTURE) && |
|
| 632 | - preg_match('/(?<!\\\\)(?:\\\\{2})*(h|g|H|G)/', $format, $hMatches, PREG_OFFSET_CAPTURE) && |
|
| 633 | - $aMatches[1][1] < $hMatches[1][1] && |
|
| 634 | - preg_match('/(am|pm|AM|PM)/', $time) |
|
| 635 | - ) { |
|
| 636 | - $format = preg_replace('/^(.*)(?<!\\\\)((?:\\\\{2})*)(a|A)(.*)$/U', '$1$2$4 $3', $format); |
|
| 637 | - $time = preg_replace('/^(.*)(am|pm|AM|PM)(.*)$/U', '$1$3 $2', $time); |
|
| 638 | - } |
|
| 639 | - |
|
| 640 | - // First attempt to create an instance, so that error messages are based on the unmodified format. |
|
| 641 | - $date = self::createFromFormatAndTimezone($format, $time, $tz); |
|
| 642 | - $lastErrors = parent::getLastErrors(); |
|
| 643 | - /** @var \Carbon\CarbonImmutable|\Carbon\Carbon|null $mock */ |
|
| 644 | - $mock = static::getMockedTestNow($tz); |
|
| 645 | - |
|
| 646 | - if ($mock && $date instanceof DateTimeInterface) { |
|
| 647 | - // Set timezone from mock if custom timezone was neither given directly nor as a part of format. |
|
| 648 | - // First let's skip the part that will be ignored by the parser. |
|
| 649 | - $nonEscaped = '(?<!\\\\)(\\\\{2})*'; |
|
| 650 | - |
|
| 651 | - $nonIgnored = preg_replace("/^.*{$nonEscaped}!/s", '', $format); |
|
| 652 | - |
|
| 653 | - if ($tz === null && !preg_match("/{$nonEscaped}[eOPT]/", $nonIgnored)) { |
|
| 654 | - $tz = clone $mock->getTimezone(); |
|
| 655 | - } |
|
| 656 | - |
|
| 657 | - // Set microseconds to zero to match behavior of DateTime::createFromFormat() |
|
| 658 | - // See https://bugs.php.net/bug.php?id=74332 |
|
| 659 | - $mock = $mock->copy()->microsecond(0); |
|
| 660 | - |
|
| 661 | - // Prepend mock datetime only if the format does not contain non escaped unix epoch reset flag. |
|
| 662 | - if (!preg_match("/{$nonEscaped}[!|]/", $format)) { |
|
| 663 | - $format = static::MOCK_DATETIME_FORMAT.' '.$format; |
|
| 664 | - $time = ($mock instanceof self ? $mock->rawFormat(static::MOCK_DATETIME_FORMAT) : $mock->format(static::MOCK_DATETIME_FORMAT)).' '.$time; |
|
| 665 | - } |
|
| 666 | - |
|
| 667 | - // Regenerate date from the modified format to base result on the mocked instance instead of now. |
|
| 668 | - $date = self::createFromFormatAndTimezone($format, $time, $tz); |
|
| 669 | - } |
|
| 670 | - |
|
| 671 | - if ($date instanceof DateTimeInterface) { |
|
| 672 | - $instance = static::instance($date); |
|
| 673 | - $instance::setLastErrors($lastErrors); |
|
| 674 | - |
|
| 675 | - return $instance; |
|
| 676 | - } |
|
| 677 | - |
|
| 678 | - if (static::isStrictModeEnabled()) { |
|
| 679 | - throw new InvalidFormatException(implode(PHP_EOL, $lastErrors['errors'])); |
|
| 680 | - } |
|
| 681 | - |
|
| 682 | - return false; |
|
| 683 | - } |
|
| 684 | - |
|
| 685 | - /** |
|
| 686 | - * Create a Carbon instance from a specific format. |
|
| 687 | - * |
|
| 688 | - * @param string $format Datetime format |
|
| 689 | - * @param string $time |
|
| 690 | - * @param DateTimeZone|string|false|null $tz |
|
| 691 | - * |
|
| 692 | - * @throws InvalidFormatException |
|
| 693 | - * |
|
| 694 | - * @return static|false |
|
| 695 | - */ |
|
| 696 | - #[ReturnTypeWillChange] |
|
| 697 | - public static function createFromFormat($format, $time, $tz = null) |
|
| 698 | - { |
|
| 699 | - $function = static::$createFromFormatFunction; |
|
| 700 | - |
|
| 701 | - if (!$function) { |
|
| 702 | - return static::rawCreateFromFormat($format, $time, $tz); |
|
| 703 | - } |
|
| 704 | - |
|
| 705 | - if (\is_string($function) && method_exists(static::class, $function)) { |
|
| 706 | - $function = [static::class, $function]; |
|
| 707 | - } |
|
| 708 | - |
|
| 709 | - return $function(...\func_get_args()); |
|
| 710 | - } |
|
| 711 | - |
|
| 712 | - /** |
|
| 713 | - * Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). |
|
| 714 | - * |
|
| 715 | - * @param string $format Datetime format |
|
| 716 | - * @param string $time |
|
| 717 | - * @param DateTimeZone|string|false|null $tz optional timezone |
|
| 718 | - * @param string|null $locale locale to be used for LTS, LT, LL, LLL, etc. macro-formats (en by fault, unneeded if no such macro-format in use) |
|
| 719 | - * @param \Symfony\Component\Translation\TranslatorInterface $translator optional custom translator to use for macro-formats |
|
| 720 | - * |
|
| 721 | - * @throws InvalidFormatException |
|
| 722 | - * |
|
| 723 | - * @return static|false |
|
| 724 | - */ |
|
| 725 | - public static function createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) |
|
| 726 | - { |
|
| 727 | - $format = preg_replace_callback('/(?<!\\\\)(\\\\{2})*(LTS|LT|[Ll]{1,4})/', function ($match) use ($locale, $translator) { |
|
| 728 | - [$code] = $match; |
|
| 729 | - |
|
| 730 | - static $formats = null; |
|
| 731 | - |
|
| 732 | - if ($formats === null) { |
|
| 733 | - $translator = $translator ?: Translator::get($locale); |
|
| 734 | - |
|
| 735 | - $formats = [ |
|
| 736 | - 'LT' => static::getTranslationMessageWith($translator, 'formats.LT', $locale, 'h:mm A'), |
|
| 737 | - 'LTS' => static::getTranslationMessageWith($translator, 'formats.LTS', $locale, 'h:mm:ss A'), |
|
| 738 | - 'L' => static::getTranslationMessageWith($translator, 'formats.L', $locale, 'MM/DD/YYYY'), |
|
| 739 | - 'LL' => static::getTranslationMessageWith($translator, 'formats.LL', $locale, 'MMMM D, YYYY'), |
|
| 740 | - 'LLL' => static::getTranslationMessageWith($translator, 'formats.LLL', $locale, 'MMMM D, YYYY h:mm A'), |
|
| 741 | - 'LLLL' => static::getTranslationMessageWith($translator, 'formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'), |
|
| 742 | - ]; |
|
| 743 | - } |
|
| 744 | - |
|
| 745 | - return $formats[$code] ?? preg_replace_callback( |
|
| 746 | - '/MMMM|MM|DD|dddd/', |
|
| 747 | - function ($code) { |
|
| 748 | - return mb_substr($code[0], 1); |
|
| 749 | - }, |
|
| 750 | - $formats[strtoupper($code)] ?? '' |
|
| 751 | - ); |
|
| 752 | - }, $format); |
|
| 753 | - |
|
| 754 | - $format = preg_replace_callback('/(?<!\\\\)(\\\\{2})*('.CarbonInterface::ISO_FORMAT_REGEXP.'|[A-Za-z])/', function ($match) { |
|
| 755 | - [$code] = $match; |
|
| 756 | - |
|
| 757 | - static $replacements = null; |
|
| 758 | - |
|
| 759 | - if ($replacements === null) { |
|
| 760 | - $replacements = [ |
|
| 761 | - 'OD' => 'd', |
|
| 762 | - 'OM' => 'M', |
|
| 763 | - 'OY' => 'Y', |
|
| 764 | - 'OH' => 'G', |
|
| 765 | - 'Oh' => 'g', |
|
| 766 | - 'Om' => 'i', |
|
| 767 | - 'Os' => 's', |
|
| 768 | - 'D' => 'd', |
|
| 769 | - 'DD' => 'd', |
|
| 770 | - 'Do' => 'd', |
|
| 771 | - 'd' => '!', |
|
| 772 | - 'dd' => '!', |
|
| 773 | - 'ddd' => 'D', |
|
| 774 | - 'dddd' => 'D', |
|
| 775 | - 'DDD' => 'z', |
|
| 776 | - 'DDDD' => 'z', |
|
| 777 | - 'DDDo' => 'z', |
|
| 778 | - 'e' => '!', |
|
| 779 | - 'E' => '!', |
|
| 780 | - 'H' => 'G', |
|
| 781 | - 'HH' => 'H', |
|
| 782 | - 'h' => 'g', |
|
| 783 | - 'hh' => 'h', |
|
| 784 | - 'k' => 'G', |
|
| 785 | - 'kk' => 'G', |
|
| 786 | - 'hmm' => 'gi', |
|
| 787 | - 'hmmss' => 'gis', |
|
| 788 | - 'Hmm' => 'Gi', |
|
| 789 | - 'Hmmss' => 'Gis', |
|
| 790 | - 'm' => 'i', |
|
| 791 | - 'mm' => 'i', |
|
| 792 | - 'a' => 'a', |
|
| 793 | - 'A' => 'a', |
|
| 794 | - 's' => 's', |
|
| 795 | - 'ss' => 's', |
|
| 796 | - 'S' => '*', |
|
| 797 | - 'SS' => '*', |
|
| 798 | - 'SSS' => '*', |
|
| 799 | - 'SSSS' => '*', |
|
| 800 | - 'SSSSS' => '*', |
|
| 801 | - 'SSSSSS' => 'u', |
|
| 802 | - 'SSSSSSS' => 'u*', |
|
| 803 | - 'SSSSSSSS' => 'u*', |
|
| 804 | - 'SSSSSSSSS' => 'u*', |
|
| 805 | - 'M' => 'm', |
|
| 806 | - 'MM' => 'm', |
|
| 807 | - 'MMM' => 'M', |
|
| 808 | - 'MMMM' => 'M', |
|
| 809 | - 'Mo' => 'm', |
|
| 810 | - 'Q' => '!', |
|
| 811 | - 'Qo' => '!', |
|
| 812 | - 'G' => '!', |
|
| 813 | - 'GG' => '!', |
|
| 814 | - 'GGG' => '!', |
|
| 815 | - 'GGGG' => '!', |
|
| 816 | - 'GGGGG' => '!', |
|
| 817 | - 'g' => '!', |
|
| 818 | - 'gg' => '!', |
|
| 819 | - 'ggg' => '!', |
|
| 820 | - 'gggg' => '!', |
|
| 821 | - 'ggggg' => '!', |
|
| 822 | - 'W' => '!', |
|
| 823 | - 'WW' => '!', |
|
| 824 | - 'Wo' => '!', |
|
| 825 | - 'w' => '!', |
|
| 826 | - 'ww' => '!', |
|
| 827 | - 'wo' => '!', |
|
| 828 | - 'x' => 'U???', |
|
| 829 | - 'X' => 'U', |
|
| 830 | - 'Y' => 'Y', |
|
| 831 | - 'YY' => 'y', |
|
| 832 | - 'YYYY' => 'Y', |
|
| 833 | - 'YYYYY' => 'Y', |
|
| 834 | - 'YYYYYY' => 'Y', |
|
| 835 | - 'z' => 'e', |
|
| 836 | - 'zz' => 'e', |
|
| 837 | - 'Z' => 'e', |
|
| 838 | - 'ZZ' => 'e', |
|
| 839 | - ]; |
|
| 840 | - } |
|
| 841 | - |
|
| 842 | - $format = $replacements[$code] ?? '?'; |
|
| 843 | - |
|
| 844 | - if ($format === '!') { |
|
| 845 | - throw new InvalidFormatException("Format $code not supported for creation."); |
|
| 846 | - } |
|
| 847 | - |
|
| 848 | - return $format; |
|
| 849 | - }, $format); |
|
| 850 | - |
|
| 851 | - return static::rawCreateFromFormat($format, $time, $tz); |
|
| 852 | - } |
|
| 853 | - |
|
| 854 | - /** |
|
| 855 | - * Create a Carbon instance from a specific format and a string in a given language. |
|
| 856 | - * |
|
| 857 | - * @param string $format Datetime format |
|
| 858 | - * @param string $locale |
|
| 859 | - * @param string $time |
|
| 860 | - * @param DateTimeZone|string|false|null $tz |
|
| 861 | - * |
|
| 862 | - * @throws InvalidFormatException |
|
| 863 | - * |
|
| 864 | - * @return static|false |
|
| 865 | - */ |
|
| 866 | - public static function createFromLocaleFormat($format, $locale, $time, $tz = null) |
|
| 867 | - { |
|
| 868 | - return static::rawCreateFromFormat($format, static::translateTimeString($time, $locale, 'en'), $tz); |
|
| 869 | - } |
|
| 870 | - |
|
| 871 | - /** |
|
| 872 | - * Create a Carbon instance from a specific ISO format and a string in a given language. |
|
| 873 | - * |
|
| 874 | - * @param string $format Datetime ISO format |
|
| 875 | - * @param string $locale |
|
| 876 | - * @param string $time |
|
| 877 | - * @param DateTimeZone|string|false|null $tz |
|
| 878 | - * |
|
| 879 | - * @throws InvalidFormatException |
|
| 880 | - * |
|
| 881 | - * @return static|false |
|
| 882 | - */ |
|
| 883 | - public static function createFromLocaleIsoFormat($format, $locale, $time, $tz = null) |
|
| 884 | - { |
|
| 885 | - $time = static::translateTimeString($time, $locale, 'en', CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS | CarbonInterface::TRANSLATE_MERIDIEM); |
|
| 886 | - |
|
| 887 | - return static::createFromIsoFormat($format, $time, $tz, $locale); |
|
| 888 | - } |
|
| 889 | - |
|
| 890 | - /** |
|
| 891 | - * Make a Carbon instance from given variable if possible. |
|
| 892 | - * |
|
| 893 | - * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals |
|
| 894 | - * and recurrences). Throw an exception for invalid format, but otherwise return null. |
|
| 895 | - * |
|
| 896 | - * @param mixed $var |
|
| 897 | - * |
|
| 898 | - * @throws InvalidFormatException |
|
| 899 | - * |
|
| 900 | - * @return static|null |
|
| 901 | - */ |
|
| 902 | - public static function make($var) |
|
| 903 | - { |
|
| 904 | - if ($var instanceof DateTimeInterface) { |
|
| 905 | - return static::instance($var); |
|
| 906 | - } |
|
| 907 | - |
|
| 908 | - $date = null; |
|
| 909 | - |
|
| 910 | - if (\is_string($var)) { |
|
| 911 | - $var = trim($var); |
|
| 912 | - |
|
| 913 | - if (!preg_match('/^P[\dT]/', $var) && |
|
| 914 | - !preg_match('/^R\d/', $var) && |
|
| 915 | - preg_match('/[a-z\d]/i', $var) |
|
| 916 | - ) { |
|
| 917 | - $date = static::parse($var); |
|
| 918 | - } |
|
| 919 | - } |
|
| 920 | - |
|
| 921 | - return $date; |
|
| 922 | - } |
|
| 923 | - |
|
| 924 | - /** |
|
| 925 | - * Set last errors. |
|
| 926 | - * |
|
| 927 | - * @param array $lastErrors |
|
| 928 | - * |
|
| 929 | - * @return void |
|
| 930 | - */ |
|
| 931 | - private static function setLastErrors(array $lastErrors) |
|
| 932 | - { |
|
| 933 | - static::$lastErrors = $lastErrors; |
|
| 934 | - } |
|
| 935 | - |
|
| 936 | - /** |
|
| 937 | - * {@inheritdoc} |
|
| 938 | - * |
|
| 939 | - * @return array |
|
| 940 | - */ |
|
| 941 | - #[ReturnTypeWillChange] |
|
| 942 | - public static function getLastErrors() |
|
| 943 | - { |
|
| 944 | - return static::$lastErrors; |
|
| 945 | - } |
|
| 38 | + use ObjectInitialisation; |
|
| 39 | + |
|
| 40 | + /** |
|
| 41 | + * The errors that can occur. |
|
| 42 | + * |
|
| 43 | + * @var array |
|
| 44 | + */ |
|
| 45 | + protected static $lastErrors; |
|
| 46 | + |
|
| 47 | + /** |
|
| 48 | + * Create a new Carbon instance. |
|
| 49 | + * |
|
| 50 | + * Please see the testing aids section (specifically static::setTestNow()) |
|
| 51 | + * for more on the possibility of this constructor returning a test instance. |
|
| 52 | + * |
|
| 53 | + * @param DateTimeInterface|string|null $time |
|
| 54 | + * @param DateTimeZone|string|null $tz |
|
| 55 | + * |
|
| 56 | + * @throws InvalidFormatException |
|
| 57 | + */ |
|
| 58 | + public function __construct($time = null, $tz = null) |
|
| 59 | + { |
|
| 60 | + if ($time instanceof DateTimeInterface) { |
|
| 61 | + $time = $this->constructTimezoneFromDateTime($time, $tz)->format('Y-m-d H:i:s.u'); |
|
| 62 | + } |
|
| 63 | + |
|
| 64 | + if (is_numeric($time) && (!\is_string($time) || !preg_match('/^\d{1,14}$/', $time))) { |
|
| 65 | + $time = static::createFromTimestampUTC($time)->format('Y-m-d\TH:i:s.uP'); |
|
| 66 | + } |
|
| 67 | + |
|
| 68 | + // If the class has a test now set and we are trying to create a now() |
|
| 69 | + // instance then override as required |
|
| 70 | + $isNow = empty($time) || $time === 'now'; |
|
| 71 | + |
|
| 72 | + if (method_exists(static::class, 'hasTestNow') && |
|
| 73 | + method_exists(static::class, 'getTestNow') && |
|
| 74 | + static::hasTestNow() && |
|
| 75 | + ($isNow || static::hasRelativeKeywords($time)) |
|
| 76 | + ) { |
|
| 77 | + static::mockConstructorParameters($time, $tz); |
|
| 78 | + } |
|
| 79 | + |
|
| 80 | + // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127 |
|
| 81 | + if (!str_contains((string) .1, '.')) { |
|
| 82 | + $locale = setlocale(LC_NUMERIC, '0'); // @codeCoverageIgnore |
|
| 83 | + setlocale(LC_NUMERIC, 'C'); // @codeCoverageIgnore |
|
| 84 | + } |
|
| 85 | + |
|
| 86 | + try { |
|
| 87 | + parent::__construct($time ?: 'now', static::safeCreateDateTimeZone($tz) ?: null); |
|
| 88 | + } catch (Exception $exception) { |
|
| 89 | + throw new InvalidFormatException($exception->getMessage(), 0, $exception); |
|
| 90 | + } |
|
| 91 | + |
|
| 92 | + $this->constructedObjectId = spl_object_hash($this); |
|
| 93 | + |
|
| 94 | + if (isset($locale)) { |
|
| 95 | + setlocale(LC_NUMERIC, $locale); // @codeCoverageIgnore |
|
| 96 | + } |
|
| 97 | + |
|
| 98 | + // @CHANGE |
|
| 99 | + if (parent::getLastErrors()) { |
|
| 100 | + self::setLastErrors(parent::getLastErrors()); |
|
| 101 | + } |
|
| 102 | + } |
|
| 103 | + |
|
| 104 | + /** |
|
| 105 | + * Get timezone from a datetime instance. |
|
| 106 | + * |
|
| 107 | + * @param DateTimeInterface $date |
|
| 108 | + * @param DateTimeZone|string|null $tz |
|
| 109 | + * |
|
| 110 | + * @return DateTimeInterface |
|
| 111 | + */ |
|
| 112 | + private function constructTimezoneFromDateTime(DateTimeInterface $date, &$tz) |
|
| 113 | + { |
|
| 114 | + if ($tz !== null) { |
|
| 115 | + $safeTz = static::safeCreateDateTimeZone($tz); |
|
| 116 | + |
|
| 117 | + if ($safeTz) { |
|
| 118 | + return $date->setTimezone($safeTz); |
|
| 119 | + } |
|
| 120 | + |
|
| 121 | + return $date; |
|
| 122 | + } |
|
| 123 | + |
|
| 124 | + $tz = $date->getTimezone(); |
|
| 125 | + |
|
| 126 | + return $date; |
|
| 127 | + } |
|
| 128 | + |
|
| 129 | + /** |
|
| 130 | + * Update constructedObjectId on cloned. |
|
| 131 | + */ |
|
| 132 | + public function __clone() |
|
| 133 | + { |
|
| 134 | + $this->constructedObjectId = spl_object_hash($this); |
|
| 135 | + } |
|
| 136 | + |
|
| 137 | + /** |
|
| 138 | + * Create a Carbon instance from a DateTime one. |
|
| 139 | + * |
|
| 140 | + * @param DateTimeInterface $date |
|
| 141 | + * |
|
| 142 | + * @return static |
|
| 143 | + */ |
|
| 144 | + public static function instance($date) |
|
| 145 | + { |
|
| 146 | + if ($date instanceof static) { |
|
| 147 | + return clone $date; |
|
| 148 | + } |
|
| 149 | + |
|
| 150 | + static::expectDateTime($date); |
|
| 151 | + |
|
| 152 | + $instance = new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); |
|
| 153 | + |
|
| 154 | + if ($date instanceof CarbonInterface) { |
|
| 155 | + $settings = $date->getSettings(); |
|
| 156 | + |
|
| 157 | + if (!$date->hasLocalTranslator()) { |
|
| 158 | + unset($settings['locale']); |
|
| 159 | + } |
|
| 160 | + |
|
| 161 | + $instance->settings($settings); |
|
| 162 | + } |
|
| 163 | + |
|
| 164 | + return $instance; |
|
| 165 | + } |
|
| 166 | + |
|
| 167 | + /** |
|
| 168 | + * Create a carbon instance from a string. |
|
| 169 | + * |
|
| 170 | + * This is an alias for the constructor that allows better fluent syntax |
|
| 171 | + * as it allows you to do Carbon::parse('Monday next week')->fn() rather |
|
| 172 | + * than (new Carbon('Monday next week'))->fn(). |
|
| 173 | + * |
|
| 174 | + * @param string|DateTimeInterface|null $time |
|
| 175 | + * @param DateTimeZone|string|null $tz |
|
| 176 | + * |
|
| 177 | + * @throws InvalidFormatException |
|
| 178 | + * |
|
| 179 | + * @return static |
|
| 180 | + */ |
|
| 181 | + public static function rawParse($time = null, $tz = null) |
|
| 182 | + { |
|
| 183 | + if ($time instanceof DateTimeInterface) { |
|
| 184 | + return static::instance($time); |
|
| 185 | + } |
|
| 186 | + |
|
| 187 | + try { |
|
| 188 | + return new static($time, $tz); |
|
| 189 | + } catch (Exception $exception) { |
|
| 190 | + $date = @static::now($tz)->change($time); |
|
| 191 | + |
|
| 192 | + if (!$date) { |
|
| 193 | + throw new InvalidFormatException("Could not parse '$time': ".$exception->getMessage(), 0, $exception); |
|
| 194 | + } |
|
| 195 | + |
|
| 196 | + return $date; |
|
| 197 | + } |
|
| 198 | + } |
|
| 199 | + |
|
| 200 | + /** |
|
| 201 | + * Create a carbon instance from a string. |
|
| 202 | + * |
|
| 203 | + * This is an alias for the constructor that allows better fluent syntax |
|
| 204 | + * as it allows you to do Carbon::parse('Monday next week')->fn() rather |
|
| 205 | + * than (new Carbon('Monday next week'))->fn(). |
|
| 206 | + * |
|
| 207 | + * @param string|DateTimeInterface|null $time |
|
| 208 | + * @param DateTimeZone|string|null $tz |
|
| 209 | + * |
|
| 210 | + * @throws InvalidFormatException |
|
| 211 | + * |
|
| 212 | + * @return static |
|
| 213 | + */ |
|
| 214 | + public static function parse($time = null, $tz = null) |
|
| 215 | + { |
|
| 216 | + $function = static::$parseFunction; |
|
| 217 | + |
|
| 218 | + if (!$function) { |
|
| 219 | + return static::rawParse($time, $tz); |
|
| 220 | + } |
|
| 221 | + |
|
| 222 | + if (\is_string($function) && method_exists(static::class, $function)) { |
|
| 223 | + $function = [static::class, $function]; |
|
| 224 | + } |
|
| 225 | + |
|
| 226 | + return $function(...\func_get_args()); |
|
| 227 | + } |
|
| 228 | + |
|
| 229 | + /** |
|
| 230 | + * Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). |
|
| 231 | + * |
|
| 232 | + * @param string $time date/time string in the given language (may also contain English). |
|
| 233 | + * @param string|null $locale if locale is null or not specified, current global locale will be |
|
| 234 | + * used instead. |
|
| 235 | + * @param DateTimeZone|string|null $tz optional timezone for the new instance. |
|
| 236 | + * |
|
| 237 | + * @throws InvalidFormatException |
|
| 238 | + * |
|
| 239 | + * @return static |
|
| 240 | + */ |
|
| 241 | + public static function parseFromLocale($time, $locale = null, $tz = null) |
|
| 242 | + { |
|
| 243 | + return static::rawParse(static::translateTimeString($time, $locale, 'en'), $tz); |
|
| 244 | + } |
|
| 245 | + |
|
| 246 | + /** |
|
| 247 | + * Get a Carbon instance for the current date and time. |
|
| 248 | + * |
|
| 249 | + * @param DateTimeZone|string|null $tz |
|
| 250 | + * |
|
| 251 | + * @return static |
|
| 252 | + */ |
|
| 253 | + public static function now($tz = null) |
|
| 254 | + { |
|
| 255 | + return new static(null, $tz); |
|
| 256 | + } |
|
| 257 | + |
|
| 258 | + /** |
|
| 259 | + * Create a Carbon instance for today. |
|
| 260 | + * |
|
| 261 | + * @param DateTimeZone|string|null $tz |
|
| 262 | + * |
|
| 263 | + * @return static |
|
| 264 | + */ |
|
| 265 | + public static function today($tz = null) |
|
| 266 | + { |
|
| 267 | + return static::rawParse('today', $tz); |
|
| 268 | + } |
|
| 269 | + |
|
| 270 | + /** |
|
| 271 | + * Create a Carbon instance for tomorrow. |
|
| 272 | + * |
|
| 273 | + * @param DateTimeZone|string|null $tz |
|
| 274 | + * |
|
| 275 | + * @return static |
|
| 276 | + */ |
|
| 277 | + public static function tomorrow($tz = null) |
|
| 278 | + { |
|
| 279 | + return static::rawParse('tomorrow', $tz); |
|
| 280 | + } |
|
| 281 | + |
|
| 282 | + /** |
|
| 283 | + * Create a Carbon instance for yesterday. |
|
| 284 | + * |
|
| 285 | + * @param DateTimeZone|string|null $tz |
|
| 286 | + * |
|
| 287 | + * @return static |
|
| 288 | + */ |
|
| 289 | + public static function yesterday($tz = null) |
|
| 290 | + { |
|
| 291 | + return static::rawParse('yesterday', $tz); |
|
| 292 | + } |
|
| 293 | + |
|
| 294 | + /** |
|
| 295 | + * Create a Carbon instance for the greatest supported date. |
|
| 296 | + * |
|
| 297 | + * @return static |
|
| 298 | + */ |
|
| 299 | + public static function maxValue() |
|
| 300 | + { |
|
| 301 | + if (self::$PHPIntSize === 4) { |
|
| 302 | + // 32 bit |
|
| 303 | + return static::createFromTimestamp(PHP_INT_MAX); // @codeCoverageIgnore |
|
| 304 | + } |
|
| 305 | + |
|
| 306 | + // 64 bit |
|
| 307 | + return static::create(9999, 12, 31, 23, 59, 59); |
|
| 308 | + } |
|
| 309 | + |
|
| 310 | + /** |
|
| 311 | + * Create a Carbon instance for the lowest supported date. |
|
| 312 | + * |
|
| 313 | + * @return static |
|
| 314 | + */ |
|
| 315 | + public static function minValue() |
|
| 316 | + { |
|
| 317 | + if (self::$PHPIntSize === 4) { |
|
| 318 | + // 32 bit |
|
| 319 | + return static::createFromTimestamp(~PHP_INT_MAX); // @codeCoverageIgnore |
|
| 320 | + } |
|
| 321 | + |
|
| 322 | + // 64 bit |
|
| 323 | + return static::create(1, 1, 1, 0, 0, 0); |
|
| 324 | + } |
|
| 325 | + |
|
| 326 | + private static function assertBetween($unit, $value, $min, $max) |
|
| 327 | + { |
|
| 328 | + if (static::isStrictModeEnabled() && ($value < $min || $value > $max)) { |
|
| 329 | + throw new OutOfRangeException($unit, $min, $max, $value); |
|
| 330 | + } |
|
| 331 | + } |
|
| 332 | + |
|
| 333 | + private static function createNowInstance($tz) |
|
| 334 | + { |
|
| 335 | + if (!static::hasTestNow()) { |
|
| 336 | + return static::now($tz); |
|
| 337 | + } |
|
| 338 | + |
|
| 339 | + $now = static::getTestNow(); |
|
| 340 | + |
|
| 341 | + if ($now instanceof Closure) { |
|
| 342 | + return $now(static::now($tz)); |
|
| 343 | + } |
|
| 344 | + |
|
| 345 | + return $now->avoidMutation()->tz($tz); |
|
| 346 | + } |
|
| 347 | + |
|
| 348 | + /** |
|
| 349 | + * Create a new Carbon instance from a specific date and time. |
|
| 350 | + * |
|
| 351 | + * If any of $year, $month or $day are set to null their now() values will |
|
| 352 | + * be used. |
|
| 353 | + * |
|
| 354 | + * If $hour is null it will be set to its now() value and the default |
|
| 355 | + * values for $minute and $second will be their now() values. |
|
| 356 | + * |
|
| 357 | + * If $hour is not null then the default values for $minute and $second |
|
| 358 | + * will be 0. |
|
| 359 | + * |
|
| 360 | + * @param int|null $year |
|
| 361 | + * @param int|null $month |
|
| 362 | + * @param int|null $day |
|
| 363 | + * @param int|null $hour |
|
| 364 | + * @param int|null $minute |
|
| 365 | + * @param int|null $second |
|
| 366 | + * @param DateTimeZone|string|null $tz |
|
| 367 | + * |
|
| 368 | + * @throws InvalidFormatException |
|
| 369 | + * |
|
| 370 | + * @return static|false |
|
| 371 | + */ |
|
| 372 | + public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) |
|
| 373 | + { |
|
| 374 | + if ((\is_string($year) && !is_numeric($year)) || $year instanceof DateTimeInterface) { |
|
| 375 | + return static::parse($year, $tz ?: (\is_string($month) || $month instanceof DateTimeZone ? $month : null)); |
|
| 376 | + } |
|
| 377 | + |
|
| 378 | + $defaults = null; |
|
| 379 | + $getDefault = function ($unit) use ($tz, &$defaults) { |
|
| 380 | + if ($defaults === null) { |
|
| 381 | + $now = self::createNowInstance($tz); |
|
| 382 | + |
|
| 383 | + $defaults = array_combine([ |
|
| 384 | + 'year', |
|
| 385 | + 'month', |
|
| 386 | + 'day', |
|
| 387 | + 'hour', |
|
| 388 | + 'minute', |
|
| 389 | + 'second', |
|
| 390 | + ], explode('-', $now->rawFormat('Y-n-j-G-i-s.u'))); |
|
| 391 | + } |
|
| 392 | + |
|
| 393 | + return $defaults[$unit]; |
|
| 394 | + }; |
|
| 395 | + |
|
| 396 | + $year = $year ?? $getDefault('year'); |
|
| 397 | + $month = $month ?? $getDefault('month'); |
|
| 398 | + $day = $day ?? $getDefault('day'); |
|
| 399 | + $hour = $hour ?? $getDefault('hour'); |
|
| 400 | + $minute = $minute ?? $getDefault('minute'); |
|
| 401 | + $second = (float) ($second ?? $getDefault('second')); |
|
| 402 | + |
|
| 403 | + self::assertBetween('month', $month, 0, 99); |
|
| 404 | + self::assertBetween('day', $day, 0, 99); |
|
| 405 | + self::assertBetween('hour', $hour, 0, 99); |
|
| 406 | + self::assertBetween('minute', $minute, 0, 99); |
|
| 407 | + self::assertBetween('second', $second, 0, 99); |
|
| 408 | + |
|
| 409 | + $fixYear = null; |
|
| 410 | + |
|
| 411 | + if ($year < 0) { |
|
| 412 | + $fixYear = $year; |
|
| 413 | + $year = 0; |
|
| 414 | + } elseif ($year > 9999) { |
|
| 415 | + $fixYear = $year - 9999; |
|
| 416 | + $year = 9999; |
|
| 417 | + } |
|
| 418 | + |
|
| 419 | + $second = ($second < 10 ? '0' : '').number_format($second, 6); |
|
| 420 | + $instance = static::rawCreateFromFormat('!Y-n-j G:i:s.u', sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); |
|
| 421 | + |
|
| 422 | + if ($fixYear !== null) { |
|
| 423 | + $instance = $instance->addYears($fixYear); |
|
| 424 | + } |
|
| 425 | + |
|
| 426 | + return $instance; |
|
| 427 | + } |
|
| 428 | + |
|
| 429 | + /** |
|
| 430 | + * Create a new safe Carbon instance from a specific date and time. |
|
| 431 | + * |
|
| 432 | + * If any of $year, $month or $day are set to null their now() values will |
|
| 433 | + * be used. |
|
| 434 | + * |
|
| 435 | + * If $hour is null it will be set to its now() value and the default |
|
| 436 | + * values for $minute and $second will be their now() values. |
|
| 437 | + * |
|
| 438 | + * If $hour is not null then the default values for $minute and $second |
|
| 439 | + * will be 0. |
|
| 440 | + * |
|
| 441 | + * If one of the set values is not valid, an InvalidDateException |
|
| 442 | + * will be thrown. |
|
| 443 | + * |
|
| 444 | + * @param int|null $year |
|
| 445 | + * @param int|null $month |
|
| 446 | + * @param int|null $day |
|
| 447 | + * @param int|null $hour |
|
| 448 | + * @param int|null $minute |
|
| 449 | + * @param int|null $second |
|
| 450 | + * @param DateTimeZone|string|null $tz |
|
| 451 | + * |
|
| 452 | + * @throws InvalidDateException |
|
| 453 | + * |
|
| 454 | + * @return static|false |
|
| 455 | + */ |
|
| 456 | + public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) |
|
| 457 | + { |
|
| 458 | + $fields = static::getRangesByUnit(); |
|
| 459 | + |
|
| 460 | + foreach ($fields as $field => $range) { |
|
| 461 | + if ($$field !== null && (!\is_int($$field) || $$field < $range[0] || $$field > $range[1])) { |
|
| 462 | + if (static::isStrictModeEnabled()) { |
|
| 463 | + throw new InvalidDateException($field, $$field); |
|
| 464 | + } |
|
| 465 | + |
|
| 466 | + return false; |
|
| 467 | + } |
|
| 468 | + } |
|
| 469 | + |
|
| 470 | + $instance = static::create($year, $month, $day, $hour, $minute, $second, $tz); |
|
| 471 | + |
|
| 472 | + foreach (array_reverse($fields) as $field => $range) { |
|
| 473 | + if ($$field !== null && (!\is_int($$field) || $$field !== $instance->$field)) { |
|
| 474 | + if (static::isStrictModeEnabled()) { |
|
| 475 | + throw new InvalidDateException($field, $$field); |
|
| 476 | + } |
|
| 477 | + |
|
| 478 | + return false; |
|
| 479 | + } |
|
| 480 | + } |
|
| 481 | + |
|
| 482 | + return $instance; |
|
| 483 | + } |
|
| 484 | + |
|
| 485 | + /** |
|
| 486 | + * Create a new Carbon instance from a specific date and time using strict validation. |
|
| 487 | + * |
|
| 488 | + * @see create() |
|
| 489 | + * |
|
| 490 | + * @param int|null $year |
|
| 491 | + * @param int|null $month |
|
| 492 | + * @param int|null $day |
|
| 493 | + * @param int|null $hour |
|
| 494 | + * @param int|null $minute |
|
| 495 | + * @param int|null $second |
|
| 496 | + * @param DateTimeZone|string|null $tz |
|
| 497 | + * |
|
| 498 | + * @throws InvalidFormatException |
|
| 499 | + * |
|
| 500 | + * @return static |
|
| 501 | + */ |
|
| 502 | + public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null): self |
|
| 503 | + { |
|
| 504 | + $initialStrictMode = static::isStrictModeEnabled(); |
|
| 505 | + static::useStrictMode(true); |
|
| 506 | + |
|
| 507 | + try { |
|
| 508 | + $date = static::create($year, $month, $day, $hour, $minute, $second, $tz); |
|
| 509 | + } finally { |
|
| 510 | + static::useStrictMode($initialStrictMode); |
|
| 511 | + } |
|
| 512 | + |
|
| 513 | + return $date; |
|
| 514 | + } |
|
| 515 | + |
|
| 516 | + /** |
|
| 517 | + * Create a Carbon instance from just a date. The time portion is set to now. |
|
| 518 | + * |
|
| 519 | + * @param int|null $year |
|
| 520 | + * @param int|null $month |
|
| 521 | + * @param int|null $day |
|
| 522 | + * @param DateTimeZone|string|null $tz |
|
| 523 | + * |
|
| 524 | + * @throws InvalidFormatException |
|
| 525 | + * |
|
| 526 | + * @return static |
|
| 527 | + */ |
|
| 528 | + public static function createFromDate($year = null, $month = null, $day = null, $tz = null) |
|
| 529 | + { |
|
| 530 | + return static::create($year, $month, $day, null, null, null, $tz); |
|
| 531 | + } |
|
| 532 | + |
|
| 533 | + /** |
|
| 534 | + * Create a Carbon instance from just a date. The time portion is set to midnight. |
|
| 535 | + * |
|
| 536 | + * @param int|null $year |
|
| 537 | + * @param int|null $month |
|
| 538 | + * @param int|null $day |
|
| 539 | + * @param DateTimeZone|string|null $tz |
|
| 540 | + * |
|
| 541 | + * @throws InvalidFormatException |
|
| 542 | + * |
|
| 543 | + * @return static |
|
| 544 | + */ |
|
| 545 | + public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null) |
|
| 546 | + { |
|
| 547 | + return static::create($year, $month, $day, 0, 0, 0, $tz); |
|
| 548 | + } |
|
| 549 | + |
|
| 550 | + /** |
|
| 551 | + * Create a Carbon instance from just a time. The date portion is set to today. |
|
| 552 | + * |
|
| 553 | + * @param int|null $hour |
|
| 554 | + * @param int|null $minute |
|
| 555 | + * @param int|null $second |
|
| 556 | + * @param DateTimeZone|string|null $tz |
|
| 557 | + * |
|
| 558 | + * @throws InvalidFormatException |
|
| 559 | + * |
|
| 560 | + * @return static |
|
| 561 | + */ |
|
| 562 | + public static function createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) |
|
| 563 | + { |
|
| 564 | + return static::create(null, null, null, $hour, $minute, $second, $tz); |
|
| 565 | + } |
|
| 566 | + |
|
| 567 | + /** |
|
| 568 | + * Create a Carbon instance from a time string. The date portion is set to today. |
|
| 569 | + * |
|
| 570 | + * @param string $time |
|
| 571 | + * @param DateTimeZone|string|null $tz |
|
| 572 | + * |
|
| 573 | + * @throws InvalidFormatException |
|
| 574 | + * |
|
| 575 | + * @return static |
|
| 576 | + */ |
|
| 577 | + public static function createFromTimeString($time, $tz = null) |
|
| 578 | + { |
|
| 579 | + return static::today($tz)->setTimeFromTimeString($time); |
|
| 580 | + } |
|
| 581 | + |
|
| 582 | + /** |
|
| 583 | + * @param string $format Datetime format |
|
| 584 | + * @param string $time |
|
| 585 | + * @param DateTimeZone|string|false|null $originalTz |
|
| 586 | + * |
|
| 587 | + * @return DateTimeInterface|false |
|
| 588 | + */ |
|
| 589 | + private static function createFromFormatAndTimezone($format, $time, $originalTz) |
|
| 590 | + { |
|
| 591 | + // Work-around for https://bugs.php.net/bug.php?id=75577 |
|
| 592 | + // @codeCoverageIgnoreStart |
|
| 593 | + if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { |
|
| 594 | + $format = str_replace('.v', '.u', $format); |
|
| 595 | + } |
|
| 596 | + // @codeCoverageIgnoreEnd |
|
| 597 | + |
|
| 598 | + if ($originalTz === null) { |
|
| 599 | + return parent::createFromFormat($format, (string) $time); |
|
| 600 | + } |
|
| 601 | + |
|
| 602 | + $tz = \is_int($originalTz) |
|
| 603 | + ? @timezone_name_from_abbr('', (int) ($originalTz * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE), 1) |
|
| 604 | + : $originalTz; |
|
| 605 | + |
|
| 606 | + $tz = static::safeCreateDateTimeZone($tz, $originalTz); |
|
| 607 | + |
|
| 608 | + if ($tz === false) { |
|
| 609 | + return false; |
|
| 610 | + } |
|
| 611 | + |
|
| 612 | + return parent::createFromFormat($format, (string) $time, $tz); |
|
| 613 | + } |
|
| 614 | + |
|
| 615 | + /** |
|
| 616 | + * Create a Carbon instance from a specific format. |
|
| 617 | + * |
|
| 618 | + * @param string $format Datetime format |
|
| 619 | + * @param string $time |
|
| 620 | + * @param DateTimeZone|string|false|null $tz |
|
| 621 | + * |
|
| 622 | + * @throws InvalidFormatException |
|
| 623 | + * |
|
| 624 | + * @return static|false |
|
| 625 | + */ |
|
| 626 | + public static function rawCreateFromFormat($format, $time, $tz = null) |
|
| 627 | + { |
|
| 628 | + // Work-around for https://bugs.php.net/bug.php?id=80141 |
|
| 629 | + $format = preg_replace('/(?<!\\\\)((?:\\\\{2})*)c/', '$1Y-m-d\TH:i:sP', $format); |
|
| 630 | + |
|
| 631 | + if (preg_match('/(?<!\\\\)(?:\\\\{2})*(a|A)/', $format, $aMatches, PREG_OFFSET_CAPTURE) && |
|
| 632 | + preg_match('/(?<!\\\\)(?:\\\\{2})*(h|g|H|G)/', $format, $hMatches, PREG_OFFSET_CAPTURE) && |
|
| 633 | + $aMatches[1][1] < $hMatches[1][1] && |
|
| 634 | + preg_match('/(am|pm|AM|PM)/', $time) |
|
| 635 | + ) { |
|
| 636 | + $format = preg_replace('/^(.*)(?<!\\\\)((?:\\\\{2})*)(a|A)(.*)$/U', '$1$2$4 $3', $format); |
|
| 637 | + $time = preg_replace('/^(.*)(am|pm|AM|PM)(.*)$/U', '$1$3 $2', $time); |
|
| 638 | + } |
|
| 639 | + |
|
| 640 | + // First attempt to create an instance, so that error messages are based on the unmodified format. |
|
| 641 | + $date = self::createFromFormatAndTimezone($format, $time, $tz); |
|
| 642 | + $lastErrors = parent::getLastErrors(); |
|
| 643 | + /** @var \Carbon\CarbonImmutable|\Carbon\Carbon|null $mock */ |
|
| 644 | + $mock = static::getMockedTestNow($tz); |
|
| 645 | + |
|
| 646 | + if ($mock && $date instanceof DateTimeInterface) { |
|
| 647 | + // Set timezone from mock if custom timezone was neither given directly nor as a part of format. |
|
| 648 | + // First let's skip the part that will be ignored by the parser. |
|
| 649 | + $nonEscaped = '(?<!\\\\)(\\\\{2})*'; |
|
| 650 | + |
|
| 651 | + $nonIgnored = preg_replace("/^.*{$nonEscaped}!/s", '', $format); |
|
| 652 | + |
|
| 653 | + if ($tz === null && !preg_match("/{$nonEscaped}[eOPT]/", $nonIgnored)) { |
|
| 654 | + $tz = clone $mock->getTimezone(); |
|
| 655 | + } |
|
| 656 | + |
|
| 657 | + // Set microseconds to zero to match behavior of DateTime::createFromFormat() |
|
| 658 | + // See https://bugs.php.net/bug.php?id=74332 |
|
| 659 | + $mock = $mock->copy()->microsecond(0); |
|
| 660 | + |
|
| 661 | + // Prepend mock datetime only if the format does not contain non escaped unix epoch reset flag. |
|
| 662 | + if (!preg_match("/{$nonEscaped}[!|]/", $format)) { |
|
| 663 | + $format = static::MOCK_DATETIME_FORMAT.' '.$format; |
|
| 664 | + $time = ($mock instanceof self ? $mock->rawFormat(static::MOCK_DATETIME_FORMAT) : $mock->format(static::MOCK_DATETIME_FORMAT)).' '.$time; |
|
| 665 | + } |
|
| 666 | + |
|
| 667 | + // Regenerate date from the modified format to base result on the mocked instance instead of now. |
|
| 668 | + $date = self::createFromFormatAndTimezone($format, $time, $tz); |
|
| 669 | + } |
|
| 670 | + |
|
| 671 | + if ($date instanceof DateTimeInterface) { |
|
| 672 | + $instance = static::instance($date); |
|
| 673 | + $instance::setLastErrors($lastErrors); |
|
| 674 | + |
|
| 675 | + return $instance; |
|
| 676 | + } |
|
| 677 | + |
|
| 678 | + if (static::isStrictModeEnabled()) { |
|
| 679 | + throw new InvalidFormatException(implode(PHP_EOL, $lastErrors['errors'])); |
|
| 680 | + } |
|
| 681 | + |
|
| 682 | + return false; |
|
| 683 | + } |
|
| 684 | + |
|
| 685 | + /** |
|
| 686 | + * Create a Carbon instance from a specific format. |
|
| 687 | + * |
|
| 688 | + * @param string $format Datetime format |
|
| 689 | + * @param string $time |
|
| 690 | + * @param DateTimeZone|string|false|null $tz |
|
| 691 | + * |
|
| 692 | + * @throws InvalidFormatException |
|
| 693 | + * |
|
| 694 | + * @return static|false |
|
| 695 | + */ |
|
| 696 | + #[ReturnTypeWillChange] |
|
| 697 | + public static function createFromFormat($format, $time, $tz = null) |
|
| 698 | + { |
|
| 699 | + $function = static::$createFromFormatFunction; |
|
| 700 | + |
|
| 701 | + if (!$function) { |
|
| 702 | + return static::rawCreateFromFormat($format, $time, $tz); |
|
| 703 | + } |
|
| 704 | + |
|
| 705 | + if (\is_string($function) && method_exists(static::class, $function)) { |
|
| 706 | + $function = [static::class, $function]; |
|
| 707 | + } |
|
| 708 | + |
|
| 709 | + return $function(...\func_get_args()); |
|
| 710 | + } |
|
| 711 | + |
|
| 712 | + /** |
|
| 713 | + * Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). |
|
| 714 | + * |
|
| 715 | + * @param string $format Datetime format |
|
| 716 | + * @param string $time |
|
| 717 | + * @param DateTimeZone|string|false|null $tz optional timezone |
|
| 718 | + * @param string|null $locale locale to be used for LTS, LT, LL, LLL, etc. macro-formats (en by fault, unneeded if no such macro-format in use) |
|
| 719 | + * @param \Symfony\Component\Translation\TranslatorInterface $translator optional custom translator to use for macro-formats |
|
| 720 | + * |
|
| 721 | + * @throws InvalidFormatException |
|
| 722 | + * |
|
| 723 | + * @return static|false |
|
| 724 | + */ |
|
| 725 | + public static function createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) |
|
| 726 | + { |
|
| 727 | + $format = preg_replace_callback('/(?<!\\\\)(\\\\{2})*(LTS|LT|[Ll]{1,4})/', function ($match) use ($locale, $translator) { |
|
| 728 | + [$code] = $match; |
|
| 729 | + |
|
| 730 | + static $formats = null; |
|
| 731 | + |
|
| 732 | + if ($formats === null) { |
|
| 733 | + $translator = $translator ?: Translator::get($locale); |
|
| 734 | + |
|
| 735 | + $formats = [ |
|
| 736 | + 'LT' => static::getTranslationMessageWith($translator, 'formats.LT', $locale, 'h:mm A'), |
|
| 737 | + 'LTS' => static::getTranslationMessageWith($translator, 'formats.LTS', $locale, 'h:mm:ss A'), |
|
| 738 | + 'L' => static::getTranslationMessageWith($translator, 'formats.L', $locale, 'MM/DD/YYYY'), |
|
| 739 | + 'LL' => static::getTranslationMessageWith($translator, 'formats.LL', $locale, 'MMMM D, YYYY'), |
|
| 740 | + 'LLL' => static::getTranslationMessageWith($translator, 'formats.LLL', $locale, 'MMMM D, YYYY h:mm A'), |
|
| 741 | + 'LLLL' => static::getTranslationMessageWith($translator, 'formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'), |
|
| 742 | + ]; |
|
| 743 | + } |
|
| 744 | + |
|
| 745 | + return $formats[$code] ?? preg_replace_callback( |
|
| 746 | + '/MMMM|MM|DD|dddd/', |
|
| 747 | + function ($code) { |
|
| 748 | + return mb_substr($code[0], 1); |
|
| 749 | + }, |
|
| 750 | + $formats[strtoupper($code)] ?? '' |
|
| 751 | + ); |
|
| 752 | + }, $format); |
|
| 753 | + |
|
| 754 | + $format = preg_replace_callback('/(?<!\\\\)(\\\\{2})*('.CarbonInterface::ISO_FORMAT_REGEXP.'|[A-Za-z])/', function ($match) { |
|
| 755 | + [$code] = $match; |
|
| 756 | + |
|
| 757 | + static $replacements = null; |
|
| 758 | + |
|
| 759 | + if ($replacements === null) { |
|
| 760 | + $replacements = [ |
|
| 761 | + 'OD' => 'd', |
|
| 762 | + 'OM' => 'M', |
|
| 763 | + 'OY' => 'Y', |
|
| 764 | + 'OH' => 'G', |
|
| 765 | + 'Oh' => 'g', |
|
| 766 | + 'Om' => 'i', |
|
| 767 | + 'Os' => 's', |
|
| 768 | + 'D' => 'd', |
|
| 769 | + 'DD' => 'd', |
|
| 770 | + 'Do' => 'd', |
|
| 771 | + 'd' => '!', |
|
| 772 | + 'dd' => '!', |
|
| 773 | + 'ddd' => 'D', |
|
| 774 | + 'dddd' => 'D', |
|
| 775 | + 'DDD' => 'z', |
|
| 776 | + 'DDDD' => 'z', |
|
| 777 | + 'DDDo' => 'z', |
|
| 778 | + 'e' => '!', |
|
| 779 | + 'E' => '!', |
|
| 780 | + 'H' => 'G', |
|
| 781 | + 'HH' => 'H', |
|
| 782 | + 'h' => 'g', |
|
| 783 | + 'hh' => 'h', |
|
| 784 | + 'k' => 'G', |
|
| 785 | + 'kk' => 'G', |
|
| 786 | + 'hmm' => 'gi', |
|
| 787 | + 'hmmss' => 'gis', |
|
| 788 | + 'Hmm' => 'Gi', |
|
| 789 | + 'Hmmss' => 'Gis', |
|
| 790 | + 'm' => 'i', |
|
| 791 | + 'mm' => 'i', |
|
| 792 | + 'a' => 'a', |
|
| 793 | + 'A' => 'a', |
|
| 794 | + 's' => 's', |
|
| 795 | + 'ss' => 's', |
|
| 796 | + 'S' => '*', |
|
| 797 | + 'SS' => '*', |
|
| 798 | + 'SSS' => '*', |
|
| 799 | + 'SSSS' => '*', |
|
| 800 | + 'SSSSS' => '*', |
|
| 801 | + 'SSSSSS' => 'u', |
|
| 802 | + 'SSSSSSS' => 'u*', |
|
| 803 | + 'SSSSSSSS' => 'u*', |
|
| 804 | + 'SSSSSSSSS' => 'u*', |
|
| 805 | + 'M' => 'm', |
|
| 806 | + 'MM' => 'm', |
|
| 807 | + 'MMM' => 'M', |
|
| 808 | + 'MMMM' => 'M', |
|
| 809 | + 'Mo' => 'm', |
|
| 810 | + 'Q' => '!', |
|
| 811 | + 'Qo' => '!', |
|
| 812 | + 'G' => '!', |
|
| 813 | + 'GG' => '!', |
|
| 814 | + 'GGG' => '!', |
|
| 815 | + 'GGGG' => '!', |
|
| 816 | + 'GGGGG' => '!', |
|
| 817 | + 'g' => '!', |
|
| 818 | + 'gg' => '!', |
|
| 819 | + 'ggg' => '!', |
|
| 820 | + 'gggg' => '!', |
|
| 821 | + 'ggggg' => '!', |
|
| 822 | + 'W' => '!', |
|
| 823 | + 'WW' => '!', |
|
| 824 | + 'Wo' => '!', |
|
| 825 | + 'w' => '!', |
|
| 826 | + 'ww' => '!', |
|
| 827 | + 'wo' => '!', |
|
| 828 | + 'x' => 'U???', |
|
| 829 | + 'X' => 'U', |
|
| 830 | + 'Y' => 'Y', |
|
| 831 | + 'YY' => 'y', |
|
| 832 | + 'YYYY' => 'Y', |
|
| 833 | + 'YYYYY' => 'Y', |
|
| 834 | + 'YYYYYY' => 'Y', |
|
| 835 | + 'z' => 'e', |
|
| 836 | + 'zz' => 'e', |
|
| 837 | + 'Z' => 'e', |
|
| 838 | + 'ZZ' => 'e', |
|
| 839 | + ]; |
|
| 840 | + } |
|
| 841 | + |
|
| 842 | + $format = $replacements[$code] ?? '?'; |
|
| 843 | + |
|
| 844 | + if ($format === '!') { |
|
| 845 | + throw new InvalidFormatException("Format $code not supported for creation."); |
|
| 846 | + } |
|
| 847 | + |
|
| 848 | + return $format; |
|
| 849 | + }, $format); |
|
| 850 | + |
|
| 851 | + return static::rawCreateFromFormat($format, $time, $tz); |
|
| 852 | + } |
|
| 853 | + |
|
| 854 | + /** |
|
| 855 | + * Create a Carbon instance from a specific format and a string in a given language. |
|
| 856 | + * |
|
| 857 | + * @param string $format Datetime format |
|
| 858 | + * @param string $locale |
|
| 859 | + * @param string $time |
|
| 860 | + * @param DateTimeZone|string|false|null $tz |
|
| 861 | + * |
|
| 862 | + * @throws InvalidFormatException |
|
| 863 | + * |
|
| 864 | + * @return static|false |
|
| 865 | + */ |
|
| 866 | + public static function createFromLocaleFormat($format, $locale, $time, $tz = null) |
|
| 867 | + { |
|
| 868 | + return static::rawCreateFromFormat($format, static::translateTimeString($time, $locale, 'en'), $tz); |
|
| 869 | + } |
|
| 870 | + |
|
| 871 | + /** |
|
| 872 | + * Create a Carbon instance from a specific ISO format and a string in a given language. |
|
| 873 | + * |
|
| 874 | + * @param string $format Datetime ISO format |
|
| 875 | + * @param string $locale |
|
| 876 | + * @param string $time |
|
| 877 | + * @param DateTimeZone|string|false|null $tz |
|
| 878 | + * |
|
| 879 | + * @throws InvalidFormatException |
|
| 880 | + * |
|
| 881 | + * @return static|false |
|
| 882 | + */ |
|
| 883 | + public static function createFromLocaleIsoFormat($format, $locale, $time, $tz = null) |
|
| 884 | + { |
|
| 885 | + $time = static::translateTimeString($time, $locale, 'en', CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS | CarbonInterface::TRANSLATE_MERIDIEM); |
|
| 886 | + |
|
| 887 | + return static::createFromIsoFormat($format, $time, $tz, $locale); |
|
| 888 | + } |
|
| 889 | + |
|
| 890 | + /** |
|
| 891 | + * Make a Carbon instance from given variable if possible. |
|
| 892 | + * |
|
| 893 | + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals |
|
| 894 | + * and recurrences). Throw an exception for invalid format, but otherwise return null. |
|
| 895 | + * |
|
| 896 | + * @param mixed $var |
|
| 897 | + * |
|
| 898 | + * @throws InvalidFormatException |
|
| 899 | + * |
|
| 900 | + * @return static|null |
|
| 901 | + */ |
|
| 902 | + public static function make($var) |
|
| 903 | + { |
|
| 904 | + if ($var instanceof DateTimeInterface) { |
|
| 905 | + return static::instance($var); |
|
| 906 | + } |
|
| 907 | + |
|
| 908 | + $date = null; |
|
| 909 | + |
|
| 910 | + if (\is_string($var)) { |
|
| 911 | + $var = trim($var); |
|
| 912 | + |
|
| 913 | + if (!preg_match('/^P[\dT]/', $var) && |
|
| 914 | + !preg_match('/^R\d/', $var) && |
|
| 915 | + preg_match('/[a-z\d]/i', $var) |
|
| 916 | + ) { |
|
| 917 | + $date = static::parse($var); |
|
| 918 | + } |
|
| 919 | + } |
|
| 920 | + |
|
| 921 | + return $date; |
|
| 922 | + } |
|
| 923 | + |
|
| 924 | + /** |
|
| 925 | + * Set last errors. |
|
| 926 | + * |
|
| 927 | + * @param array $lastErrors |
|
| 928 | + * |
|
| 929 | + * @return void |
|
| 930 | + */ |
|
| 931 | + private static function setLastErrors(array $lastErrors) |
|
| 932 | + { |
|
| 933 | + static::$lastErrors = $lastErrors; |
|
| 934 | + } |
|
| 935 | + |
|
| 936 | + /** |
|
| 937 | + * {@inheritdoc} |
|
| 938 | + * |
|
| 939 | + * @return array |
|
| 940 | + */ |
|
| 941 | + #[ReturnTypeWillChange] |
|
| 942 | + public static function getLastErrors() |
|
| 943 | + { |
|
| 944 | + return static::$lastErrors; |
|
| 945 | + } |
|
| 946 | 946 | } |
@@ -26,327 +26,327 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | class InstalledVersions |
| 28 | 28 | { |
| 29 | - /** |
|
| 30 | - * @var mixed[]|null |
|
| 31 | - * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null |
|
| 32 | - */ |
|
| 33 | - private static $installed; |
|
| 34 | - |
|
| 35 | - /** |
|
| 36 | - * @var bool|null |
|
| 37 | - */ |
|
| 38 | - private static $canGetVendors; |
|
| 39 | - |
|
| 40 | - /** |
|
| 41 | - * @var array[] |
|
| 42 | - * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> |
|
| 43 | - */ |
|
| 44 | - private static $installedByVendor = array(); |
|
| 45 | - |
|
| 46 | - /** |
|
| 47 | - * Returns a list of all package names which are present, either by being installed, replaced or provided |
|
| 48 | - * |
|
| 49 | - * @return string[] |
|
| 50 | - * @psalm-return list<string> |
|
| 51 | - */ |
|
| 52 | - public static function getInstalledPackages() |
|
| 53 | - { |
|
| 54 | - $packages = array(); |
|
| 55 | - foreach (self::getInstalled() as $installed) { |
|
| 56 | - $packages[] = array_keys($installed['versions']); |
|
| 57 | - } |
|
| 58 | - |
|
| 59 | - if (1 === \count($packages)) { |
|
| 60 | - return $packages[0]; |
|
| 61 | - } |
|
| 62 | - |
|
| 63 | - return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); |
|
| 64 | - } |
|
| 65 | - |
|
| 66 | - /** |
|
| 67 | - * Returns a list of all package names with a specific type e.g. 'library' |
|
| 68 | - * |
|
| 69 | - * @param string $type |
|
| 70 | - * @return string[] |
|
| 71 | - * @psalm-return list<string> |
|
| 72 | - */ |
|
| 73 | - public static function getInstalledPackagesByType($type) |
|
| 74 | - { |
|
| 75 | - $packagesByType = array(); |
|
| 76 | - |
|
| 77 | - foreach (self::getInstalled() as $installed) { |
|
| 78 | - foreach ($installed['versions'] as $name => $package) { |
|
| 79 | - if (isset($package['type']) && $package['type'] === $type) { |
|
| 80 | - $packagesByType[] = $name; |
|
| 81 | - } |
|
| 82 | - } |
|
| 83 | - } |
|
| 84 | - |
|
| 85 | - return $packagesByType; |
|
| 86 | - } |
|
| 87 | - |
|
| 88 | - /** |
|
| 89 | - * Checks whether the given package is installed |
|
| 90 | - * |
|
| 91 | - * This also returns true if the package name is provided or replaced by another package |
|
| 92 | - * |
|
| 93 | - * @param string $packageName |
|
| 94 | - * @param bool $includeDevRequirements |
|
| 95 | - * @return bool |
|
| 96 | - */ |
|
| 97 | - public static function isInstalled($packageName, $includeDevRequirements = true) |
|
| 98 | - { |
|
| 99 | - foreach (self::getInstalled() as $installed) { |
|
| 100 | - if (isset($installed['versions'][$packageName])) { |
|
| 101 | - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); |
|
| 102 | - } |
|
| 103 | - } |
|
| 104 | - |
|
| 105 | - return false; |
|
| 106 | - } |
|
| 107 | - |
|
| 108 | - /** |
|
| 109 | - * Checks whether the given package satisfies a version constraint |
|
| 110 | - * |
|
| 111 | - * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: |
|
| 112 | - * |
|
| 113 | - * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') |
|
| 114 | - * |
|
| 115 | - * @param VersionParser $parser Install composer/semver to have access to this class and functionality |
|
| 116 | - * @param string $packageName |
|
| 117 | - * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package |
|
| 118 | - * @return bool |
|
| 119 | - */ |
|
| 120 | - public static function satisfies(VersionParser $parser, $packageName, $constraint) |
|
| 121 | - { |
|
| 122 | - $constraint = $parser->parseConstraints($constraint); |
|
| 123 | - $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); |
|
| 124 | - |
|
| 125 | - return $provided->matches($constraint); |
|
| 126 | - } |
|
| 127 | - |
|
| 128 | - /** |
|
| 129 | - * Returns a version constraint representing all the range(s) which are installed for a given package |
|
| 130 | - * |
|
| 131 | - * It is easier to use this via isInstalled() with the $constraint argument if you need to check |
|
| 132 | - * whether a given version of a package is installed, and not just whether it exists |
|
| 133 | - * |
|
| 134 | - * @param string $packageName |
|
| 135 | - * @return string Version constraint usable with composer/semver |
|
| 136 | - */ |
|
| 137 | - public static function getVersionRanges($packageName) |
|
| 138 | - { |
|
| 139 | - foreach (self::getInstalled() as $installed) { |
|
| 140 | - if (!isset($installed['versions'][$packageName])) { |
|
| 141 | - continue; |
|
| 142 | - } |
|
| 143 | - |
|
| 144 | - $ranges = array(); |
|
| 145 | - if (isset($installed['versions'][$packageName]['pretty_version'])) { |
|
| 146 | - $ranges[] = $installed['versions'][$packageName]['pretty_version']; |
|
| 147 | - } |
|
| 148 | - if (array_key_exists('aliases', $installed['versions'][$packageName])) { |
|
| 149 | - $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); |
|
| 150 | - } |
|
| 151 | - if (array_key_exists('replaced', $installed['versions'][$packageName])) { |
|
| 152 | - $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); |
|
| 153 | - } |
|
| 154 | - if (array_key_exists('provided', $installed['versions'][$packageName])) { |
|
| 155 | - $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); |
|
| 156 | - } |
|
| 157 | - |
|
| 158 | - return implode(' || ', $ranges); |
|
| 159 | - } |
|
| 160 | - |
|
| 161 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 162 | - } |
|
| 163 | - |
|
| 164 | - /** |
|
| 165 | - * @param string $packageName |
|
| 166 | - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present |
|
| 167 | - */ |
|
| 168 | - public static function getVersion($packageName) |
|
| 169 | - { |
|
| 170 | - foreach (self::getInstalled() as $installed) { |
|
| 171 | - if (!isset($installed['versions'][$packageName])) { |
|
| 172 | - continue; |
|
| 173 | - } |
|
| 174 | - |
|
| 175 | - if (!isset($installed['versions'][$packageName]['version'])) { |
|
| 176 | - return null; |
|
| 177 | - } |
|
| 178 | - |
|
| 179 | - return $installed['versions'][$packageName]['version']; |
|
| 180 | - } |
|
| 181 | - |
|
| 182 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 183 | - } |
|
| 184 | - |
|
| 185 | - /** |
|
| 186 | - * @param string $packageName |
|
| 187 | - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present |
|
| 188 | - */ |
|
| 189 | - public static function getPrettyVersion($packageName) |
|
| 190 | - { |
|
| 191 | - foreach (self::getInstalled() as $installed) { |
|
| 192 | - if (!isset($installed['versions'][$packageName])) { |
|
| 193 | - continue; |
|
| 194 | - } |
|
| 195 | - |
|
| 196 | - if (!isset($installed['versions'][$packageName]['pretty_version'])) { |
|
| 197 | - return null; |
|
| 198 | - } |
|
| 199 | - |
|
| 200 | - return $installed['versions'][$packageName]['pretty_version']; |
|
| 201 | - } |
|
| 202 | - |
|
| 203 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 204 | - } |
|
| 205 | - |
|
| 206 | - /** |
|
| 207 | - * @param string $packageName |
|
| 208 | - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference |
|
| 209 | - */ |
|
| 210 | - public static function getReference($packageName) |
|
| 211 | - { |
|
| 212 | - foreach (self::getInstalled() as $installed) { |
|
| 213 | - if (!isset($installed['versions'][$packageName])) { |
|
| 214 | - continue; |
|
| 215 | - } |
|
| 216 | - |
|
| 217 | - if (!isset($installed['versions'][$packageName]['reference'])) { |
|
| 218 | - return null; |
|
| 219 | - } |
|
| 220 | - |
|
| 221 | - return $installed['versions'][$packageName]['reference']; |
|
| 222 | - } |
|
| 223 | - |
|
| 224 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 225 | - } |
|
| 226 | - |
|
| 227 | - /** |
|
| 228 | - * @param string $packageName |
|
| 229 | - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. |
|
| 230 | - */ |
|
| 231 | - public static function getInstallPath($packageName) |
|
| 232 | - { |
|
| 233 | - foreach (self::getInstalled() as $installed) { |
|
| 234 | - if (!isset($installed['versions'][$packageName])) { |
|
| 235 | - continue; |
|
| 236 | - } |
|
| 237 | - |
|
| 238 | - return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; |
|
| 239 | - } |
|
| 240 | - |
|
| 241 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 242 | - } |
|
| 243 | - |
|
| 244 | - /** |
|
| 245 | - * @return array |
|
| 246 | - * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} |
|
| 247 | - */ |
|
| 248 | - public static function getRootPackage() |
|
| 249 | - { |
|
| 250 | - $installed = self::getInstalled(); |
|
| 251 | - |
|
| 252 | - return $installed[0]['root']; |
|
| 253 | - } |
|
| 254 | - |
|
| 255 | - /** |
|
| 256 | - * Returns the raw installed.php data for custom implementations |
|
| 257 | - * |
|
| 258 | - * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. |
|
| 259 | - * @return array[] |
|
| 260 | - * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} |
|
| 261 | - */ |
|
| 262 | - public static function getRawData() |
|
| 263 | - { |
|
| 264 | - @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); |
|
| 265 | - |
|
| 266 | - if (null === self::$installed) { |
|
| 267 | - // only require the installed.php file if this file is loaded from its dumped location, |
|
| 268 | - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 |
|
| 269 | - if (substr(__DIR__, -8, 1) !== 'C') { |
|
| 270 | - self::$installed = include __DIR__ . '/installed.php'; |
|
| 271 | - } else { |
|
| 272 | - self::$installed = array(); |
|
| 273 | - } |
|
| 274 | - } |
|
| 275 | - |
|
| 276 | - return self::$installed; |
|
| 277 | - } |
|
| 278 | - |
|
| 279 | - /** |
|
| 280 | - * Returns the raw data of all installed.php which are currently loaded for custom implementations |
|
| 281 | - * |
|
| 282 | - * @return array[] |
|
| 283 | - * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> |
|
| 284 | - */ |
|
| 285 | - public static function getAllRawData() |
|
| 286 | - { |
|
| 287 | - return self::getInstalled(); |
|
| 288 | - } |
|
| 289 | - |
|
| 290 | - /** |
|
| 291 | - * Lets you reload the static array from another file |
|
| 292 | - * |
|
| 293 | - * This is only useful for complex integrations in which a project needs to use |
|
| 294 | - * this class but then also needs to execute another project's autoloader in process, |
|
| 295 | - * and wants to ensure both projects have access to their version of installed.php. |
|
| 296 | - * |
|
| 297 | - * A typical case would be PHPUnit, where it would need to make sure it reads all |
|
| 298 | - * the data it needs from this class, then call reload() with |
|
| 299 | - * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure |
|
| 300 | - * the project in which it runs can then also use this class safely, without |
|
| 301 | - * interference between PHPUnit's dependencies and the project's dependencies. |
|
| 302 | - * |
|
| 303 | - * @param array[] $data A vendor/composer/installed.php data set |
|
| 304 | - * @return void |
|
| 305 | - * |
|
| 306 | - * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data |
|
| 307 | - */ |
|
| 308 | - public static function reload($data) |
|
| 309 | - { |
|
| 310 | - self::$installed = $data; |
|
| 311 | - self::$installedByVendor = array(); |
|
| 312 | - } |
|
| 313 | - |
|
| 314 | - /** |
|
| 315 | - * @return array[] |
|
| 316 | - * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> |
|
| 317 | - */ |
|
| 318 | - private static function getInstalled() |
|
| 319 | - { |
|
| 320 | - if (null === self::$canGetVendors) { |
|
| 321 | - self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); |
|
| 322 | - } |
|
| 323 | - |
|
| 324 | - $installed = array(); |
|
| 325 | - |
|
| 326 | - if (self::$canGetVendors) { |
|
| 327 | - foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { |
|
| 328 | - if (isset(self::$installedByVendor[$vendorDir])) { |
|
| 329 | - $installed[] = self::$installedByVendor[$vendorDir]; |
|
| 330 | - } elseif (is_file($vendorDir.'/composer/installed.php')) { |
|
| 331 | - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; |
|
| 332 | - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { |
|
| 333 | - self::$installed = $installed[count($installed) - 1]; |
|
| 334 | - } |
|
| 335 | - } |
|
| 336 | - } |
|
| 337 | - } |
|
| 338 | - |
|
| 339 | - if (null === self::$installed) { |
|
| 340 | - // only require the installed.php file if this file is loaded from its dumped location, |
|
| 341 | - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 |
|
| 342 | - if (substr(__DIR__, -8, 1) !== 'C') { |
|
| 343 | - self::$installed = require __DIR__ . '/installed.php'; |
|
| 344 | - } else { |
|
| 345 | - self::$installed = array(); |
|
| 346 | - } |
|
| 347 | - } |
|
| 348 | - $installed[] = self::$installed; |
|
| 349 | - |
|
| 350 | - return $installed; |
|
| 351 | - } |
|
| 29 | + /** |
|
| 30 | + * @var mixed[]|null |
|
| 31 | + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null |
|
| 32 | + */ |
|
| 33 | + private static $installed; |
|
| 34 | + |
|
| 35 | + /** |
|
| 36 | + * @var bool|null |
|
| 37 | + */ |
|
| 38 | + private static $canGetVendors; |
|
| 39 | + |
|
| 40 | + /** |
|
| 41 | + * @var array[] |
|
| 42 | + * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> |
|
| 43 | + */ |
|
| 44 | + private static $installedByVendor = array(); |
|
| 45 | + |
|
| 46 | + /** |
|
| 47 | + * Returns a list of all package names which are present, either by being installed, replaced or provided |
|
| 48 | + * |
|
| 49 | + * @return string[] |
|
| 50 | + * @psalm-return list<string> |
|
| 51 | + */ |
|
| 52 | + public static function getInstalledPackages() |
|
| 53 | + { |
|
| 54 | + $packages = array(); |
|
| 55 | + foreach (self::getInstalled() as $installed) { |
|
| 56 | + $packages[] = array_keys($installed['versions']); |
|
| 57 | + } |
|
| 58 | + |
|
| 59 | + if (1 === \count($packages)) { |
|
| 60 | + return $packages[0]; |
|
| 61 | + } |
|
| 62 | + |
|
| 63 | + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); |
|
| 64 | + } |
|
| 65 | + |
|
| 66 | + /** |
|
| 67 | + * Returns a list of all package names with a specific type e.g. 'library' |
|
| 68 | + * |
|
| 69 | + * @param string $type |
|
| 70 | + * @return string[] |
|
| 71 | + * @psalm-return list<string> |
|
| 72 | + */ |
|
| 73 | + public static function getInstalledPackagesByType($type) |
|
| 74 | + { |
|
| 75 | + $packagesByType = array(); |
|
| 76 | + |
|
| 77 | + foreach (self::getInstalled() as $installed) { |
|
| 78 | + foreach ($installed['versions'] as $name => $package) { |
|
| 79 | + if (isset($package['type']) && $package['type'] === $type) { |
|
| 80 | + $packagesByType[] = $name; |
|
| 81 | + } |
|
| 82 | + } |
|
| 83 | + } |
|
| 84 | + |
|
| 85 | + return $packagesByType; |
|
| 86 | + } |
|
| 87 | + |
|
| 88 | + /** |
|
| 89 | + * Checks whether the given package is installed |
|
| 90 | + * |
|
| 91 | + * This also returns true if the package name is provided or replaced by another package |
|
| 92 | + * |
|
| 93 | + * @param string $packageName |
|
| 94 | + * @param bool $includeDevRequirements |
|
| 95 | + * @return bool |
|
| 96 | + */ |
|
| 97 | + public static function isInstalled($packageName, $includeDevRequirements = true) |
|
| 98 | + { |
|
| 99 | + foreach (self::getInstalled() as $installed) { |
|
| 100 | + if (isset($installed['versions'][$packageName])) { |
|
| 101 | + return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); |
|
| 102 | + } |
|
| 103 | + } |
|
| 104 | + |
|
| 105 | + return false; |
|
| 106 | + } |
|
| 107 | + |
|
| 108 | + /** |
|
| 109 | + * Checks whether the given package satisfies a version constraint |
|
| 110 | + * |
|
| 111 | + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: |
|
| 112 | + * |
|
| 113 | + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') |
|
| 114 | + * |
|
| 115 | + * @param VersionParser $parser Install composer/semver to have access to this class and functionality |
|
| 116 | + * @param string $packageName |
|
| 117 | + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package |
|
| 118 | + * @return bool |
|
| 119 | + */ |
|
| 120 | + public static function satisfies(VersionParser $parser, $packageName, $constraint) |
|
| 121 | + { |
|
| 122 | + $constraint = $parser->parseConstraints($constraint); |
|
| 123 | + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); |
|
| 124 | + |
|
| 125 | + return $provided->matches($constraint); |
|
| 126 | + } |
|
| 127 | + |
|
| 128 | + /** |
|
| 129 | + * Returns a version constraint representing all the range(s) which are installed for a given package |
|
| 130 | + * |
|
| 131 | + * It is easier to use this via isInstalled() with the $constraint argument if you need to check |
|
| 132 | + * whether a given version of a package is installed, and not just whether it exists |
|
| 133 | + * |
|
| 134 | + * @param string $packageName |
|
| 135 | + * @return string Version constraint usable with composer/semver |
|
| 136 | + */ |
|
| 137 | + public static function getVersionRanges($packageName) |
|
| 138 | + { |
|
| 139 | + foreach (self::getInstalled() as $installed) { |
|
| 140 | + if (!isset($installed['versions'][$packageName])) { |
|
| 141 | + continue; |
|
| 142 | + } |
|
| 143 | + |
|
| 144 | + $ranges = array(); |
|
| 145 | + if (isset($installed['versions'][$packageName]['pretty_version'])) { |
|
| 146 | + $ranges[] = $installed['versions'][$packageName]['pretty_version']; |
|
| 147 | + } |
|
| 148 | + if (array_key_exists('aliases', $installed['versions'][$packageName])) { |
|
| 149 | + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); |
|
| 150 | + } |
|
| 151 | + if (array_key_exists('replaced', $installed['versions'][$packageName])) { |
|
| 152 | + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); |
|
| 153 | + } |
|
| 154 | + if (array_key_exists('provided', $installed['versions'][$packageName])) { |
|
| 155 | + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); |
|
| 156 | + } |
|
| 157 | + |
|
| 158 | + return implode(' || ', $ranges); |
|
| 159 | + } |
|
| 160 | + |
|
| 161 | + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 162 | + } |
|
| 163 | + |
|
| 164 | + /** |
|
| 165 | + * @param string $packageName |
|
| 166 | + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present |
|
| 167 | + */ |
|
| 168 | + public static function getVersion($packageName) |
|
| 169 | + { |
|
| 170 | + foreach (self::getInstalled() as $installed) { |
|
| 171 | + if (!isset($installed['versions'][$packageName])) { |
|
| 172 | + continue; |
|
| 173 | + } |
|
| 174 | + |
|
| 175 | + if (!isset($installed['versions'][$packageName]['version'])) { |
|
| 176 | + return null; |
|
| 177 | + } |
|
| 178 | + |
|
| 179 | + return $installed['versions'][$packageName]['version']; |
|
| 180 | + } |
|
| 181 | + |
|
| 182 | + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 183 | + } |
|
| 184 | + |
|
| 185 | + /** |
|
| 186 | + * @param string $packageName |
|
| 187 | + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present |
|
| 188 | + */ |
|
| 189 | + public static function getPrettyVersion($packageName) |
|
| 190 | + { |
|
| 191 | + foreach (self::getInstalled() as $installed) { |
|
| 192 | + if (!isset($installed['versions'][$packageName])) { |
|
| 193 | + continue; |
|
| 194 | + } |
|
| 195 | + |
|
| 196 | + if (!isset($installed['versions'][$packageName]['pretty_version'])) { |
|
| 197 | + return null; |
|
| 198 | + } |
|
| 199 | + |
|
| 200 | + return $installed['versions'][$packageName]['pretty_version']; |
|
| 201 | + } |
|
| 202 | + |
|
| 203 | + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 204 | + } |
|
| 205 | + |
|
| 206 | + /** |
|
| 207 | + * @param string $packageName |
|
| 208 | + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference |
|
| 209 | + */ |
|
| 210 | + public static function getReference($packageName) |
|
| 211 | + { |
|
| 212 | + foreach (self::getInstalled() as $installed) { |
|
| 213 | + if (!isset($installed['versions'][$packageName])) { |
|
| 214 | + continue; |
|
| 215 | + } |
|
| 216 | + |
|
| 217 | + if (!isset($installed['versions'][$packageName]['reference'])) { |
|
| 218 | + return null; |
|
| 219 | + } |
|
| 220 | + |
|
| 221 | + return $installed['versions'][$packageName]['reference']; |
|
| 222 | + } |
|
| 223 | + |
|
| 224 | + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 225 | + } |
|
| 226 | + |
|
| 227 | + /** |
|
| 228 | + * @param string $packageName |
|
| 229 | + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. |
|
| 230 | + */ |
|
| 231 | + public static function getInstallPath($packageName) |
|
| 232 | + { |
|
| 233 | + foreach (self::getInstalled() as $installed) { |
|
| 234 | + if (!isset($installed['versions'][$packageName])) { |
|
| 235 | + continue; |
|
| 236 | + } |
|
| 237 | + |
|
| 238 | + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; |
|
| 239 | + } |
|
| 240 | + |
|
| 241 | + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 242 | + } |
|
| 243 | + |
|
| 244 | + /** |
|
| 245 | + * @return array |
|
| 246 | + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} |
|
| 247 | + */ |
|
| 248 | + public static function getRootPackage() |
|
| 249 | + { |
|
| 250 | + $installed = self::getInstalled(); |
|
| 251 | + |
|
| 252 | + return $installed[0]['root']; |
|
| 253 | + } |
|
| 254 | + |
|
| 255 | + /** |
|
| 256 | + * Returns the raw installed.php data for custom implementations |
|
| 257 | + * |
|
| 258 | + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. |
|
| 259 | + * @return array[] |
|
| 260 | + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} |
|
| 261 | + */ |
|
| 262 | + public static function getRawData() |
|
| 263 | + { |
|
| 264 | + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); |
|
| 265 | + |
|
| 266 | + if (null === self::$installed) { |
|
| 267 | + // only require the installed.php file if this file is loaded from its dumped location, |
|
| 268 | + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 |
|
| 269 | + if (substr(__DIR__, -8, 1) !== 'C') { |
|
| 270 | + self::$installed = include __DIR__ . '/installed.php'; |
|
| 271 | + } else { |
|
| 272 | + self::$installed = array(); |
|
| 273 | + } |
|
| 274 | + } |
|
| 275 | + |
|
| 276 | + return self::$installed; |
|
| 277 | + } |
|
| 278 | + |
|
| 279 | + /** |
|
| 280 | + * Returns the raw data of all installed.php which are currently loaded for custom implementations |
|
| 281 | + * |
|
| 282 | + * @return array[] |
|
| 283 | + * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> |
|
| 284 | + */ |
|
| 285 | + public static function getAllRawData() |
|
| 286 | + { |
|
| 287 | + return self::getInstalled(); |
|
| 288 | + } |
|
| 289 | + |
|
| 290 | + /** |
|
| 291 | + * Lets you reload the static array from another file |
|
| 292 | + * |
|
| 293 | + * This is only useful for complex integrations in which a project needs to use |
|
| 294 | + * this class but then also needs to execute another project's autoloader in process, |
|
| 295 | + * and wants to ensure both projects have access to their version of installed.php. |
|
| 296 | + * |
|
| 297 | + * A typical case would be PHPUnit, where it would need to make sure it reads all |
|
| 298 | + * the data it needs from this class, then call reload() with |
|
| 299 | + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure |
|
| 300 | + * the project in which it runs can then also use this class safely, without |
|
| 301 | + * interference between PHPUnit's dependencies and the project's dependencies. |
|
| 302 | + * |
|
| 303 | + * @param array[] $data A vendor/composer/installed.php data set |
|
| 304 | + * @return void |
|
| 305 | + * |
|
| 306 | + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data |
|
| 307 | + */ |
|
| 308 | + public static function reload($data) |
|
| 309 | + { |
|
| 310 | + self::$installed = $data; |
|
| 311 | + self::$installedByVendor = array(); |
|
| 312 | + } |
|
| 313 | + |
|
| 314 | + /** |
|
| 315 | + * @return array[] |
|
| 316 | + * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> |
|
| 317 | + */ |
|
| 318 | + private static function getInstalled() |
|
| 319 | + { |
|
| 320 | + if (null === self::$canGetVendors) { |
|
| 321 | + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); |
|
| 322 | + } |
|
| 323 | + |
|
| 324 | + $installed = array(); |
|
| 325 | + |
|
| 326 | + if (self::$canGetVendors) { |
|
| 327 | + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { |
|
| 328 | + if (isset(self::$installedByVendor[$vendorDir])) { |
|
| 329 | + $installed[] = self::$installedByVendor[$vendorDir]; |
|
| 330 | + } elseif (is_file($vendorDir.'/composer/installed.php')) { |
|
| 331 | + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; |
|
| 332 | + if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { |
|
| 333 | + self::$installed = $installed[count($installed) - 1]; |
|
| 334 | + } |
|
| 335 | + } |
|
| 336 | + } |
|
| 337 | + } |
|
| 338 | + |
|
| 339 | + if (null === self::$installed) { |
|
| 340 | + // only require the installed.php file if this file is loaded from its dumped location, |
|
| 341 | + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 |
|
| 342 | + if (substr(__DIR__, -8, 1) !== 'C') { |
|
| 343 | + self::$installed = require __DIR__ . '/installed.php'; |
|
| 344 | + } else { |
|
| 345 | + self::$installed = array(); |
|
| 346 | + } |
|
| 347 | + } |
|
| 348 | + $installed[] = self::$installed; |
|
| 349 | + |
|
| 350 | + return $installed; |
|
| 351 | + } |
|
| 352 | 352 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | return implode(' || ', $ranges); |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 161 | + throw new \OutOfBoundsException('Package "'.$packageName.'" is not installed'); |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /** |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | return $installed['versions'][$packageName]['version']; |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 182 | + throw new \OutOfBoundsException('Package "'.$packageName.'" is not installed'); |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | /** |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | return $installed['versions'][$packageName]['pretty_version']; |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 203 | + throw new \OutOfBoundsException('Package "'.$packageName.'" is not installed'); |
|
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | /** |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | return $installed['versions'][$packageName]['reference']; |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 224 | + throw new \OutOfBoundsException('Package "'.$packageName.'" is not installed'); |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | /** |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); |
|
| 241 | + throw new \OutOfBoundsException('Package "'.$packageName.'" is not installed'); |
|
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | /** |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | // only require the installed.php file if this file is loaded from its dumped location, |
| 268 | 268 | // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 |
| 269 | 269 | if (substr(__DIR__, -8, 1) !== 'C') { |
| 270 | - self::$installed = include __DIR__ . '/installed.php'; |
|
| 270 | + self::$installed = include __DIR__.'/installed.php'; |
|
| 271 | 271 | } else { |
| 272 | 272 | self::$installed = array(); |
| 273 | 273 | } |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | // only require the installed.php file if this file is loaded from its dumped location, |
| 341 | 341 | // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 |
| 342 | 342 | if (substr(__DIR__, -8, 1) !== 'C') { |
| 343 | - self::$installed = require __DIR__ . '/installed.php'; |
|
| 343 | + self::$installed = require __DIR__.'/installed.php'; |
|
| 344 | 344 | } else { |
| 345 | 345 | self::$installed = array(); |
| 346 | 346 | } |
@@ -6,618 +6,618 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInit4da13270269c89a28e472e1f7324e6d1 |
| 8 | 8 | { |
| 9 | - public static $files = array ( |
|
| 10 | - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', |
|
| 11 | - 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', |
|
| 12 | - '60799491728b879e74601d83e38b2cad' => __DIR__ . '/..' . '/illuminate/collections/helpers.php', |
|
| 13 | - '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', |
|
| 14 | - '72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php', |
|
| 15 | - '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', |
|
| 16 | - ); |
|
| 9 | + public static $files = array ( |
|
| 10 | + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', |
|
| 11 | + 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', |
|
| 12 | + '60799491728b879e74601d83e38b2cad' => __DIR__ . '/..' . '/illuminate/collections/helpers.php', |
|
| 13 | + '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', |
|
| 14 | + '72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php', |
|
| 15 | + '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', |
|
| 16 | + ); |
|
| 17 | 17 | |
| 18 | - public static $prefixLengthsPsr4 = array ( |
|
| 19 | - 'v' => |
|
| 20 | - array ( |
|
| 21 | - 'voku\\' => 5, |
|
| 22 | - ), |
|
| 23 | - 'p' => |
|
| 24 | - array ( |
|
| 25 | - 'phpDocumentor\\Reflection\\' => 25, |
|
| 26 | - ), |
|
| 27 | - 'W' => |
|
| 28 | - array ( |
|
| 29 | - 'Webmozart\\Assert\\' => 17, |
|
| 30 | - 'Webklex\\PHPIMAP\\' => 16, |
|
| 31 | - ), |
|
| 32 | - 'T' => |
|
| 33 | - array ( |
|
| 34 | - // 'Tests\\' => 6, |
|
| 35 | - ), |
|
| 36 | - 'S' => |
|
| 37 | - array ( |
|
| 38 | - 'Symfony\\Polyfill\\Php80\\' => 23, |
|
| 39 | - 'Symfony\\Polyfill\\Mbstring\\' => 26, |
|
| 40 | - 'Symfony\\Polyfill\\Ctype\\' => 23, |
|
| 41 | - 'Symfony\\Contracts\\Translation\\' => 30, |
|
| 42 | - 'Symfony\\Component\\Yaml\\' => 23, |
|
| 43 | - 'Symfony\\Component\\Translation\\' => 30, |
|
| 44 | - 'Symfony\\Component\\HttpFoundation\\' => 33, |
|
| 45 | - ), |
|
| 46 | - 'P' => |
|
| 47 | - array ( |
|
| 48 | - 'Psr\\SimpleCache\\' => 16, |
|
| 49 | - 'Psr\\Container\\' => 14, |
|
| 50 | - 'Prophecy\\' => 9, |
|
| 51 | - ), |
|
| 52 | - 'I' => |
|
| 53 | - array ( |
|
| 54 | - 'Illuminate\\Support\\' => 19, |
|
| 55 | - 'Illuminate\\Pagination\\' => 22, |
|
| 56 | - 'Illuminate\\Contracts\\' => 21, |
|
| 57 | - ), |
|
| 58 | - 'D' => |
|
| 59 | - array ( |
|
| 60 | - 'Doctrine\\Instantiator\\' => 22, |
|
| 61 | - 'Doctrine\\Inflector\\' => 19, |
|
| 62 | - ), |
|
| 63 | - 'C' => |
|
| 64 | - array ( |
|
| 65 | - 'Carbon\\' => 7, |
|
| 66 | - ), |
|
| 67 | - ); |
|
| 18 | + public static $prefixLengthsPsr4 = array ( |
|
| 19 | + 'v' => |
|
| 20 | + array ( |
|
| 21 | + 'voku\\' => 5, |
|
| 22 | + ), |
|
| 23 | + 'p' => |
|
| 24 | + array ( |
|
| 25 | + 'phpDocumentor\\Reflection\\' => 25, |
|
| 26 | + ), |
|
| 27 | + 'W' => |
|
| 28 | + array ( |
|
| 29 | + 'Webmozart\\Assert\\' => 17, |
|
| 30 | + 'Webklex\\PHPIMAP\\' => 16, |
|
| 31 | + ), |
|
| 32 | + 'T' => |
|
| 33 | + array ( |
|
| 34 | + // 'Tests\\' => 6, |
|
| 35 | + ), |
|
| 36 | + 'S' => |
|
| 37 | + array ( |
|
| 38 | + 'Symfony\\Polyfill\\Php80\\' => 23, |
|
| 39 | + 'Symfony\\Polyfill\\Mbstring\\' => 26, |
|
| 40 | + 'Symfony\\Polyfill\\Ctype\\' => 23, |
|
| 41 | + 'Symfony\\Contracts\\Translation\\' => 30, |
|
| 42 | + 'Symfony\\Component\\Yaml\\' => 23, |
|
| 43 | + 'Symfony\\Component\\Translation\\' => 30, |
|
| 44 | + 'Symfony\\Component\\HttpFoundation\\' => 33, |
|
| 45 | + ), |
|
| 46 | + 'P' => |
|
| 47 | + array ( |
|
| 48 | + 'Psr\\SimpleCache\\' => 16, |
|
| 49 | + 'Psr\\Container\\' => 14, |
|
| 50 | + 'Prophecy\\' => 9, |
|
| 51 | + ), |
|
| 52 | + 'I' => |
|
| 53 | + array ( |
|
| 54 | + 'Illuminate\\Support\\' => 19, |
|
| 55 | + 'Illuminate\\Pagination\\' => 22, |
|
| 56 | + 'Illuminate\\Contracts\\' => 21, |
|
| 57 | + ), |
|
| 58 | + 'D' => |
|
| 59 | + array ( |
|
| 60 | + 'Doctrine\\Instantiator\\' => 22, |
|
| 61 | + 'Doctrine\\Inflector\\' => 19, |
|
| 62 | + ), |
|
| 63 | + 'C' => |
|
| 64 | + array ( |
|
| 65 | + 'Carbon\\' => 7, |
|
| 66 | + ), |
|
| 67 | + ); |
|
| 68 | 68 | |
| 69 | - public static $prefixDirsPsr4 = array ( |
|
| 70 | - 'voku\\' => |
|
| 71 | - array ( |
|
| 72 | - 0 => __DIR__ . '/..' . '/voku/portable-ascii/src/voku', |
|
| 73 | - ), |
|
| 74 | - 'phpDocumentor\\Reflection\\' => |
|
| 75 | - array ( |
|
| 76 | - 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src', |
|
| 77 | - 1 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', |
|
| 78 | - 2 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', |
|
| 79 | - ), |
|
| 80 | - 'Webmozart\\Assert\\' => |
|
| 81 | - array ( |
|
| 82 | - 0 => __DIR__ . '/..' . '/webmozart/assert/src', |
|
| 83 | - ), |
|
| 84 | - 'Webklex\\PHPIMAP\\' => |
|
| 85 | - array ( |
|
| 86 | - 0 => __DIR__ . '/../..' . '/src', |
|
| 87 | - ), |
|
| 88 | - 'Tests\\' => |
|
| 89 | - array ( |
|
| 90 | - 0 => __DIR__ . '/../..' . '/tests', |
|
| 91 | - ), |
|
| 92 | - 'Symfony\\Polyfill\\Php80\\' => |
|
| 93 | - array ( |
|
| 94 | - 0 => __DIR__ . '/..' . '/symfony/polyfill-php80', |
|
| 95 | - ), |
|
| 96 | - 'Symfony\\Polyfill\\Mbstring\\' => |
|
| 97 | - array ( |
|
| 98 | - 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', |
|
| 99 | - ), |
|
| 100 | - 'Symfony\\Polyfill\\Ctype\\' => |
|
| 101 | - array ( |
|
| 102 | - 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', |
|
| 103 | - ), |
|
| 104 | - 'Symfony\\Contracts\\Translation\\' => |
|
| 105 | - array ( |
|
| 106 | - 0 => __DIR__ . '/..' . '/symfony/translation-contracts', |
|
| 107 | - ), |
|
| 108 | - 'Symfony\\Component\\Yaml\\' => |
|
| 109 | - array ( |
|
| 110 | - 0 => __DIR__ . '/..' . '/symfony/yaml', |
|
| 111 | - ), |
|
| 112 | - 'Symfony\\Component\\Translation\\' => |
|
| 113 | - array ( |
|
| 114 | - 0 => __DIR__ . '/..' . '/symfony/translation', |
|
| 115 | - ), |
|
| 116 | - 'Symfony\\Component\\HttpFoundation\\' => |
|
| 117 | - array ( |
|
| 118 | - 0 => __DIR__ . '/..' . '/symfony/http-foundation', |
|
| 119 | - ), |
|
| 120 | - 'Psr\\SimpleCache\\' => |
|
| 121 | - array ( |
|
| 122 | - 0 => __DIR__ . '/..' . '/psr/simple-cache/src', |
|
| 123 | - ), |
|
| 124 | - 'Psr\\Container\\' => |
|
| 125 | - array ( |
|
| 126 | - 0 => __DIR__ . '/..' . '/psr/container/src', |
|
| 127 | - ), |
|
| 128 | - 'Prophecy\\' => |
|
| 129 | - array ( |
|
| 130 | - 0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy', |
|
| 131 | - ), |
|
| 132 | - 'Illuminate\\Support\\' => |
|
| 133 | - array ( |
|
| 134 | - 0 => __DIR__ . '/..' . '/illuminate/macroable', |
|
| 135 | - 1 => __DIR__ . '/..' . '/illuminate/collections', |
|
| 136 | - 2 => __DIR__ . '/..' . '/illuminate/support', |
|
| 137 | - ), |
|
| 138 | - 'Illuminate\\Pagination\\' => |
|
| 139 | - array ( |
|
| 140 | - 0 => __DIR__ . '/..' . '/illuminate/pagination', |
|
| 141 | - ), |
|
| 142 | - 'Illuminate\\Contracts\\' => |
|
| 143 | - array ( |
|
| 144 | - 0 => __DIR__ . '/..' . '/illuminate/contracts', |
|
| 145 | - ), |
|
| 146 | - 'Doctrine\\Instantiator\\' => |
|
| 147 | - array ( |
|
| 148 | - 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator', |
|
| 149 | - ), |
|
| 150 | - 'Doctrine\\Inflector\\' => |
|
| 151 | - array ( |
|
| 152 | - 0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Inflector', |
|
| 153 | - ), |
|
| 154 | - 'Carbon\\' => |
|
| 155 | - array ( |
|
| 156 | - 0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon', |
|
| 157 | - ), |
|
| 158 | - ); |
|
| 69 | + public static $prefixDirsPsr4 = array ( |
|
| 70 | + 'voku\\' => |
|
| 71 | + array ( |
|
| 72 | + 0 => __DIR__ . '/..' . '/voku/portable-ascii/src/voku', |
|
| 73 | + ), |
|
| 74 | + 'phpDocumentor\\Reflection\\' => |
|
| 75 | + array ( |
|
| 76 | + 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src', |
|
| 77 | + 1 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', |
|
| 78 | + 2 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', |
|
| 79 | + ), |
|
| 80 | + 'Webmozart\\Assert\\' => |
|
| 81 | + array ( |
|
| 82 | + 0 => __DIR__ . '/..' . '/webmozart/assert/src', |
|
| 83 | + ), |
|
| 84 | + 'Webklex\\PHPIMAP\\' => |
|
| 85 | + array ( |
|
| 86 | + 0 => __DIR__ . '/../..' . '/src', |
|
| 87 | + ), |
|
| 88 | + 'Tests\\' => |
|
| 89 | + array ( |
|
| 90 | + 0 => __DIR__ . '/../..' . '/tests', |
|
| 91 | + ), |
|
| 92 | + 'Symfony\\Polyfill\\Php80\\' => |
|
| 93 | + array ( |
|
| 94 | + 0 => __DIR__ . '/..' . '/symfony/polyfill-php80', |
|
| 95 | + ), |
|
| 96 | + 'Symfony\\Polyfill\\Mbstring\\' => |
|
| 97 | + array ( |
|
| 98 | + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', |
|
| 99 | + ), |
|
| 100 | + 'Symfony\\Polyfill\\Ctype\\' => |
|
| 101 | + array ( |
|
| 102 | + 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', |
|
| 103 | + ), |
|
| 104 | + 'Symfony\\Contracts\\Translation\\' => |
|
| 105 | + array ( |
|
| 106 | + 0 => __DIR__ . '/..' . '/symfony/translation-contracts', |
|
| 107 | + ), |
|
| 108 | + 'Symfony\\Component\\Yaml\\' => |
|
| 109 | + array ( |
|
| 110 | + 0 => __DIR__ . '/..' . '/symfony/yaml', |
|
| 111 | + ), |
|
| 112 | + 'Symfony\\Component\\Translation\\' => |
|
| 113 | + array ( |
|
| 114 | + 0 => __DIR__ . '/..' . '/symfony/translation', |
|
| 115 | + ), |
|
| 116 | + 'Symfony\\Component\\HttpFoundation\\' => |
|
| 117 | + array ( |
|
| 118 | + 0 => __DIR__ . '/..' . '/symfony/http-foundation', |
|
| 119 | + ), |
|
| 120 | + 'Psr\\SimpleCache\\' => |
|
| 121 | + array ( |
|
| 122 | + 0 => __DIR__ . '/..' . '/psr/simple-cache/src', |
|
| 123 | + ), |
|
| 124 | + 'Psr\\Container\\' => |
|
| 125 | + array ( |
|
| 126 | + 0 => __DIR__ . '/..' . '/psr/container/src', |
|
| 127 | + ), |
|
| 128 | + 'Prophecy\\' => |
|
| 129 | + array ( |
|
| 130 | + 0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy', |
|
| 131 | + ), |
|
| 132 | + 'Illuminate\\Support\\' => |
|
| 133 | + array ( |
|
| 134 | + 0 => __DIR__ . '/..' . '/illuminate/macroable', |
|
| 135 | + 1 => __DIR__ . '/..' . '/illuminate/collections', |
|
| 136 | + 2 => __DIR__ . '/..' . '/illuminate/support', |
|
| 137 | + ), |
|
| 138 | + 'Illuminate\\Pagination\\' => |
|
| 139 | + array ( |
|
| 140 | + 0 => __DIR__ . '/..' . '/illuminate/pagination', |
|
| 141 | + ), |
|
| 142 | + 'Illuminate\\Contracts\\' => |
|
| 143 | + array ( |
|
| 144 | + 0 => __DIR__ . '/..' . '/illuminate/contracts', |
|
| 145 | + ), |
|
| 146 | + 'Doctrine\\Instantiator\\' => |
|
| 147 | + array ( |
|
| 148 | + 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator', |
|
| 149 | + ), |
|
| 150 | + 'Doctrine\\Inflector\\' => |
|
| 151 | + array ( |
|
| 152 | + 0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Inflector', |
|
| 153 | + ), |
|
| 154 | + 'Carbon\\' => |
|
| 155 | + array ( |
|
| 156 | + 0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon', |
|
| 157 | + ), |
|
| 158 | + ); |
|
| 159 | 159 | |
| 160 | - public static $classMap = array ( |
|
| 161 | - 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', |
|
| 162 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 163 | - 'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php', |
|
| 164 | - 'File_Iterator_Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php', |
|
| 165 | - 'File_Iterator_Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php', |
|
| 166 | - 'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php', |
|
| 167 | - 'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php', |
|
| 168 | - 'PHPUnit\\Framework\\BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', |
|
| 169 | - 'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Test.php', |
|
| 170 | - 'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', |
|
| 171 | - 'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestListener.php', |
|
| 172 | - 'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php', |
|
| 173 | - 'PHPUnit_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php', |
|
| 174 | - 'PHPUnit_Extensions_GroupTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', |
|
| 175 | - 'PHPUnit_Extensions_PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', |
|
| 176 | - 'PHPUnit_Extensions_PhptTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php', |
|
| 177 | - 'PHPUnit_Extensions_RepeatedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/RepeatedTest.php', |
|
| 178 | - 'PHPUnit_Extensions_TestDecorator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TestDecorator.php', |
|
| 179 | - 'PHPUnit_Extensions_TicketListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TicketListener.php', |
|
| 180 | - 'PHPUnit_Framework_Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php', |
|
| 181 | - 'PHPUnit_Framework_AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/AssertionFailedError.php', |
|
| 182 | - 'PHPUnit_Framework_BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/BaseTestListener.php', |
|
| 183 | - 'PHPUnit_Framework_CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CodeCoverageException.php', |
|
| 184 | - 'PHPUnit_Framework_Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint.php', |
|
| 185 | - 'PHPUnit_Framework_Constraint_And' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/And.php', |
|
| 186 | - 'PHPUnit_Framework_Constraint_ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', |
|
| 187 | - 'PHPUnit_Framework_Constraint_ArraySubset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php', |
|
| 188 | - 'PHPUnit_Framework_Constraint_Attribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php', |
|
| 189 | - 'PHPUnit_Framework_Constraint_Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', |
|
| 190 | - 'PHPUnit_Framework_Constraint_ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', |
|
| 191 | - 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', |
|
| 192 | - 'PHPUnit_Framework_Constraint_Composite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Composite.php', |
|
| 193 | - 'PHPUnit_Framework_Constraint_Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Count.php', |
|
| 194 | - 'PHPUnit_Framework_Constraint_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception.php', |
|
| 195 | - 'PHPUnit_Framework_Constraint_ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', |
|
| 196 | - 'PHPUnit_Framework_Constraint_ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', |
|
| 197 | - 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php', |
|
| 198 | - 'PHPUnit_Framework_Constraint_FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php', |
|
| 199 | - 'PHPUnit_Framework_Constraint_GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', |
|
| 200 | - 'PHPUnit_Framework_Constraint_IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', |
|
| 201 | - 'PHPUnit_Framework_Constraint_IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', |
|
| 202 | - 'PHPUnit_Framework_Constraint_IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', |
|
| 203 | - 'PHPUnit_Framework_Constraint_IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', |
|
| 204 | - 'PHPUnit_Framework_Constraint_IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', |
|
| 205 | - 'PHPUnit_Framework_Constraint_IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', |
|
| 206 | - 'PHPUnit_Framework_Constraint_IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', |
|
| 207 | - 'PHPUnit_Framework_Constraint_IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', |
|
| 208 | - 'PHPUnit_Framework_Constraint_IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', |
|
| 209 | - 'PHPUnit_Framework_Constraint_IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', |
|
| 210 | - 'PHPUnit_Framework_Constraint_JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', |
|
| 211 | - 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', |
|
| 212 | - 'PHPUnit_Framework_Constraint_LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php', |
|
| 213 | - 'PHPUnit_Framework_Constraint_Not' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Not.php', |
|
| 214 | - 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', |
|
| 215 | - 'PHPUnit_Framework_Constraint_Or' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Or.php', |
|
| 216 | - 'PHPUnit_Framework_Constraint_PCREMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', |
|
| 217 | - 'PHPUnit_Framework_Constraint_SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php', |
|
| 218 | - 'PHPUnit_Framework_Constraint_StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php', |
|
| 219 | - 'PHPUnit_Framework_Constraint_StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', |
|
| 220 | - 'PHPUnit_Framework_Constraint_StringMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', |
|
| 221 | - 'PHPUnit_Framework_Constraint_StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', |
|
| 222 | - 'PHPUnit_Framework_Constraint_TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', |
|
| 223 | - 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', |
|
| 224 | - 'PHPUnit_Framework_Constraint_Xor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', |
|
| 225 | - 'PHPUnit_Framework_Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error.php', |
|
| 226 | - 'PHPUnit_Framework_Error_Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', |
|
| 227 | - 'PHPUnit_Framework_Error_Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php', |
|
| 228 | - 'PHPUnit_Framework_Error_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php', |
|
| 229 | - 'PHPUnit_Framework_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception.php', |
|
| 230 | - 'PHPUnit_Framework_ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', |
|
| 231 | - 'PHPUnit_Framework_ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php', |
|
| 232 | - 'PHPUnit_Framework_IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php', |
|
| 233 | - 'PHPUnit_Framework_IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', |
|
| 234 | - 'PHPUnit_Framework_IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestError.php', |
|
| 235 | - 'PHPUnit_Framework_InvalidCoversTargetError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php', |
|
| 236 | - 'PHPUnit_Framework_InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', |
|
| 237 | - 'PHPUnit_Framework_MockObject_BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', |
|
| 238 | - 'PHPUnit_Framework_MockObject_Builder_Identity' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', |
|
| 239 | - 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', |
|
| 240 | - 'PHPUnit_Framework_MockObject_Builder_Match' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', |
|
| 241 | - 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', |
|
| 242 | - 'PHPUnit_Framework_MockObject_Builder_Namespace' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', |
|
| 243 | - 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', |
|
| 244 | - 'PHPUnit_Framework_MockObject_Builder_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', |
|
| 245 | - 'PHPUnit_Framework_MockObject_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', |
|
| 246 | - 'PHPUnit_Framework_MockObject_Generator' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', |
|
| 247 | - 'PHPUnit_Framework_MockObject_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', |
|
| 248 | - 'PHPUnit_Framework_MockObject_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', |
|
| 249 | - 'PHPUnit_Framework_MockObject_Invocation_Object' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', |
|
| 250 | - 'PHPUnit_Framework_MockObject_Invocation_Static' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', |
|
| 251 | - 'PHPUnit_Framework_MockObject_Invokable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', |
|
| 252 | - 'PHPUnit_Framework_MockObject_Matcher' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', |
|
| 253 | - 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', |
|
| 254 | - 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', |
|
| 255 | - 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', |
|
| 256 | - 'PHPUnit_Framework_MockObject_Matcher_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', |
|
| 257 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', |
|
| 258 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php', |
|
| 259 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', |
|
| 260 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php', |
|
| 261 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', |
|
| 262 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', |
|
| 263 | - 'PHPUnit_Framework_MockObject_Matcher_MethodName' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', |
|
| 264 | - 'PHPUnit_Framework_MockObject_Matcher_Parameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', |
|
| 265 | - 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', |
|
| 266 | - 'PHPUnit_Framework_MockObject_MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', |
|
| 267 | - 'PHPUnit_Framework_MockObject_MockObject' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', |
|
| 268 | - 'PHPUnit_Framework_MockObject_RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', |
|
| 269 | - 'PHPUnit_Framework_MockObject_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', |
|
| 270 | - 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', |
|
| 271 | - 'PHPUnit_Framework_MockObject_Stub_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', |
|
| 272 | - 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', |
|
| 273 | - 'PHPUnit_Framework_MockObject_Stub_Return' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', |
|
| 274 | - 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', |
|
| 275 | - 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', |
|
| 276 | - 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', |
|
| 277 | - 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', |
|
| 278 | - 'PHPUnit_Framework_MockObject_Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', |
|
| 279 | - 'PHPUnit_Framework_OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/OutputError.php', |
|
| 280 | - 'PHPUnit_Framework_RiskyTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTest.php', |
|
| 281 | - 'PHPUnit_Framework_RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTestError.php', |
|
| 282 | - 'PHPUnit_Framework_SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php', |
|
| 283 | - 'PHPUnit_Framework_SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php', |
|
| 284 | - 'PHPUnit_Framework_SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', |
|
| 285 | - 'PHPUnit_Framework_SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestError.php', |
|
| 286 | - 'PHPUnit_Framework_SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', |
|
| 287 | - 'PHPUnit_Framework_SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SyntheticError.php', |
|
| 288 | - 'PHPUnit_Framework_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php', |
|
| 289 | - 'PHPUnit_Framework_TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php', |
|
| 290 | - 'PHPUnit_Framework_TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php', |
|
| 291 | - 'PHPUnit_Framework_TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php', |
|
| 292 | - 'PHPUnit_Framework_TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php', |
|
| 293 | - 'PHPUnit_Framework_TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php', |
|
| 294 | - 'PHPUnit_Framework_TestSuite_DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', |
|
| 295 | - 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', |
|
| 296 | - 'PHPUnit_Framework_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Warning.php', |
|
| 297 | - 'PHPUnit_Runner_BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', |
|
| 298 | - 'PHPUnit_Runner_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php', |
|
| 299 | - 'PHPUnit_Runner_Filter_Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php', |
|
| 300 | - 'PHPUnit_Runner_Filter_GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group.php', |
|
| 301 | - 'PHPUnit_Runner_Filter_Group_Exclude' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', |
|
| 302 | - 'PHPUnit_Runner_Filter_Group_Include' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php', |
|
| 303 | - 'PHPUnit_Runner_Filter_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Test.php', |
|
| 304 | - 'PHPUnit_Runner_StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', |
|
| 305 | - 'PHPUnit_Runner_TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', |
|
| 306 | - 'PHPUnit_Runner_Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php', |
|
| 307 | - 'PHPUnit_TextUI_Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php', |
|
| 308 | - 'PHPUnit_TextUI_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', |
|
| 309 | - 'PHPUnit_TextUI_TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php', |
|
| 310 | - 'PHPUnit_Util_Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php', |
|
| 311 | - 'PHPUnit_Util_Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Configuration.php', |
|
| 312 | - 'PHPUnit_Util_ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php', |
|
| 313 | - 'PHPUnit_Util_Fileloader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Fileloader.php', |
|
| 314 | - 'PHPUnit_Util_Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php', |
|
| 315 | - 'PHPUnit_Util_Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php', |
|
| 316 | - 'PHPUnit_Util_Getopt' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Getopt.php', |
|
| 317 | - 'PHPUnit_Util_GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php', |
|
| 318 | - 'PHPUnit_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', |
|
| 319 | - 'PHPUnit_Util_Log_JSON' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JSON.php', |
|
| 320 | - 'PHPUnit_Util_Log_JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php', |
|
| 321 | - 'PHPUnit_Util_Log_TAP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TAP.php', |
|
| 322 | - 'PHPUnit_Util_PHP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP.php', |
|
| 323 | - 'PHPUnit_Util_PHP_Default' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Default.php', |
|
| 324 | - 'PHPUnit_Util_PHP_Windows' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Windows.php', |
|
| 325 | - 'PHPUnit_Util_Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php', |
|
| 326 | - 'PHPUnit_Util_Regex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Regex.php', |
|
| 327 | - 'PHPUnit_Util_String' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/String.php', |
|
| 328 | - 'PHPUnit_Util_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php', |
|
| 329 | - 'PHPUnit_Util_TestDox_NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', |
|
| 330 | - 'PHPUnit_Util_TestDox_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', |
|
| 331 | - 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', |
|
| 332 | - 'PHPUnit_Util_TestDox_ResultPrinter_Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', |
|
| 333 | - 'PHPUnit_Util_TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestSuiteIterator.php', |
|
| 334 | - 'PHPUnit_Util_Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php', |
|
| 335 | - 'PHPUnit_Util_XML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XML.php', |
|
| 336 | - 'PHP_CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php', |
|
| 337 | - 'PHP_CodeCoverage_Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver.php', |
|
| 338 | - 'PHP_CodeCoverage_Driver_HHVM' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php', |
|
| 339 | - 'PHP_CodeCoverage_Driver_PHPDBG' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php', |
|
| 340 | - 'PHP_CodeCoverage_Driver_Xdebug' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php', |
|
| 341 | - 'PHP_CodeCoverage_Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Exception.php', |
|
| 342 | - 'PHP_CodeCoverage_Exception_UnintentionallyCoveredCode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php', |
|
| 343 | - 'PHP_CodeCoverage_Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Filter.php', |
|
| 344 | - 'PHP_CodeCoverage_Report_Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php', |
|
| 345 | - 'PHP_CodeCoverage_Report_Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php', |
|
| 346 | - 'PHP_CodeCoverage_Report_Factory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php', |
|
| 347 | - 'PHP_CodeCoverage_Report_HTML' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php', |
|
| 348 | - 'PHP_CodeCoverage_Report_HTML_Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php', |
|
| 349 | - 'PHP_CodeCoverage_Report_HTML_Renderer_Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php', |
|
| 350 | - 'PHP_CodeCoverage_Report_HTML_Renderer_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php', |
|
| 351 | - 'PHP_CodeCoverage_Report_HTML_Renderer_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php', |
|
| 352 | - 'PHP_CodeCoverage_Report_Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php', |
|
| 353 | - 'PHP_CodeCoverage_Report_Node_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php', |
|
| 354 | - 'PHP_CodeCoverage_Report_Node_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php', |
|
| 355 | - 'PHP_CodeCoverage_Report_Node_Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php', |
|
| 356 | - 'PHP_CodeCoverage_Report_PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php', |
|
| 357 | - 'PHP_CodeCoverage_Report_Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php', |
|
| 358 | - 'PHP_CodeCoverage_Report_XML' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php', |
|
| 359 | - 'PHP_CodeCoverage_Report_XML_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php', |
|
| 360 | - 'PHP_CodeCoverage_Report_XML_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php', |
|
| 361 | - 'PHP_CodeCoverage_Report_XML_File_Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php', |
|
| 362 | - 'PHP_CodeCoverage_Report_XML_File_Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php', |
|
| 363 | - 'PHP_CodeCoverage_Report_XML_File_Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php', |
|
| 364 | - 'PHP_CodeCoverage_Report_XML_File_Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php', |
|
| 365 | - 'PHP_CodeCoverage_Report_XML_Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php', |
|
| 366 | - 'PHP_CodeCoverage_Report_XML_Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php', |
|
| 367 | - 'PHP_CodeCoverage_Report_XML_Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php', |
|
| 368 | - 'PHP_CodeCoverage_Report_XML_Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php', |
|
| 369 | - 'PHP_CodeCoverage_Util' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Util.php', |
|
| 370 | - 'PHP_CodeCoverage_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php', |
|
| 371 | - 'PHP_Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php', |
|
| 372 | - 'PHP_Token' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 373 | - 'PHP_TokenWithScope' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 374 | - 'PHP_TokenWithScopeAndVisibility' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 375 | - 'PHP_Token_ABSTRACT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 376 | - 'PHP_Token_AMPERSAND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 377 | - 'PHP_Token_AND_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 378 | - 'PHP_Token_ARRAY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 379 | - 'PHP_Token_ARRAY_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 380 | - 'PHP_Token_AS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 381 | - 'PHP_Token_ASYNC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 382 | - 'PHP_Token_AT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 383 | - 'PHP_Token_AWAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 384 | - 'PHP_Token_BACKTICK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 385 | - 'PHP_Token_BAD_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 386 | - 'PHP_Token_BOOLEAN_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 387 | - 'PHP_Token_BOOLEAN_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 388 | - 'PHP_Token_BOOL_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 389 | - 'PHP_Token_BREAK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 390 | - 'PHP_Token_CALLABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 391 | - 'PHP_Token_CARET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 392 | - 'PHP_Token_CASE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 393 | - 'PHP_Token_CATCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 394 | - 'PHP_Token_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 395 | - 'PHP_Token_CLASS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 396 | - 'PHP_Token_CLASS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 397 | - 'PHP_Token_CLASS_NAME_CONSTANT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 398 | - 'PHP_Token_CLONE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 399 | - 'PHP_Token_CLOSE_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 400 | - 'PHP_Token_CLOSE_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 401 | - 'PHP_Token_CLOSE_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 402 | - 'PHP_Token_CLOSE_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 403 | - 'PHP_Token_COALESCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 404 | - 'PHP_Token_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 405 | - 'PHP_Token_COMMA' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 406 | - 'PHP_Token_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 407 | - 'PHP_Token_COMPILER_HALT_OFFSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 408 | - 'PHP_Token_CONCAT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 409 | - 'PHP_Token_CONST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 410 | - 'PHP_Token_CONSTANT_ENCAPSED_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 411 | - 'PHP_Token_CONTINUE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 412 | - 'PHP_Token_CURLY_OPEN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 413 | - 'PHP_Token_DEC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 414 | - 'PHP_Token_DECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 415 | - 'PHP_Token_DEFAULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 416 | - 'PHP_Token_DIR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 417 | - 'PHP_Token_DIV' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 418 | - 'PHP_Token_DIV_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 419 | - 'PHP_Token_DNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 420 | - 'PHP_Token_DO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 421 | - 'PHP_Token_DOC_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 422 | - 'PHP_Token_DOLLAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 423 | - 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 424 | - 'PHP_Token_DOT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 425 | - 'PHP_Token_DOUBLE_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 426 | - 'PHP_Token_DOUBLE_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 427 | - 'PHP_Token_DOUBLE_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 428 | - 'PHP_Token_DOUBLE_QUOTES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 429 | - 'PHP_Token_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 430 | - 'PHP_Token_ELLIPSIS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 431 | - 'PHP_Token_ELSE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 432 | - 'PHP_Token_ELSEIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 433 | - 'PHP_Token_EMPTY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 434 | - 'PHP_Token_ENCAPSED_AND_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 435 | - 'PHP_Token_ENDDECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 436 | - 'PHP_Token_ENDFOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 437 | - 'PHP_Token_ENDFOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 438 | - 'PHP_Token_ENDIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 439 | - 'PHP_Token_ENDSWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 440 | - 'PHP_Token_ENDWHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 441 | - 'PHP_Token_END_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 442 | - 'PHP_Token_ENUM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 443 | - 'PHP_Token_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 444 | - 'PHP_Token_EQUALS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 445 | - 'PHP_Token_EVAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 446 | - 'PHP_Token_EXCLAMATION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 447 | - 'PHP_Token_EXIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 448 | - 'PHP_Token_EXTENDS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 449 | - 'PHP_Token_FILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 450 | - 'PHP_Token_FINAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 451 | - 'PHP_Token_FINALLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 452 | - 'PHP_Token_FOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 453 | - 'PHP_Token_FOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 454 | - 'PHP_Token_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 455 | - 'PHP_Token_FUNC_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 456 | - 'PHP_Token_GLOBAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 457 | - 'PHP_Token_GOTO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 458 | - 'PHP_Token_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 459 | - 'PHP_Token_HALT_COMPILER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 460 | - 'PHP_Token_IF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 461 | - 'PHP_Token_IMPLEMENTS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 462 | - 'PHP_Token_IN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 463 | - 'PHP_Token_INC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 464 | - 'PHP_Token_INCLUDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 465 | - 'PHP_Token_INCLUDE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 466 | - 'PHP_Token_INLINE_HTML' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 467 | - 'PHP_Token_INSTANCEOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 468 | - 'PHP_Token_INSTEADOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 469 | - 'PHP_Token_INTERFACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 470 | - 'PHP_Token_INT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 471 | - 'PHP_Token_ISSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 472 | - 'PHP_Token_IS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 473 | - 'PHP_Token_IS_GREATER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 474 | - 'PHP_Token_IS_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 475 | - 'PHP_Token_IS_NOT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 476 | - 'PHP_Token_IS_NOT_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 477 | - 'PHP_Token_IS_SMALLER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 478 | - 'PHP_Token_Includes' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 479 | - 'PHP_Token_JOIN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 480 | - 'PHP_Token_LAMBDA_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 481 | - 'PHP_Token_LAMBDA_CP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 482 | - 'PHP_Token_LAMBDA_OP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 483 | - 'PHP_Token_LINE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 484 | - 'PHP_Token_LIST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 485 | - 'PHP_Token_LNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 486 | - 'PHP_Token_LOGICAL_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 487 | - 'PHP_Token_LOGICAL_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 488 | - 'PHP_Token_LOGICAL_XOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 489 | - 'PHP_Token_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 490 | - 'PHP_Token_METHOD_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 491 | - 'PHP_Token_MINUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 492 | - 'PHP_Token_MINUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 493 | - 'PHP_Token_MOD_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 494 | - 'PHP_Token_MULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 495 | - 'PHP_Token_MUL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 496 | - 'PHP_Token_NAMESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 497 | - 'PHP_Token_NEW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 498 | - 'PHP_Token_NS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 499 | - 'PHP_Token_NS_SEPARATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 500 | - 'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 501 | - 'PHP_Token_NUM_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 502 | - 'PHP_Token_OBJECT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 503 | - 'PHP_Token_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 504 | - 'PHP_Token_ONUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 505 | - 'PHP_Token_OPEN_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 506 | - 'PHP_Token_OPEN_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 507 | - 'PHP_Token_OPEN_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 508 | - 'PHP_Token_OPEN_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 509 | - 'PHP_Token_OPEN_TAG_WITH_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 510 | - 'PHP_Token_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 511 | - 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 512 | - 'PHP_Token_PERCENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 513 | - 'PHP_Token_PIPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 514 | - 'PHP_Token_PLUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 515 | - 'PHP_Token_PLUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 516 | - 'PHP_Token_POW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 517 | - 'PHP_Token_POW_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 518 | - 'PHP_Token_PRINT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 519 | - 'PHP_Token_PRIVATE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 520 | - 'PHP_Token_PROTECTED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 521 | - 'PHP_Token_PUBLIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 522 | - 'PHP_Token_QUESTION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 523 | - 'PHP_Token_REQUIRE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 524 | - 'PHP_Token_REQUIRE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 525 | - 'PHP_Token_RETURN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 526 | - 'PHP_Token_SEMICOLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 527 | - 'PHP_Token_SHAPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 528 | - 'PHP_Token_SL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 529 | - 'PHP_Token_SL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 530 | - 'PHP_Token_SPACESHIP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 531 | - 'PHP_Token_SR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 532 | - 'PHP_Token_SR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 533 | - 'PHP_Token_START_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 534 | - 'PHP_Token_STATIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 535 | - 'PHP_Token_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 536 | - 'PHP_Token_STRING_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 537 | - 'PHP_Token_STRING_VARNAME' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 538 | - 'PHP_Token_SUPER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 539 | - 'PHP_Token_SWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 540 | - 'PHP_Token_Stream' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream.php', |
|
| 541 | - 'PHP_Token_Stream_CachingFactory' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', |
|
| 542 | - 'PHP_Token_THROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 543 | - 'PHP_Token_TILDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 544 | - 'PHP_Token_TRAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 545 | - 'PHP_Token_TRAIT_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 546 | - 'PHP_Token_TRY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 547 | - 'PHP_Token_TYPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 548 | - 'PHP_Token_TYPELIST_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 549 | - 'PHP_Token_TYPELIST_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 550 | - 'PHP_Token_UNSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 551 | - 'PHP_Token_UNSET_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 552 | - 'PHP_Token_USE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 553 | - 'PHP_Token_USE_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 554 | - 'PHP_Token_VAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 555 | - 'PHP_Token_VARIABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 556 | - 'PHP_Token_WHERE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 557 | - 'PHP_Token_WHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 558 | - 'PHP_Token_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 559 | - 'PHP_Token_XHP_ATTRIBUTE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 560 | - 'PHP_Token_XHP_CATEGORY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 561 | - 'PHP_Token_XHP_CATEGORY_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 562 | - 'PHP_Token_XHP_CHILDREN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 563 | - 'PHP_Token_XHP_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 564 | - 'PHP_Token_XHP_REQUIRED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 565 | - 'PHP_Token_XHP_TAG_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 566 | - 'PHP_Token_XHP_TAG_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 567 | - 'PHP_Token_XHP_TEXT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 568 | - 'PHP_Token_XOR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 569 | - 'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 570 | - 'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 571 | - 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', |
|
| 572 | - 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php', |
|
| 573 | - 'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php', |
|
| 574 | - 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php', |
|
| 575 | - 'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php', |
|
| 576 | - 'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php', |
|
| 577 | - 'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php', |
|
| 578 | - 'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php', |
|
| 579 | - 'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php', |
|
| 580 | - 'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php', |
|
| 581 | - 'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php', |
|
| 582 | - 'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php', |
|
| 583 | - 'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php', |
|
| 584 | - 'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php', |
|
| 585 | - 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php', |
|
| 586 | - 'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php', |
|
| 587 | - 'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php', |
|
| 588 | - 'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php', |
|
| 589 | - 'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php', |
|
| 590 | - 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php', |
|
| 591 | - 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', |
|
| 592 | - 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', |
|
| 593 | - 'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php', |
|
| 594 | - 'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php', |
|
| 595 | - 'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php', |
|
| 596 | - 'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php', |
|
| 597 | - 'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php', |
|
| 598 | - 'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__ . '/..' . '/sebastian/global-state/src/Blacklist.php', |
|
| 599 | - 'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php', |
|
| 600 | - 'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/Exception.php', |
|
| 601 | - 'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php', |
|
| 602 | - 'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/RuntimeException.php', |
|
| 603 | - 'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php', |
|
| 604 | - 'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php', |
|
| 605 | - 'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php', |
|
| 606 | - 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php', |
|
| 607 | - 'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php', |
|
| 608 | - 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', |
|
| 609 | - 'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php', |
|
| 610 | - 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', |
|
| 611 | - 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', |
|
| 612 | - ); |
|
| 160 | + public static $classMap = array ( |
|
| 161 | + 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', |
|
| 162 | + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 163 | + 'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php', |
|
| 164 | + 'File_Iterator_Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php', |
|
| 165 | + 'File_Iterator_Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php', |
|
| 166 | + 'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php', |
|
| 167 | + 'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php', |
|
| 168 | + 'PHPUnit\\Framework\\BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', |
|
| 169 | + 'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Test.php', |
|
| 170 | + 'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', |
|
| 171 | + 'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestListener.php', |
|
| 172 | + 'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php', |
|
| 173 | + 'PHPUnit_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php', |
|
| 174 | + 'PHPUnit_Extensions_GroupTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', |
|
| 175 | + 'PHPUnit_Extensions_PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', |
|
| 176 | + 'PHPUnit_Extensions_PhptTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php', |
|
| 177 | + 'PHPUnit_Extensions_RepeatedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/RepeatedTest.php', |
|
| 178 | + 'PHPUnit_Extensions_TestDecorator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TestDecorator.php', |
|
| 179 | + 'PHPUnit_Extensions_TicketListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TicketListener.php', |
|
| 180 | + 'PHPUnit_Framework_Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php', |
|
| 181 | + 'PHPUnit_Framework_AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/AssertionFailedError.php', |
|
| 182 | + 'PHPUnit_Framework_BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/BaseTestListener.php', |
|
| 183 | + 'PHPUnit_Framework_CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CodeCoverageException.php', |
|
| 184 | + 'PHPUnit_Framework_Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint.php', |
|
| 185 | + 'PHPUnit_Framework_Constraint_And' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/And.php', |
|
| 186 | + 'PHPUnit_Framework_Constraint_ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', |
|
| 187 | + 'PHPUnit_Framework_Constraint_ArraySubset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php', |
|
| 188 | + 'PHPUnit_Framework_Constraint_Attribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php', |
|
| 189 | + 'PHPUnit_Framework_Constraint_Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', |
|
| 190 | + 'PHPUnit_Framework_Constraint_ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', |
|
| 191 | + 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', |
|
| 192 | + 'PHPUnit_Framework_Constraint_Composite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Composite.php', |
|
| 193 | + 'PHPUnit_Framework_Constraint_Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Count.php', |
|
| 194 | + 'PHPUnit_Framework_Constraint_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception.php', |
|
| 195 | + 'PHPUnit_Framework_Constraint_ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', |
|
| 196 | + 'PHPUnit_Framework_Constraint_ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', |
|
| 197 | + 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php', |
|
| 198 | + 'PHPUnit_Framework_Constraint_FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php', |
|
| 199 | + 'PHPUnit_Framework_Constraint_GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', |
|
| 200 | + 'PHPUnit_Framework_Constraint_IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', |
|
| 201 | + 'PHPUnit_Framework_Constraint_IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', |
|
| 202 | + 'PHPUnit_Framework_Constraint_IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', |
|
| 203 | + 'PHPUnit_Framework_Constraint_IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', |
|
| 204 | + 'PHPUnit_Framework_Constraint_IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', |
|
| 205 | + 'PHPUnit_Framework_Constraint_IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', |
|
| 206 | + 'PHPUnit_Framework_Constraint_IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', |
|
| 207 | + 'PHPUnit_Framework_Constraint_IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', |
|
| 208 | + 'PHPUnit_Framework_Constraint_IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', |
|
| 209 | + 'PHPUnit_Framework_Constraint_IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', |
|
| 210 | + 'PHPUnit_Framework_Constraint_JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', |
|
| 211 | + 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', |
|
| 212 | + 'PHPUnit_Framework_Constraint_LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php', |
|
| 213 | + 'PHPUnit_Framework_Constraint_Not' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Not.php', |
|
| 214 | + 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', |
|
| 215 | + 'PHPUnit_Framework_Constraint_Or' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Or.php', |
|
| 216 | + 'PHPUnit_Framework_Constraint_PCREMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', |
|
| 217 | + 'PHPUnit_Framework_Constraint_SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php', |
|
| 218 | + 'PHPUnit_Framework_Constraint_StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php', |
|
| 219 | + 'PHPUnit_Framework_Constraint_StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', |
|
| 220 | + 'PHPUnit_Framework_Constraint_StringMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', |
|
| 221 | + 'PHPUnit_Framework_Constraint_StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', |
|
| 222 | + 'PHPUnit_Framework_Constraint_TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', |
|
| 223 | + 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', |
|
| 224 | + 'PHPUnit_Framework_Constraint_Xor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', |
|
| 225 | + 'PHPUnit_Framework_Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error.php', |
|
| 226 | + 'PHPUnit_Framework_Error_Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', |
|
| 227 | + 'PHPUnit_Framework_Error_Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php', |
|
| 228 | + 'PHPUnit_Framework_Error_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php', |
|
| 229 | + 'PHPUnit_Framework_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception.php', |
|
| 230 | + 'PHPUnit_Framework_ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', |
|
| 231 | + 'PHPUnit_Framework_ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php', |
|
| 232 | + 'PHPUnit_Framework_IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php', |
|
| 233 | + 'PHPUnit_Framework_IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', |
|
| 234 | + 'PHPUnit_Framework_IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestError.php', |
|
| 235 | + 'PHPUnit_Framework_InvalidCoversTargetError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php', |
|
| 236 | + 'PHPUnit_Framework_InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', |
|
| 237 | + 'PHPUnit_Framework_MockObject_BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', |
|
| 238 | + 'PHPUnit_Framework_MockObject_Builder_Identity' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', |
|
| 239 | + 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', |
|
| 240 | + 'PHPUnit_Framework_MockObject_Builder_Match' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', |
|
| 241 | + 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', |
|
| 242 | + 'PHPUnit_Framework_MockObject_Builder_Namespace' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', |
|
| 243 | + 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', |
|
| 244 | + 'PHPUnit_Framework_MockObject_Builder_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', |
|
| 245 | + 'PHPUnit_Framework_MockObject_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', |
|
| 246 | + 'PHPUnit_Framework_MockObject_Generator' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', |
|
| 247 | + 'PHPUnit_Framework_MockObject_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', |
|
| 248 | + 'PHPUnit_Framework_MockObject_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', |
|
| 249 | + 'PHPUnit_Framework_MockObject_Invocation_Object' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', |
|
| 250 | + 'PHPUnit_Framework_MockObject_Invocation_Static' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', |
|
| 251 | + 'PHPUnit_Framework_MockObject_Invokable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', |
|
| 252 | + 'PHPUnit_Framework_MockObject_Matcher' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', |
|
| 253 | + 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', |
|
| 254 | + 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', |
|
| 255 | + 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', |
|
| 256 | + 'PHPUnit_Framework_MockObject_Matcher_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', |
|
| 257 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', |
|
| 258 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php', |
|
| 259 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', |
|
| 260 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php', |
|
| 261 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', |
|
| 262 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', |
|
| 263 | + 'PHPUnit_Framework_MockObject_Matcher_MethodName' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', |
|
| 264 | + 'PHPUnit_Framework_MockObject_Matcher_Parameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', |
|
| 265 | + 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', |
|
| 266 | + 'PHPUnit_Framework_MockObject_MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', |
|
| 267 | + 'PHPUnit_Framework_MockObject_MockObject' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', |
|
| 268 | + 'PHPUnit_Framework_MockObject_RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', |
|
| 269 | + 'PHPUnit_Framework_MockObject_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', |
|
| 270 | + 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', |
|
| 271 | + 'PHPUnit_Framework_MockObject_Stub_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', |
|
| 272 | + 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', |
|
| 273 | + 'PHPUnit_Framework_MockObject_Stub_Return' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', |
|
| 274 | + 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', |
|
| 275 | + 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', |
|
| 276 | + 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', |
|
| 277 | + 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', |
|
| 278 | + 'PHPUnit_Framework_MockObject_Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', |
|
| 279 | + 'PHPUnit_Framework_OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/OutputError.php', |
|
| 280 | + 'PHPUnit_Framework_RiskyTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTest.php', |
|
| 281 | + 'PHPUnit_Framework_RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTestError.php', |
|
| 282 | + 'PHPUnit_Framework_SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php', |
|
| 283 | + 'PHPUnit_Framework_SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php', |
|
| 284 | + 'PHPUnit_Framework_SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', |
|
| 285 | + 'PHPUnit_Framework_SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestError.php', |
|
| 286 | + 'PHPUnit_Framework_SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', |
|
| 287 | + 'PHPUnit_Framework_SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SyntheticError.php', |
|
| 288 | + 'PHPUnit_Framework_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php', |
|
| 289 | + 'PHPUnit_Framework_TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php', |
|
| 290 | + 'PHPUnit_Framework_TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php', |
|
| 291 | + 'PHPUnit_Framework_TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php', |
|
| 292 | + 'PHPUnit_Framework_TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php', |
|
| 293 | + 'PHPUnit_Framework_TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php', |
|
| 294 | + 'PHPUnit_Framework_TestSuite_DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', |
|
| 295 | + 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', |
|
| 296 | + 'PHPUnit_Framework_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Warning.php', |
|
| 297 | + 'PHPUnit_Runner_BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', |
|
| 298 | + 'PHPUnit_Runner_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php', |
|
| 299 | + 'PHPUnit_Runner_Filter_Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php', |
|
| 300 | + 'PHPUnit_Runner_Filter_GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group.php', |
|
| 301 | + 'PHPUnit_Runner_Filter_Group_Exclude' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', |
|
| 302 | + 'PHPUnit_Runner_Filter_Group_Include' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php', |
|
| 303 | + 'PHPUnit_Runner_Filter_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Test.php', |
|
| 304 | + 'PHPUnit_Runner_StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', |
|
| 305 | + 'PHPUnit_Runner_TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', |
|
| 306 | + 'PHPUnit_Runner_Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php', |
|
| 307 | + 'PHPUnit_TextUI_Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php', |
|
| 308 | + 'PHPUnit_TextUI_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', |
|
| 309 | + 'PHPUnit_TextUI_TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php', |
|
| 310 | + 'PHPUnit_Util_Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php', |
|
| 311 | + 'PHPUnit_Util_Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Configuration.php', |
|
| 312 | + 'PHPUnit_Util_ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php', |
|
| 313 | + 'PHPUnit_Util_Fileloader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Fileloader.php', |
|
| 314 | + 'PHPUnit_Util_Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php', |
|
| 315 | + 'PHPUnit_Util_Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php', |
|
| 316 | + 'PHPUnit_Util_Getopt' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Getopt.php', |
|
| 317 | + 'PHPUnit_Util_GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php', |
|
| 318 | + 'PHPUnit_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', |
|
| 319 | + 'PHPUnit_Util_Log_JSON' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JSON.php', |
|
| 320 | + 'PHPUnit_Util_Log_JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php', |
|
| 321 | + 'PHPUnit_Util_Log_TAP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TAP.php', |
|
| 322 | + 'PHPUnit_Util_PHP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP.php', |
|
| 323 | + 'PHPUnit_Util_PHP_Default' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Default.php', |
|
| 324 | + 'PHPUnit_Util_PHP_Windows' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Windows.php', |
|
| 325 | + 'PHPUnit_Util_Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php', |
|
| 326 | + 'PHPUnit_Util_Regex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Regex.php', |
|
| 327 | + 'PHPUnit_Util_String' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/String.php', |
|
| 328 | + 'PHPUnit_Util_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php', |
|
| 329 | + 'PHPUnit_Util_TestDox_NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', |
|
| 330 | + 'PHPUnit_Util_TestDox_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', |
|
| 331 | + 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', |
|
| 332 | + 'PHPUnit_Util_TestDox_ResultPrinter_Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', |
|
| 333 | + 'PHPUnit_Util_TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestSuiteIterator.php', |
|
| 334 | + 'PHPUnit_Util_Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php', |
|
| 335 | + 'PHPUnit_Util_XML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XML.php', |
|
| 336 | + 'PHP_CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php', |
|
| 337 | + 'PHP_CodeCoverage_Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver.php', |
|
| 338 | + 'PHP_CodeCoverage_Driver_HHVM' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php', |
|
| 339 | + 'PHP_CodeCoverage_Driver_PHPDBG' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php', |
|
| 340 | + 'PHP_CodeCoverage_Driver_Xdebug' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php', |
|
| 341 | + 'PHP_CodeCoverage_Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Exception.php', |
|
| 342 | + 'PHP_CodeCoverage_Exception_UnintentionallyCoveredCode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php', |
|
| 343 | + 'PHP_CodeCoverage_Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Filter.php', |
|
| 344 | + 'PHP_CodeCoverage_Report_Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php', |
|
| 345 | + 'PHP_CodeCoverage_Report_Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php', |
|
| 346 | + 'PHP_CodeCoverage_Report_Factory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php', |
|
| 347 | + 'PHP_CodeCoverage_Report_HTML' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php', |
|
| 348 | + 'PHP_CodeCoverage_Report_HTML_Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php', |
|
| 349 | + 'PHP_CodeCoverage_Report_HTML_Renderer_Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php', |
|
| 350 | + 'PHP_CodeCoverage_Report_HTML_Renderer_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php', |
|
| 351 | + 'PHP_CodeCoverage_Report_HTML_Renderer_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php', |
|
| 352 | + 'PHP_CodeCoverage_Report_Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php', |
|
| 353 | + 'PHP_CodeCoverage_Report_Node_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php', |
|
| 354 | + 'PHP_CodeCoverage_Report_Node_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php', |
|
| 355 | + 'PHP_CodeCoverage_Report_Node_Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php', |
|
| 356 | + 'PHP_CodeCoverage_Report_PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php', |
|
| 357 | + 'PHP_CodeCoverage_Report_Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php', |
|
| 358 | + 'PHP_CodeCoverage_Report_XML' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php', |
|
| 359 | + 'PHP_CodeCoverage_Report_XML_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php', |
|
| 360 | + 'PHP_CodeCoverage_Report_XML_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php', |
|
| 361 | + 'PHP_CodeCoverage_Report_XML_File_Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php', |
|
| 362 | + 'PHP_CodeCoverage_Report_XML_File_Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php', |
|
| 363 | + 'PHP_CodeCoverage_Report_XML_File_Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php', |
|
| 364 | + 'PHP_CodeCoverage_Report_XML_File_Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php', |
|
| 365 | + 'PHP_CodeCoverage_Report_XML_Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php', |
|
| 366 | + 'PHP_CodeCoverage_Report_XML_Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php', |
|
| 367 | + 'PHP_CodeCoverage_Report_XML_Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php', |
|
| 368 | + 'PHP_CodeCoverage_Report_XML_Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php', |
|
| 369 | + 'PHP_CodeCoverage_Util' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Util.php', |
|
| 370 | + 'PHP_CodeCoverage_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php', |
|
| 371 | + 'PHP_Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php', |
|
| 372 | + 'PHP_Token' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 373 | + 'PHP_TokenWithScope' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 374 | + 'PHP_TokenWithScopeAndVisibility' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 375 | + 'PHP_Token_ABSTRACT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 376 | + 'PHP_Token_AMPERSAND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 377 | + 'PHP_Token_AND_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 378 | + 'PHP_Token_ARRAY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 379 | + 'PHP_Token_ARRAY_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 380 | + 'PHP_Token_AS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 381 | + 'PHP_Token_ASYNC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 382 | + 'PHP_Token_AT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 383 | + 'PHP_Token_AWAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 384 | + 'PHP_Token_BACKTICK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 385 | + 'PHP_Token_BAD_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 386 | + 'PHP_Token_BOOLEAN_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 387 | + 'PHP_Token_BOOLEAN_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 388 | + 'PHP_Token_BOOL_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 389 | + 'PHP_Token_BREAK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 390 | + 'PHP_Token_CALLABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 391 | + 'PHP_Token_CARET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 392 | + 'PHP_Token_CASE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 393 | + 'PHP_Token_CATCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 394 | + 'PHP_Token_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 395 | + 'PHP_Token_CLASS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 396 | + 'PHP_Token_CLASS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 397 | + 'PHP_Token_CLASS_NAME_CONSTANT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 398 | + 'PHP_Token_CLONE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 399 | + 'PHP_Token_CLOSE_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 400 | + 'PHP_Token_CLOSE_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 401 | + 'PHP_Token_CLOSE_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 402 | + 'PHP_Token_CLOSE_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 403 | + 'PHP_Token_COALESCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 404 | + 'PHP_Token_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 405 | + 'PHP_Token_COMMA' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 406 | + 'PHP_Token_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 407 | + 'PHP_Token_COMPILER_HALT_OFFSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 408 | + 'PHP_Token_CONCAT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 409 | + 'PHP_Token_CONST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 410 | + 'PHP_Token_CONSTANT_ENCAPSED_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 411 | + 'PHP_Token_CONTINUE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 412 | + 'PHP_Token_CURLY_OPEN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 413 | + 'PHP_Token_DEC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 414 | + 'PHP_Token_DECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 415 | + 'PHP_Token_DEFAULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 416 | + 'PHP_Token_DIR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 417 | + 'PHP_Token_DIV' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 418 | + 'PHP_Token_DIV_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 419 | + 'PHP_Token_DNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 420 | + 'PHP_Token_DO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 421 | + 'PHP_Token_DOC_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 422 | + 'PHP_Token_DOLLAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 423 | + 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 424 | + 'PHP_Token_DOT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 425 | + 'PHP_Token_DOUBLE_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 426 | + 'PHP_Token_DOUBLE_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 427 | + 'PHP_Token_DOUBLE_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 428 | + 'PHP_Token_DOUBLE_QUOTES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 429 | + 'PHP_Token_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 430 | + 'PHP_Token_ELLIPSIS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 431 | + 'PHP_Token_ELSE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 432 | + 'PHP_Token_ELSEIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 433 | + 'PHP_Token_EMPTY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 434 | + 'PHP_Token_ENCAPSED_AND_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 435 | + 'PHP_Token_ENDDECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 436 | + 'PHP_Token_ENDFOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 437 | + 'PHP_Token_ENDFOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 438 | + 'PHP_Token_ENDIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 439 | + 'PHP_Token_ENDSWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 440 | + 'PHP_Token_ENDWHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 441 | + 'PHP_Token_END_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 442 | + 'PHP_Token_ENUM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 443 | + 'PHP_Token_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 444 | + 'PHP_Token_EQUALS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 445 | + 'PHP_Token_EVAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 446 | + 'PHP_Token_EXCLAMATION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 447 | + 'PHP_Token_EXIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 448 | + 'PHP_Token_EXTENDS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 449 | + 'PHP_Token_FILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 450 | + 'PHP_Token_FINAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 451 | + 'PHP_Token_FINALLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 452 | + 'PHP_Token_FOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 453 | + 'PHP_Token_FOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 454 | + 'PHP_Token_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 455 | + 'PHP_Token_FUNC_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 456 | + 'PHP_Token_GLOBAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 457 | + 'PHP_Token_GOTO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 458 | + 'PHP_Token_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 459 | + 'PHP_Token_HALT_COMPILER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 460 | + 'PHP_Token_IF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 461 | + 'PHP_Token_IMPLEMENTS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 462 | + 'PHP_Token_IN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 463 | + 'PHP_Token_INC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 464 | + 'PHP_Token_INCLUDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 465 | + 'PHP_Token_INCLUDE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 466 | + 'PHP_Token_INLINE_HTML' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 467 | + 'PHP_Token_INSTANCEOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 468 | + 'PHP_Token_INSTEADOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 469 | + 'PHP_Token_INTERFACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 470 | + 'PHP_Token_INT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 471 | + 'PHP_Token_ISSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 472 | + 'PHP_Token_IS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 473 | + 'PHP_Token_IS_GREATER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 474 | + 'PHP_Token_IS_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 475 | + 'PHP_Token_IS_NOT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 476 | + 'PHP_Token_IS_NOT_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 477 | + 'PHP_Token_IS_SMALLER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 478 | + 'PHP_Token_Includes' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 479 | + 'PHP_Token_JOIN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 480 | + 'PHP_Token_LAMBDA_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 481 | + 'PHP_Token_LAMBDA_CP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 482 | + 'PHP_Token_LAMBDA_OP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 483 | + 'PHP_Token_LINE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 484 | + 'PHP_Token_LIST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 485 | + 'PHP_Token_LNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 486 | + 'PHP_Token_LOGICAL_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 487 | + 'PHP_Token_LOGICAL_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 488 | + 'PHP_Token_LOGICAL_XOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 489 | + 'PHP_Token_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 490 | + 'PHP_Token_METHOD_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 491 | + 'PHP_Token_MINUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 492 | + 'PHP_Token_MINUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 493 | + 'PHP_Token_MOD_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 494 | + 'PHP_Token_MULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 495 | + 'PHP_Token_MUL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 496 | + 'PHP_Token_NAMESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 497 | + 'PHP_Token_NEW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 498 | + 'PHP_Token_NS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 499 | + 'PHP_Token_NS_SEPARATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 500 | + 'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 501 | + 'PHP_Token_NUM_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 502 | + 'PHP_Token_OBJECT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 503 | + 'PHP_Token_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 504 | + 'PHP_Token_ONUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 505 | + 'PHP_Token_OPEN_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 506 | + 'PHP_Token_OPEN_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 507 | + 'PHP_Token_OPEN_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 508 | + 'PHP_Token_OPEN_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 509 | + 'PHP_Token_OPEN_TAG_WITH_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 510 | + 'PHP_Token_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 511 | + 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 512 | + 'PHP_Token_PERCENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 513 | + 'PHP_Token_PIPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 514 | + 'PHP_Token_PLUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 515 | + 'PHP_Token_PLUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 516 | + 'PHP_Token_POW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 517 | + 'PHP_Token_POW_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 518 | + 'PHP_Token_PRINT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 519 | + 'PHP_Token_PRIVATE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 520 | + 'PHP_Token_PROTECTED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 521 | + 'PHP_Token_PUBLIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 522 | + 'PHP_Token_QUESTION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 523 | + 'PHP_Token_REQUIRE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 524 | + 'PHP_Token_REQUIRE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 525 | + 'PHP_Token_RETURN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 526 | + 'PHP_Token_SEMICOLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 527 | + 'PHP_Token_SHAPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 528 | + 'PHP_Token_SL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 529 | + 'PHP_Token_SL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 530 | + 'PHP_Token_SPACESHIP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 531 | + 'PHP_Token_SR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 532 | + 'PHP_Token_SR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 533 | + 'PHP_Token_START_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 534 | + 'PHP_Token_STATIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 535 | + 'PHP_Token_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 536 | + 'PHP_Token_STRING_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 537 | + 'PHP_Token_STRING_VARNAME' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 538 | + 'PHP_Token_SUPER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 539 | + 'PHP_Token_SWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 540 | + 'PHP_Token_Stream' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream.php', |
|
| 541 | + 'PHP_Token_Stream_CachingFactory' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', |
|
| 542 | + 'PHP_Token_THROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 543 | + 'PHP_Token_TILDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 544 | + 'PHP_Token_TRAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 545 | + 'PHP_Token_TRAIT_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 546 | + 'PHP_Token_TRY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 547 | + 'PHP_Token_TYPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 548 | + 'PHP_Token_TYPELIST_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 549 | + 'PHP_Token_TYPELIST_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 550 | + 'PHP_Token_UNSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 551 | + 'PHP_Token_UNSET_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 552 | + 'PHP_Token_USE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 553 | + 'PHP_Token_USE_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 554 | + 'PHP_Token_VAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 555 | + 'PHP_Token_VARIABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 556 | + 'PHP_Token_WHERE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 557 | + 'PHP_Token_WHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 558 | + 'PHP_Token_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 559 | + 'PHP_Token_XHP_ATTRIBUTE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 560 | + 'PHP_Token_XHP_CATEGORY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 561 | + 'PHP_Token_XHP_CATEGORY_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 562 | + 'PHP_Token_XHP_CHILDREN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 563 | + 'PHP_Token_XHP_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 564 | + 'PHP_Token_XHP_REQUIRED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 565 | + 'PHP_Token_XHP_TAG_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 566 | + 'PHP_Token_XHP_TAG_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 567 | + 'PHP_Token_XHP_TEXT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 568 | + 'PHP_Token_XOR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 569 | + 'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 570 | + 'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 571 | + 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', |
|
| 572 | + 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php', |
|
| 573 | + 'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php', |
|
| 574 | + 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php', |
|
| 575 | + 'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php', |
|
| 576 | + 'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php', |
|
| 577 | + 'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php', |
|
| 578 | + 'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php', |
|
| 579 | + 'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php', |
|
| 580 | + 'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php', |
|
| 581 | + 'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php', |
|
| 582 | + 'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php', |
|
| 583 | + 'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php', |
|
| 584 | + 'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php', |
|
| 585 | + 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php', |
|
| 586 | + 'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php', |
|
| 587 | + 'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php', |
|
| 588 | + 'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php', |
|
| 589 | + 'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php', |
|
| 590 | + 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php', |
|
| 591 | + 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', |
|
| 592 | + 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', |
|
| 593 | + 'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php', |
|
| 594 | + 'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php', |
|
| 595 | + 'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php', |
|
| 596 | + 'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php', |
|
| 597 | + 'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php', |
|
| 598 | + 'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__ . '/..' . '/sebastian/global-state/src/Blacklist.php', |
|
| 599 | + 'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php', |
|
| 600 | + 'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/Exception.php', |
|
| 601 | + 'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php', |
|
| 602 | + 'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/RuntimeException.php', |
|
| 603 | + 'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php', |
|
| 604 | + 'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php', |
|
| 605 | + 'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php', |
|
| 606 | + 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php', |
|
| 607 | + 'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php', |
|
| 608 | + 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', |
|
| 609 | + 'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php', |
|
| 610 | + 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', |
|
| 611 | + 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', |
|
| 612 | + ); |
|
| 613 | 613 | |
| 614 | - public static function getInitializer(ClassLoader $loader) |
|
| 615 | - { |
|
| 616 | - return \Closure::bind(function () use ($loader) { |
|
| 617 | - $loader->prefixLengthsPsr4 = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$prefixLengthsPsr4; |
|
| 618 | - $loader->prefixDirsPsr4 = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$prefixDirsPsr4; |
|
| 619 | - $loader->classMap = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$classMap; |
|
| 614 | + public static function getInitializer(ClassLoader $loader) |
|
| 615 | + { |
|
| 616 | + return \Closure::bind(function () use ($loader) { |
|
| 617 | + $loader->prefixLengthsPsr4 = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$prefixLengthsPsr4; |
|
| 618 | + $loader->prefixDirsPsr4 = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$prefixDirsPsr4; |
|
| 619 | + $loader->classMap = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$classMap; |
|
| 620 | 620 | |
| 621 | - }, null, ClassLoader::class); |
|
| 622 | - } |
|
| 621 | + }, null, ClassLoader::class); |
|
| 622 | + } |
|
| 623 | 623 | } |
@@ -6,35 +6,35 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInit4da13270269c89a28e472e1f7324e6d1 |
| 8 | 8 | { |
| 9 | - public static $files = array ( |
|
| 10 | - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', |
|
| 11 | - 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', |
|
| 12 | - '60799491728b879e74601d83e38b2cad' => __DIR__ . '/..' . '/illuminate/collections/helpers.php', |
|
| 13 | - '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', |
|
| 14 | - '72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php', |
|
| 15 | - '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', |
|
| 9 | + public static $files = array( |
|
| 10 | + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__.'/..'.'/symfony/polyfill-mbstring/bootstrap.php', |
|
| 11 | + 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__.'/..'.'/symfony/polyfill-php80/bootstrap.php', |
|
| 12 | + '60799491728b879e74601d83e38b2cad' => __DIR__.'/..'.'/illuminate/collections/helpers.php', |
|
| 13 | + '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__.'/..'.'/symfony/polyfill-ctype/bootstrap.php', |
|
| 14 | + '72579e7bd17821bb1321b87411366eae' => __DIR__.'/..'.'/illuminate/support/helpers.php', |
|
| 15 | + '6e3fae29631ef280660b3cdad06f25a8' => __DIR__.'/..'.'/symfony/deprecation-contracts/function.php', |
|
| 16 | 16 | ); |
| 17 | 17 | |
| 18 | - public static $prefixLengthsPsr4 = array ( |
|
| 18 | + public static $prefixLengthsPsr4 = array( |
|
| 19 | 19 | 'v' => |
| 20 | - array ( |
|
| 20 | + array( |
|
| 21 | 21 | 'voku\\' => 5, |
| 22 | 22 | ), |
| 23 | 23 | 'p' => |
| 24 | - array ( |
|
| 24 | + array( |
|
| 25 | 25 | 'phpDocumentor\\Reflection\\' => 25, |
| 26 | 26 | ), |
| 27 | 27 | 'W' => |
| 28 | - array ( |
|
| 28 | + array( |
|
| 29 | 29 | 'Webmozart\\Assert\\' => 17, |
| 30 | 30 | 'Webklex\\PHPIMAP\\' => 16, |
| 31 | 31 | ), |
| 32 | 32 | 'T' => |
| 33 | - array ( |
|
| 33 | + array( |
|
| 34 | 34 | // 'Tests\\' => 6, |
| 35 | 35 | ), |
| 36 | 36 | 'S' => |
| 37 | - array ( |
|
| 37 | + array( |
|
| 38 | 38 | 'Symfony\\Polyfill\\Php80\\' => 23, |
| 39 | 39 | 'Symfony\\Polyfill\\Mbstring\\' => 26, |
| 40 | 40 | 'Symfony\\Polyfill\\Ctype\\' => 23, |
@@ -44,576 +44,576 @@ discard block |
||
| 44 | 44 | 'Symfony\\Component\\HttpFoundation\\' => 33, |
| 45 | 45 | ), |
| 46 | 46 | 'P' => |
| 47 | - array ( |
|
| 47 | + array( |
|
| 48 | 48 | 'Psr\\SimpleCache\\' => 16, |
| 49 | 49 | 'Psr\\Container\\' => 14, |
| 50 | 50 | 'Prophecy\\' => 9, |
| 51 | 51 | ), |
| 52 | 52 | 'I' => |
| 53 | - array ( |
|
| 53 | + array( |
|
| 54 | 54 | 'Illuminate\\Support\\' => 19, |
| 55 | 55 | 'Illuminate\\Pagination\\' => 22, |
| 56 | 56 | 'Illuminate\\Contracts\\' => 21, |
| 57 | 57 | ), |
| 58 | 58 | 'D' => |
| 59 | - array ( |
|
| 59 | + array( |
|
| 60 | 60 | 'Doctrine\\Instantiator\\' => 22, |
| 61 | 61 | 'Doctrine\\Inflector\\' => 19, |
| 62 | 62 | ), |
| 63 | 63 | 'C' => |
| 64 | - array ( |
|
| 64 | + array( |
|
| 65 | 65 | 'Carbon\\' => 7, |
| 66 | 66 | ), |
| 67 | 67 | ); |
| 68 | 68 | |
| 69 | - public static $prefixDirsPsr4 = array ( |
|
| 69 | + public static $prefixDirsPsr4 = array( |
|
| 70 | 70 | 'voku\\' => |
| 71 | - array ( |
|
| 72 | - 0 => __DIR__ . '/..' . '/voku/portable-ascii/src/voku', |
|
| 71 | + array( |
|
| 72 | + 0 => __DIR__.'/..'.'/voku/portable-ascii/src/voku', |
|
| 73 | 73 | ), |
| 74 | 74 | 'phpDocumentor\\Reflection\\' => |
| 75 | - array ( |
|
| 76 | - 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src', |
|
| 77 | - 1 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', |
|
| 78 | - 2 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', |
|
| 75 | + array( |
|
| 76 | + 0 => __DIR__.'/..'.'/phpdocumentor/reflection-common/src', |
|
| 77 | + 1 => __DIR__.'/..'.'/phpdocumentor/type-resolver/src', |
|
| 78 | + 2 => __DIR__.'/..'.'/phpdocumentor/reflection-docblock/src', |
|
| 79 | 79 | ), |
| 80 | 80 | 'Webmozart\\Assert\\' => |
| 81 | - array ( |
|
| 82 | - 0 => __DIR__ . '/..' . '/webmozart/assert/src', |
|
| 81 | + array( |
|
| 82 | + 0 => __DIR__.'/..'.'/webmozart/assert/src', |
|
| 83 | 83 | ), |
| 84 | 84 | 'Webklex\\PHPIMAP\\' => |
| 85 | - array ( |
|
| 86 | - 0 => __DIR__ . '/../..' . '/src', |
|
| 85 | + array( |
|
| 86 | + 0 => __DIR__.'/../..'.'/src', |
|
| 87 | 87 | ), |
| 88 | 88 | 'Tests\\' => |
| 89 | - array ( |
|
| 90 | - 0 => __DIR__ . '/../..' . '/tests', |
|
| 89 | + array( |
|
| 90 | + 0 => __DIR__.'/../..'.'/tests', |
|
| 91 | 91 | ), |
| 92 | 92 | 'Symfony\\Polyfill\\Php80\\' => |
| 93 | - array ( |
|
| 94 | - 0 => __DIR__ . '/..' . '/symfony/polyfill-php80', |
|
| 93 | + array( |
|
| 94 | + 0 => __DIR__.'/..'.'/symfony/polyfill-php80', |
|
| 95 | 95 | ), |
| 96 | 96 | 'Symfony\\Polyfill\\Mbstring\\' => |
| 97 | - array ( |
|
| 98 | - 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', |
|
| 97 | + array( |
|
| 98 | + 0 => __DIR__.'/..'.'/symfony/polyfill-mbstring', |
|
| 99 | 99 | ), |
| 100 | 100 | 'Symfony\\Polyfill\\Ctype\\' => |
| 101 | - array ( |
|
| 102 | - 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', |
|
| 101 | + array( |
|
| 102 | + 0 => __DIR__.'/..'.'/symfony/polyfill-ctype', |
|
| 103 | 103 | ), |
| 104 | 104 | 'Symfony\\Contracts\\Translation\\' => |
| 105 | - array ( |
|
| 106 | - 0 => __DIR__ . '/..' . '/symfony/translation-contracts', |
|
| 105 | + array( |
|
| 106 | + 0 => __DIR__.'/..'.'/symfony/translation-contracts', |
|
| 107 | 107 | ), |
| 108 | 108 | 'Symfony\\Component\\Yaml\\' => |
| 109 | - array ( |
|
| 110 | - 0 => __DIR__ . '/..' . '/symfony/yaml', |
|
| 109 | + array( |
|
| 110 | + 0 => __DIR__.'/..'.'/symfony/yaml', |
|
| 111 | 111 | ), |
| 112 | 112 | 'Symfony\\Component\\Translation\\' => |
| 113 | - array ( |
|
| 114 | - 0 => __DIR__ . '/..' . '/symfony/translation', |
|
| 113 | + array( |
|
| 114 | + 0 => __DIR__.'/..'.'/symfony/translation', |
|
| 115 | 115 | ), |
| 116 | 116 | 'Symfony\\Component\\HttpFoundation\\' => |
| 117 | - array ( |
|
| 118 | - 0 => __DIR__ . '/..' . '/symfony/http-foundation', |
|
| 117 | + array( |
|
| 118 | + 0 => __DIR__.'/..'.'/symfony/http-foundation', |
|
| 119 | 119 | ), |
| 120 | 120 | 'Psr\\SimpleCache\\' => |
| 121 | - array ( |
|
| 122 | - 0 => __DIR__ . '/..' . '/psr/simple-cache/src', |
|
| 121 | + array( |
|
| 122 | + 0 => __DIR__.'/..'.'/psr/simple-cache/src', |
|
| 123 | 123 | ), |
| 124 | 124 | 'Psr\\Container\\' => |
| 125 | - array ( |
|
| 126 | - 0 => __DIR__ . '/..' . '/psr/container/src', |
|
| 125 | + array( |
|
| 126 | + 0 => __DIR__.'/..'.'/psr/container/src', |
|
| 127 | 127 | ), |
| 128 | 128 | 'Prophecy\\' => |
| 129 | - array ( |
|
| 130 | - 0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy', |
|
| 129 | + array( |
|
| 130 | + 0 => __DIR__.'/..'.'/phpspec/prophecy/src/Prophecy', |
|
| 131 | 131 | ), |
| 132 | 132 | 'Illuminate\\Support\\' => |
| 133 | - array ( |
|
| 134 | - 0 => __DIR__ . '/..' . '/illuminate/macroable', |
|
| 135 | - 1 => __DIR__ . '/..' . '/illuminate/collections', |
|
| 136 | - 2 => __DIR__ . '/..' . '/illuminate/support', |
|
| 133 | + array( |
|
| 134 | + 0 => __DIR__.'/..'.'/illuminate/macroable', |
|
| 135 | + 1 => __DIR__.'/..'.'/illuminate/collections', |
|
| 136 | + 2 => __DIR__.'/..'.'/illuminate/support', |
|
| 137 | 137 | ), |
| 138 | 138 | 'Illuminate\\Pagination\\' => |
| 139 | - array ( |
|
| 140 | - 0 => __DIR__ . '/..' . '/illuminate/pagination', |
|
| 139 | + array( |
|
| 140 | + 0 => __DIR__.'/..'.'/illuminate/pagination', |
|
| 141 | 141 | ), |
| 142 | 142 | 'Illuminate\\Contracts\\' => |
| 143 | - array ( |
|
| 144 | - 0 => __DIR__ . '/..' . '/illuminate/contracts', |
|
| 143 | + array( |
|
| 144 | + 0 => __DIR__.'/..'.'/illuminate/contracts', |
|
| 145 | 145 | ), |
| 146 | 146 | 'Doctrine\\Instantiator\\' => |
| 147 | - array ( |
|
| 148 | - 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator', |
|
| 147 | + array( |
|
| 148 | + 0 => __DIR__.'/..'.'/doctrine/instantiator/src/Doctrine/Instantiator', |
|
| 149 | 149 | ), |
| 150 | 150 | 'Doctrine\\Inflector\\' => |
| 151 | - array ( |
|
| 152 | - 0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Inflector', |
|
| 151 | + array( |
|
| 152 | + 0 => __DIR__.'/..'.'/doctrine/inflector/lib/Doctrine/Inflector', |
|
| 153 | 153 | ), |
| 154 | 154 | 'Carbon\\' => |
| 155 | - array ( |
|
| 156 | - 0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon', |
|
| 155 | + array( |
|
| 156 | + 0 => __DIR__.'/..'.'/nesbot/carbon/src/Carbon', |
|
| 157 | 157 | ), |
| 158 | 158 | ); |
| 159 | 159 | |
| 160 | - public static $classMap = array ( |
|
| 161 | - 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', |
|
| 162 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 163 | - 'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php', |
|
| 164 | - 'File_Iterator_Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php', |
|
| 165 | - 'File_Iterator_Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php', |
|
| 166 | - 'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php', |
|
| 167 | - 'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php', |
|
| 168 | - 'PHPUnit\\Framework\\BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', |
|
| 169 | - 'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Test.php', |
|
| 170 | - 'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', |
|
| 171 | - 'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestListener.php', |
|
| 172 | - 'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php', |
|
| 173 | - 'PHPUnit_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php', |
|
| 174 | - 'PHPUnit_Extensions_GroupTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', |
|
| 175 | - 'PHPUnit_Extensions_PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', |
|
| 176 | - 'PHPUnit_Extensions_PhptTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php', |
|
| 177 | - 'PHPUnit_Extensions_RepeatedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/RepeatedTest.php', |
|
| 178 | - 'PHPUnit_Extensions_TestDecorator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TestDecorator.php', |
|
| 179 | - 'PHPUnit_Extensions_TicketListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TicketListener.php', |
|
| 180 | - 'PHPUnit_Framework_Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php', |
|
| 181 | - 'PHPUnit_Framework_AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/AssertionFailedError.php', |
|
| 182 | - 'PHPUnit_Framework_BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/BaseTestListener.php', |
|
| 183 | - 'PHPUnit_Framework_CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CodeCoverageException.php', |
|
| 184 | - 'PHPUnit_Framework_Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint.php', |
|
| 185 | - 'PHPUnit_Framework_Constraint_And' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/And.php', |
|
| 186 | - 'PHPUnit_Framework_Constraint_ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', |
|
| 187 | - 'PHPUnit_Framework_Constraint_ArraySubset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php', |
|
| 188 | - 'PHPUnit_Framework_Constraint_Attribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php', |
|
| 189 | - 'PHPUnit_Framework_Constraint_Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', |
|
| 190 | - 'PHPUnit_Framework_Constraint_ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', |
|
| 191 | - 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', |
|
| 192 | - 'PHPUnit_Framework_Constraint_Composite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Composite.php', |
|
| 193 | - 'PHPUnit_Framework_Constraint_Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Count.php', |
|
| 194 | - 'PHPUnit_Framework_Constraint_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception.php', |
|
| 195 | - 'PHPUnit_Framework_Constraint_ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', |
|
| 196 | - 'PHPUnit_Framework_Constraint_ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', |
|
| 197 | - 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php', |
|
| 198 | - 'PHPUnit_Framework_Constraint_FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php', |
|
| 199 | - 'PHPUnit_Framework_Constraint_GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', |
|
| 200 | - 'PHPUnit_Framework_Constraint_IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', |
|
| 201 | - 'PHPUnit_Framework_Constraint_IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', |
|
| 202 | - 'PHPUnit_Framework_Constraint_IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', |
|
| 203 | - 'PHPUnit_Framework_Constraint_IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', |
|
| 204 | - 'PHPUnit_Framework_Constraint_IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', |
|
| 205 | - 'PHPUnit_Framework_Constraint_IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', |
|
| 206 | - 'PHPUnit_Framework_Constraint_IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', |
|
| 207 | - 'PHPUnit_Framework_Constraint_IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', |
|
| 208 | - 'PHPUnit_Framework_Constraint_IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', |
|
| 209 | - 'PHPUnit_Framework_Constraint_IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', |
|
| 210 | - 'PHPUnit_Framework_Constraint_JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', |
|
| 211 | - 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', |
|
| 212 | - 'PHPUnit_Framework_Constraint_LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php', |
|
| 213 | - 'PHPUnit_Framework_Constraint_Not' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Not.php', |
|
| 214 | - 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', |
|
| 215 | - 'PHPUnit_Framework_Constraint_Or' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Or.php', |
|
| 216 | - 'PHPUnit_Framework_Constraint_PCREMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', |
|
| 217 | - 'PHPUnit_Framework_Constraint_SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php', |
|
| 218 | - 'PHPUnit_Framework_Constraint_StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php', |
|
| 219 | - 'PHPUnit_Framework_Constraint_StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', |
|
| 220 | - 'PHPUnit_Framework_Constraint_StringMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', |
|
| 221 | - 'PHPUnit_Framework_Constraint_StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', |
|
| 222 | - 'PHPUnit_Framework_Constraint_TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', |
|
| 223 | - 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', |
|
| 224 | - 'PHPUnit_Framework_Constraint_Xor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', |
|
| 225 | - 'PHPUnit_Framework_Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error.php', |
|
| 226 | - 'PHPUnit_Framework_Error_Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', |
|
| 227 | - 'PHPUnit_Framework_Error_Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php', |
|
| 228 | - 'PHPUnit_Framework_Error_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php', |
|
| 229 | - 'PHPUnit_Framework_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception.php', |
|
| 230 | - 'PHPUnit_Framework_ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', |
|
| 231 | - 'PHPUnit_Framework_ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php', |
|
| 232 | - 'PHPUnit_Framework_IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php', |
|
| 233 | - 'PHPUnit_Framework_IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', |
|
| 234 | - 'PHPUnit_Framework_IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestError.php', |
|
| 235 | - 'PHPUnit_Framework_InvalidCoversTargetError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php', |
|
| 236 | - 'PHPUnit_Framework_InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', |
|
| 237 | - 'PHPUnit_Framework_MockObject_BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', |
|
| 238 | - 'PHPUnit_Framework_MockObject_Builder_Identity' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', |
|
| 239 | - 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', |
|
| 240 | - 'PHPUnit_Framework_MockObject_Builder_Match' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', |
|
| 241 | - 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', |
|
| 242 | - 'PHPUnit_Framework_MockObject_Builder_Namespace' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', |
|
| 243 | - 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', |
|
| 244 | - 'PHPUnit_Framework_MockObject_Builder_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', |
|
| 245 | - 'PHPUnit_Framework_MockObject_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', |
|
| 246 | - 'PHPUnit_Framework_MockObject_Generator' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', |
|
| 247 | - 'PHPUnit_Framework_MockObject_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', |
|
| 248 | - 'PHPUnit_Framework_MockObject_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', |
|
| 249 | - 'PHPUnit_Framework_MockObject_Invocation_Object' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', |
|
| 250 | - 'PHPUnit_Framework_MockObject_Invocation_Static' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', |
|
| 251 | - 'PHPUnit_Framework_MockObject_Invokable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', |
|
| 252 | - 'PHPUnit_Framework_MockObject_Matcher' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', |
|
| 253 | - 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', |
|
| 254 | - 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', |
|
| 255 | - 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', |
|
| 256 | - 'PHPUnit_Framework_MockObject_Matcher_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', |
|
| 257 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', |
|
| 258 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php', |
|
| 259 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', |
|
| 260 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php', |
|
| 261 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', |
|
| 262 | - 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', |
|
| 263 | - 'PHPUnit_Framework_MockObject_Matcher_MethodName' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', |
|
| 264 | - 'PHPUnit_Framework_MockObject_Matcher_Parameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', |
|
| 265 | - 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', |
|
| 266 | - 'PHPUnit_Framework_MockObject_MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', |
|
| 267 | - 'PHPUnit_Framework_MockObject_MockObject' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', |
|
| 268 | - 'PHPUnit_Framework_MockObject_RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', |
|
| 269 | - 'PHPUnit_Framework_MockObject_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', |
|
| 270 | - 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', |
|
| 271 | - 'PHPUnit_Framework_MockObject_Stub_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', |
|
| 272 | - 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', |
|
| 273 | - 'PHPUnit_Framework_MockObject_Stub_Return' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', |
|
| 274 | - 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', |
|
| 275 | - 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', |
|
| 276 | - 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', |
|
| 277 | - 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', |
|
| 278 | - 'PHPUnit_Framework_MockObject_Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', |
|
| 279 | - 'PHPUnit_Framework_OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/OutputError.php', |
|
| 280 | - 'PHPUnit_Framework_RiskyTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTest.php', |
|
| 281 | - 'PHPUnit_Framework_RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTestError.php', |
|
| 282 | - 'PHPUnit_Framework_SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php', |
|
| 283 | - 'PHPUnit_Framework_SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php', |
|
| 284 | - 'PHPUnit_Framework_SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', |
|
| 285 | - 'PHPUnit_Framework_SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestError.php', |
|
| 286 | - 'PHPUnit_Framework_SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', |
|
| 287 | - 'PHPUnit_Framework_SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SyntheticError.php', |
|
| 288 | - 'PHPUnit_Framework_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php', |
|
| 289 | - 'PHPUnit_Framework_TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php', |
|
| 290 | - 'PHPUnit_Framework_TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php', |
|
| 291 | - 'PHPUnit_Framework_TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php', |
|
| 292 | - 'PHPUnit_Framework_TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php', |
|
| 293 | - 'PHPUnit_Framework_TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php', |
|
| 294 | - 'PHPUnit_Framework_TestSuite_DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', |
|
| 295 | - 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', |
|
| 296 | - 'PHPUnit_Framework_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Warning.php', |
|
| 297 | - 'PHPUnit_Runner_BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', |
|
| 298 | - 'PHPUnit_Runner_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php', |
|
| 299 | - 'PHPUnit_Runner_Filter_Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php', |
|
| 300 | - 'PHPUnit_Runner_Filter_GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group.php', |
|
| 301 | - 'PHPUnit_Runner_Filter_Group_Exclude' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', |
|
| 302 | - 'PHPUnit_Runner_Filter_Group_Include' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php', |
|
| 303 | - 'PHPUnit_Runner_Filter_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Test.php', |
|
| 304 | - 'PHPUnit_Runner_StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', |
|
| 305 | - 'PHPUnit_Runner_TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', |
|
| 306 | - 'PHPUnit_Runner_Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php', |
|
| 307 | - 'PHPUnit_TextUI_Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php', |
|
| 308 | - 'PHPUnit_TextUI_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', |
|
| 309 | - 'PHPUnit_TextUI_TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php', |
|
| 310 | - 'PHPUnit_Util_Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php', |
|
| 311 | - 'PHPUnit_Util_Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Configuration.php', |
|
| 312 | - 'PHPUnit_Util_ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php', |
|
| 313 | - 'PHPUnit_Util_Fileloader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Fileloader.php', |
|
| 314 | - 'PHPUnit_Util_Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php', |
|
| 315 | - 'PHPUnit_Util_Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php', |
|
| 316 | - 'PHPUnit_Util_Getopt' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Getopt.php', |
|
| 317 | - 'PHPUnit_Util_GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php', |
|
| 318 | - 'PHPUnit_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', |
|
| 319 | - 'PHPUnit_Util_Log_JSON' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JSON.php', |
|
| 320 | - 'PHPUnit_Util_Log_JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php', |
|
| 321 | - 'PHPUnit_Util_Log_TAP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TAP.php', |
|
| 322 | - 'PHPUnit_Util_PHP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP.php', |
|
| 323 | - 'PHPUnit_Util_PHP_Default' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Default.php', |
|
| 324 | - 'PHPUnit_Util_PHP_Windows' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Windows.php', |
|
| 325 | - 'PHPUnit_Util_Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php', |
|
| 326 | - 'PHPUnit_Util_Regex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Regex.php', |
|
| 327 | - 'PHPUnit_Util_String' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/String.php', |
|
| 328 | - 'PHPUnit_Util_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php', |
|
| 329 | - 'PHPUnit_Util_TestDox_NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', |
|
| 330 | - 'PHPUnit_Util_TestDox_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', |
|
| 331 | - 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', |
|
| 332 | - 'PHPUnit_Util_TestDox_ResultPrinter_Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', |
|
| 333 | - 'PHPUnit_Util_TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestSuiteIterator.php', |
|
| 334 | - 'PHPUnit_Util_Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php', |
|
| 335 | - 'PHPUnit_Util_XML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XML.php', |
|
| 336 | - 'PHP_CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php', |
|
| 337 | - 'PHP_CodeCoverage_Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver.php', |
|
| 338 | - 'PHP_CodeCoverage_Driver_HHVM' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php', |
|
| 339 | - 'PHP_CodeCoverage_Driver_PHPDBG' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php', |
|
| 340 | - 'PHP_CodeCoverage_Driver_Xdebug' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php', |
|
| 341 | - 'PHP_CodeCoverage_Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Exception.php', |
|
| 342 | - 'PHP_CodeCoverage_Exception_UnintentionallyCoveredCode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php', |
|
| 343 | - 'PHP_CodeCoverage_Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Filter.php', |
|
| 344 | - 'PHP_CodeCoverage_Report_Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php', |
|
| 345 | - 'PHP_CodeCoverage_Report_Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php', |
|
| 346 | - 'PHP_CodeCoverage_Report_Factory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php', |
|
| 347 | - 'PHP_CodeCoverage_Report_HTML' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php', |
|
| 348 | - 'PHP_CodeCoverage_Report_HTML_Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php', |
|
| 349 | - 'PHP_CodeCoverage_Report_HTML_Renderer_Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php', |
|
| 350 | - 'PHP_CodeCoverage_Report_HTML_Renderer_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php', |
|
| 351 | - 'PHP_CodeCoverage_Report_HTML_Renderer_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php', |
|
| 352 | - 'PHP_CodeCoverage_Report_Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php', |
|
| 353 | - 'PHP_CodeCoverage_Report_Node_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php', |
|
| 354 | - 'PHP_CodeCoverage_Report_Node_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php', |
|
| 355 | - 'PHP_CodeCoverage_Report_Node_Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php', |
|
| 356 | - 'PHP_CodeCoverage_Report_PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php', |
|
| 357 | - 'PHP_CodeCoverage_Report_Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php', |
|
| 358 | - 'PHP_CodeCoverage_Report_XML' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php', |
|
| 359 | - 'PHP_CodeCoverage_Report_XML_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php', |
|
| 360 | - 'PHP_CodeCoverage_Report_XML_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php', |
|
| 361 | - 'PHP_CodeCoverage_Report_XML_File_Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php', |
|
| 362 | - 'PHP_CodeCoverage_Report_XML_File_Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php', |
|
| 363 | - 'PHP_CodeCoverage_Report_XML_File_Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php', |
|
| 364 | - 'PHP_CodeCoverage_Report_XML_File_Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php', |
|
| 365 | - 'PHP_CodeCoverage_Report_XML_Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php', |
|
| 366 | - 'PHP_CodeCoverage_Report_XML_Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php', |
|
| 367 | - 'PHP_CodeCoverage_Report_XML_Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php', |
|
| 368 | - 'PHP_CodeCoverage_Report_XML_Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php', |
|
| 369 | - 'PHP_CodeCoverage_Util' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Util.php', |
|
| 370 | - 'PHP_CodeCoverage_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php', |
|
| 371 | - 'PHP_Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php', |
|
| 372 | - 'PHP_Token' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 373 | - 'PHP_TokenWithScope' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 374 | - 'PHP_TokenWithScopeAndVisibility' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 375 | - 'PHP_Token_ABSTRACT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 376 | - 'PHP_Token_AMPERSAND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 377 | - 'PHP_Token_AND_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 378 | - 'PHP_Token_ARRAY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 379 | - 'PHP_Token_ARRAY_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 380 | - 'PHP_Token_AS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 381 | - 'PHP_Token_ASYNC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 382 | - 'PHP_Token_AT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 383 | - 'PHP_Token_AWAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 384 | - 'PHP_Token_BACKTICK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 385 | - 'PHP_Token_BAD_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 386 | - 'PHP_Token_BOOLEAN_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 387 | - 'PHP_Token_BOOLEAN_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 388 | - 'PHP_Token_BOOL_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 389 | - 'PHP_Token_BREAK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 390 | - 'PHP_Token_CALLABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 391 | - 'PHP_Token_CARET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 392 | - 'PHP_Token_CASE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 393 | - 'PHP_Token_CATCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 394 | - 'PHP_Token_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 395 | - 'PHP_Token_CLASS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 396 | - 'PHP_Token_CLASS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 397 | - 'PHP_Token_CLASS_NAME_CONSTANT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 398 | - 'PHP_Token_CLONE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 399 | - 'PHP_Token_CLOSE_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 400 | - 'PHP_Token_CLOSE_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 401 | - 'PHP_Token_CLOSE_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 402 | - 'PHP_Token_CLOSE_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 403 | - 'PHP_Token_COALESCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 404 | - 'PHP_Token_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 405 | - 'PHP_Token_COMMA' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 406 | - 'PHP_Token_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 407 | - 'PHP_Token_COMPILER_HALT_OFFSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 408 | - 'PHP_Token_CONCAT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 409 | - 'PHP_Token_CONST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 410 | - 'PHP_Token_CONSTANT_ENCAPSED_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 411 | - 'PHP_Token_CONTINUE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 412 | - 'PHP_Token_CURLY_OPEN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 413 | - 'PHP_Token_DEC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 414 | - 'PHP_Token_DECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 415 | - 'PHP_Token_DEFAULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 416 | - 'PHP_Token_DIR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 417 | - 'PHP_Token_DIV' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 418 | - 'PHP_Token_DIV_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 419 | - 'PHP_Token_DNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 420 | - 'PHP_Token_DO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 421 | - 'PHP_Token_DOC_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 422 | - 'PHP_Token_DOLLAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 423 | - 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 424 | - 'PHP_Token_DOT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 425 | - 'PHP_Token_DOUBLE_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 426 | - 'PHP_Token_DOUBLE_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 427 | - 'PHP_Token_DOUBLE_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 428 | - 'PHP_Token_DOUBLE_QUOTES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 429 | - 'PHP_Token_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 430 | - 'PHP_Token_ELLIPSIS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 431 | - 'PHP_Token_ELSE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 432 | - 'PHP_Token_ELSEIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 433 | - 'PHP_Token_EMPTY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 434 | - 'PHP_Token_ENCAPSED_AND_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 435 | - 'PHP_Token_ENDDECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 436 | - 'PHP_Token_ENDFOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 437 | - 'PHP_Token_ENDFOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 438 | - 'PHP_Token_ENDIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 439 | - 'PHP_Token_ENDSWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 440 | - 'PHP_Token_ENDWHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 441 | - 'PHP_Token_END_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 442 | - 'PHP_Token_ENUM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 443 | - 'PHP_Token_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 444 | - 'PHP_Token_EQUALS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 445 | - 'PHP_Token_EVAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 446 | - 'PHP_Token_EXCLAMATION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 447 | - 'PHP_Token_EXIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 448 | - 'PHP_Token_EXTENDS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 449 | - 'PHP_Token_FILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 450 | - 'PHP_Token_FINAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 451 | - 'PHP_Token_FINALLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 452 | - 'PHP_Token_FOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 453 | - 'PHP_Token_FOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 454 | - 'PHP_Token_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 455 | - 'PHP_Token_FUNC_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 456 | - 'PHP_Token_GLOBAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 457 | - 'PHP_Token_GOTO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 458 | - 'PHP_Token_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 459 | - 'PHP_Token_HALT_COMPILER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 460 | - 'PHP_Token_IF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 461 | - 'PHP_Token_IMPLEMENTS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 462 | - 'PHP_Token_IN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 463 | - 'PHP_Token_INC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 464 | - 'PHP_Token_INCLUDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 465 | - 'PHP_Token_INCLUDE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 466 | - 'PHP_Token_INLINE_HTML' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 467 | - 'PHP_Token_INSTANCEOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 468 | - 'PHP_Token_INSTEADOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 469 | - 'PHP_Token_INTERFACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 470 | - 'PHP_Token_INT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 471 | - 'PHP_Token_ISSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 472 | - 'PHP_Token_IS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 473 | - 'PHP_Token_IS_GREATER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 474 | - 'PHP_Token_IS_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 475 | - 'PHP_Token_IS_NOT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 476 | - 'PHP_Token_IS_NOT_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 477 | - 'PHP_Token_IS_SMALLER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 478 | - 'PHP_Token_Includes' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 479 | - 'PHP_Token_JOIN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 480 | - 'PHP_Token_LAMBDA_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 481 | - 'PHP_Token_LAMBDA_CP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 482 | - 'PHP_Token_LAMBDA_OP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 483 | - 'PHP_Token_LINE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 484 | - 'PHP_Token_LIST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 485 | - 'PHP_Token_LNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 486 | - 'PHP_Token_LOGICAL_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 487 | - 'PHP_Token_LOGICAL_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 488 | - 'PHP_Token_LOGICAL_XOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 489 | - 'PHP_Token_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 490 | - 'PHP_Token_METHOD_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 491 | - 'PHP_Token_MINUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 492 | - 'PHP_Token_MINUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 493 | - 'PHP_Token_MOD_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 494 | - 'PHP_Token_MULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 495 | - 'PHP_Token_MUL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 496 | - 'PHP_Token_NAMESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 497 | - 'PHP_Token_NEW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 498 | - 'PHP_Token_NS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 499 | - 'PHP_Token_NS_SEPARATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 500 | - 'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 501 | - 'PHP_Token_NUM_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 502 | - 'PHP_Token_OBJECT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 503 | - 'PHP_Token_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 504 | - 'PHP_Token_ONUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 505 | - 'PHP_Token_OPEN_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 506 | - 'PHP_Token_OPEN_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 507 | - 'PHP_Token_OPEN_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 508 | - 'PHP_Token_OPEN_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 509 | - 'PHP_Token_OPEN_TAG_WITH_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 510 | - 'PHP_Token_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 511 | - 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 512 | - 'PHP_Token_PERCENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 513 | - 'PHP_Token_PIPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 514 | - 'PHP_Token_PLUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 515 | - 'PHP_Token_PLUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 516 | - 'PHP_Token_POW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 517 | - 'PHP_Token_POW_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 518 | - 'PHP_Token_PRINT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 519 | - 'PHP_Token_PRIVATE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 520 | - 'PHP_Token_PROTECTED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 521 | - 'PHP_Token_PUBLIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 522 | - 'PHP_Token_QUESTION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 523 | - 'PHP_Token_REQUIRE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 524 | - 'PHP_Token_REQUIRE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 525 | - 'PHP_Token_RETURN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 526 | - 'PHP_Token_SEMICOLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 527 | - 'PHP_Token_SHAPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 528 | - 'PHP_Token_SL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 529 | - 'PHP_Token_SL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 530 | - 'PHP_Token_SPACESHIP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 531 | - 'PHP_Token_SR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 532 | - 'PHP_Token_SR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 533 | - 'PHP_Token_START_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 534 | - 'PHP_Token_STATIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 535 | - 'PHP_Token_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 536 | - 'PHP_Token_STRING_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 537 | - 'PHP_Token_STRING_VARNAME' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 538 | - 'PHP_Token_SUPER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 539 | - 'PHP_Token_SWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 540 | - 'PHP_Token_Stream' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream.php', |
|
| 541 | - 'PHP_Token_Stream_CachingFactory' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', |
|
| 542 | - 'PHP_Token_THROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 543 | - 'PHP_Token_TILDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 544 | - 'PHP_Token_TRAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 545 | - 'PHP_Token_TRAIT_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 546 | - 'PHP_Token_TRY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 547 | - 'PHP_Token_TYPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 548 | - 'PHP_Token_TYPELIST_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 549 | - 'PHP_Token_TYPELIST_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 550 | - 'PHP_Token_UNSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 551 | - 'PHP_Token_UNSET_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 552 | - 'PHP_Token_USE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 553 | - 'PHP_Token_USE_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 554 | - 'PHP_Token_VAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 555 | - 'PHP_Token_VARIABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 556 | - 'PHP_Token_WHERE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 557 | - 'PHP_Token_WHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 558 | - 'PHP_Token_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 559 | - 'PHP_Token_XHP_ATTRIBUTE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 560 | - 'PHP_Token_XHP_CATEGORY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 561 | - 'PHP_Token_XHP_CATEGORY_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 562 | - 'PHP_Token_XHP_CHILDREN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 563 | - 'PHP_Token_XHP_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 564 | - 'PHP_Token_XHP_REQUIRED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 565 | - 'PHP_Token_XHP_TAG_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 566 | - 'PHP_Token_XHP_TAG_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 567 | - 'PHP_Token_XHP_TEXT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 568 | - 'PHP_Token_XOR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 569 | - 'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 570 | - 'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', |
|
| 571 | - 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', |
|
| 572 | - 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php', |
|
| 573 | - 'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php', |
|
| 574 | - 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php', |
|
| 575 | - 'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php', |
|
| 576 | - 'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php', |
|
| 577 | - 'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php', |
|
| 578 | - 'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php', |
|
| 579 | - 'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php', |
|
| 580 | - 'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php', |
|
| 581 | - 'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php', |
|
| 582 | - 'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php', |
|
| 583 | - 'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php', |
|
| 584 | - 'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php', |
|
| 585 | - 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php', |
|
| 586 | - 'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php', |
|
| 587 | - 'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php', |
|
| 588 | - 'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php', |
|
| 589 | - 'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php', |
|
| 590 | - 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php', |
|
| 591 | - 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', |
|
| 592 | - 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', |
|
| 593 | - 'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php', |
|
| 594 | - 'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php', |
|
| 595 | - 'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php', |
|
| 596 | - 'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php', |
|
| 597 | - 'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php', |
|
| 598 | - 'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__ . '/..' . '/sebastian/global-state/src/Blacklist.php', |
|
| 599 | - 'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php', |
|
| 600 | - 'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/Exception.php', |
|
| 601 | - 'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php', |
|
| 602 | - 'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/RuntimeException.php', |
|
| 603 | - 'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php', |
|
| 604 | - 'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php', |
|
| 605 | - 'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php', |
|
| 606 | - 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php', |
|
| 607 | - 'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php', |
|
| 608 | - 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', |
|
| 609 | - 'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php', |
|
| 610 | - 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', |
|
| 611 | - 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', |
|
| 160 | + public static $classMap = array( |
|
| 161 | + 'Attribute' => __DIR__.'/..'.'/symfony/polyfill-php80/Resources/stubs/Attribute.php', |
|
| 162 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
| 163 | + 'File_Iterator' => __DIR__.'/..'.'/phpunit/php-file-iterator/src/Iterator.php', |
|
| 164 | + 'File_Iterator_Facade' => __DIR__.'/..'.'/phpunit/php-file-iterator/src/Facade.php', |
|
| 165 | + 'File_Iterator_Factory' => __DIR__.'/..'.'/phpunit/php-file-iterator/src/Factory.php', |
|
| 166 | + 'PHPUnit\\Framework\\Assert' => __DIR__.'/..'.'/phpunit/phpunit/src/ForwardCompatibility/Assert.php', |
|
| 167 | + 'PHPUnit\\Framework\\AssertionFailedError' => __DIR__.'/..'.'/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php', |
|
| 168 | + 'PHPUnit\\Framework\\BaseTestListener' => __DIR__.'/..'.'/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', |
|
| 169 | + 'PHPUnit\\Framework\\Test' => __DIR__.'/..'.'/phpunit/phpunit/src/ForwardCompatibility/Test.php', |
|
| 170 | + 'PHPUnit\\Framework\\TestCase' => __DIR__.'/..'.'/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', |
|
| 171 | + 'PHPUnit\\Framework\\TestListener' => __DIR__.'/..'.'/phpunit/phpunit/src/ForwardCompatibility/TestListener.php', |
|
| 172 | + 'PHPUnit\\Framework\\TestSuite' => __DIR__.'/..'.'/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php', |
|
| 173 | + 'PHPUnit_Exception' => __DIR__.'/..'.'/phpunit/phpunit/src/Exception.php', |
|
| 174 | + 'PHPUnit_Extensions_GroupTestSuite' => __DIR__.'/..'.'/phpunit/phpunit/src/Extensions/GroupTestSuite.php', |
|
| 175 | + 'PHPUnit_Extensions_PhptTestCase' => __DIR__.'/..'.'/phpunit/phpunit/src/Extensions/PhptTestCase.php', |
|
| 176 | + 'PHPUnit_Extensions_PhptTestSuite' => __DIR__.'/..'.'/phpunit/phpunit/src/Extensions/PhptTestSuite.php', |
|
| 177 | + 'PHPUnit_Extensions_RepeatedTest' => __DIR__.'/..'.'/phpunit/phpunit/src/Extensions/RepeatedTest.php', |
|
| 178 | + 'PHPUnit_Extensions_TestDecorator' => __DIR__.'/..'.'/phpunit/phpunit/src/Extensions/TestDecorator.php', |
|
| 179 | + 'PHPUnit_Extensions_TicketListener' => __DIR__.'/..'.'/phpunit/phpunit/src/Extensions/TicketListener.php', |
|
| 180 | + 'PHPUnit_Framework_Assert' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Assert.php', |
|
| 181 | + 'PHPUnit_Framework_AssertionFailedError' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/AssertionFailedError.php', |
|
| 182 | + 'PHPUnit_Framework_BaseTestListener' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/BaseTestListener.php', |
|
| 183 | + 'PHPUnit_Framework_CodeCoverageException' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/CodeCoverageException.php', |
|
| 184 | + 'PHPUnit_Framework_Constraint' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint.php', |
|
| 185 | + 'PHPUnit_Framework_Constraint_And' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/And.php', |
|
| 186 | + 'PHPUnit_Framework_Constraint_ArrayHasKey' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', |
|
| 187 | + 'PHPUnit_Framework_Constraint_ArraySubset' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php', |
|
| 188 | + 'PHPUnit_Framework_Constraint_Attribute' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/Attribute.php', |
|
| 189 | + 'PHPUnit_Framework_Constraint_Callback' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/Callback.php', |
|
| 190 | + 'PHPUnit_Framework_Constraint_ClassHasAttribute' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', |
|
| 191 | + 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', |
|
| 192 | + 'PHPUnit_Framework_Constraint_Composite' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/Composite.php', |
|
| 193 | + 'PHPUnit_Framework_Constraint_Count' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/Count.php', |
|
| 194 | + 'PHPUnit_Framework_Constraint_Exception' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/Exception.php', |
|
| 195 | + 'PHPUnit_Framework_Constraint_ExceptionCode' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', |
|
| 196 | + 'PHPUnit_Framework_Constraint_ExceptionMessage' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', |
|
| 197 | + 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php', |
|
| 198 | + 'PHPUnit_Framework_Constraint_FileExists' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/FileExists.php', |
|
| 199 | + 'PHPUnit_Framework_Constraint_GreaterThan' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', |
|
| 200 | + 'PHPUnit_Framework_Constraint_IsAnything' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', |
|
| 201 | + 'PHPUnit_Framework_Constraint_IsEmpty' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', |
|
| 202 | + 'PHPUnit_Framework_Constraint_IsEqual' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', |
|
| 203 | + 'PHPUnit_Framework_Constraint_IsFalse' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', |
|
| 204 | + 'PHPUnit_Framework_Constraint_IsIdentical' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', |
|
| 205 | + 'PHPUnit_Framework_Constraint_IsInstanceOf' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', |
|
| 206 | + 'PHPUnit_Framework_Constraint_IsJson' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/IsJson.php', |
|
| 207 | + 'PHPUnit_Framework_Constraint_IsNull' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/IsNull.php', |
|
| 208 | + 'PHPUnit_Framework_Constraint_IsTrue' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', |
|
| 209 | + 'PHPUnit_Framework_Constraint_IsType' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/IsType.php', |
|
| 210 | + 'PHPUnit_Framework_Constraint_JsonMatches' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', |
|
| 211 | + 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', |
|
| 212 | + 'PHPUnit_Framework_Constraint_LessThan' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/LessThan.php', |
|
| 213 | + 'PHPUnit_Framework_Constraint_Not' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/Not.php', |
|
| 214 | + 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', |
|
| 215 | + 'PHPUnit_Framework_Constraint_Or' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/Or.php', |
|
| 216 | + 'PHPUnit_Framework_Constraint_PCREMatch' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', |
|
| 217 | + 'PHPUnit_Framework_Constraint_SameSize' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/SameSize.php', |
|
| 218 | + 'PHPUnit_Framework_Constraint_StringContains' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/StringContains.php', |
|
| 219 | + 'PHPUnit_Framework_Constraint_StringEndsWith' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', |
|
| 220 | + 'PHPUnit_Framework_Constraint_StringMatches' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', |
|
| 221 | + 'PHPUnit_Framework_Constraint_StringStartsWith' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', |
|
| 222 | + 'PHPUnit_Framework_Constraint_TraversableContains' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', |
|
| 223 | + 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', |
|
| 224 | + 'PHPUnit_Framework_Constraint_Xor' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Constraint/Xor.php', |
|
| 225 | + 'PHPUnit_Framework_Error' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Error.php', |
|
| 226 | + 'PHPUnit_Framework_Error_Deprecated' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Error/Deprecated.php', |
|
| 227 | + 'PHPUnit_Framework_Error_Notice' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Error/Notice.php', |
|
| 228 | + 'PHPUnit_Framework_Error_Warning' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Error/Warning.php', |
|
| 229 | + 'PHPUnit_Framework_Exception' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Exception.php', |
|
| 230 | + 'PHPUnit_Framework_ExceptionWrapper' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/ExceptionWrapper.php', |
|
| 231 | + 'PHPUnit_Framework_ExpectationFailedException' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/ExpectationFailedException.php', |
|
| 232 | + 'PHPUnit_Framework_IncompleteTest' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/IncompleteTest.php', |
|
| 233 | + 'PHPUnit_Framework_IncompleteTestCase' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/IncompleteTestCase.php', |
|
| 234 | + 'PHPUnit_Framework_IncompleteTestError' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/IncompleteTestError.php', |
|
| 235 | + 'PHPUnit_Framework_InvalidCoversTargetError' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php', |
|
| 236 | + 'PHPUnit_Framework_InvalidCoversTargetException' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', |
|
| 237 | + 'PHPUnit_Framework_MockObject_BadMethodCallException' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', |
|
| 238 | + 'PHPUnit_Framework_MockObject_Builder_Identity' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', |
|
| 239 | + 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', |
|
| 240 | + 'PHPUnit_Framework_MockObject_Builder_Match' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', |
|
| 241 | + 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', |
|
| 242 | + 'PHPUnit_Framework_MockObject_Builder_Namespace' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', |
|
| 243 | + 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', |
|
| 244 | + 'PHPUnit_Framework_MockObject_Builder_Stub' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', |
|
| 245 | + 'PHPUnit_Framework_MockObject_Exception' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', |
|
| 246 | + 'PHPUnit_Framework_MockObject_Generator' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', |
|
| 247 | + 'PHPUnit_Framework_MockObject_Invocation' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', |
|
| 248 | + 'PHPUnit_Framework_MockObject_InvocationMocker' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', |
|
| 249 | + 'PHPUnit_Framework_MockObject_Invocation_Object' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', |
|
| 250 | + 'PHPUnit_Framework_MockObject_Invocation_Static' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', |
|
| 251 | + 'PHPUnit_Framework_MockObject_Invokable' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', |
|
| 252 | + 'PHPUnit_Framework_MockObject_Matcher' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', |
|
| 253 | + 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', |
|
| 254 | + 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', |
|
| 255 | + 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', |
|
| 256 | + 'PHPUnit_Framework_MockObject_Matcher_Invocation' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', |
|
| 257 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', |
|
| 258 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php', |
|
| 259 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', |
|
| 260 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php', |
|
| 261 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', |
|
| 262 | + 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', |
|
| 263 | + 'PHPUnit_Framework_MockObject_Matcher_MethodName' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', |
|
| 264 | + 'PHPUnit_Framework_MockObject_Matcher_Parameters' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', |
|
| 265 | + 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', |
|
| 266 | + 'PHPUnit_Framework_MockObject_MockBuilder' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', |
|
| 267 | + 'PHPUnit_Framework_MockObject_MockObject' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', |
|
| 268 | + 'PHPUnit_Framework_MockObject_RuntimeException' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', |
|
| 269 | + 'PHPUnit_Framework_MockObject_Stub' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', |
|
| 270 | + 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', |
|
| 271 | + 'PHPUnit_Framework_MockObject_Stub_Exception' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', |
|
| 272 | + 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', |
|
| 273 | + 'PHPUnit_Framework_MockObject_Stub_Return' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', |
|
| 274 | + 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', |
|
| 275 | + 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', |
|
| 276 | + 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', |
|
| 277 | + 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', |
|
| 278 | + 'PHPUnit_Framework_MockObject_Verifiable' => __DIR__.'/..'.'/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', |
|
| 279 | + 'PHPUnit_Framework_OutputError' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/OutputError.php', |
|
| 280 | + 'PHPUnit_Framework_RiskyTest' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/RiskyTest.php', |
|
| 281 | + 'PHPUnit_Framework_RiskyTestError' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/RiskyTestError.php', |
|
| 282 | + 'PHPUnit_Framework_SelfDescribing' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/SelfDescribing.php', |
|
| 283 | + 'PHPUnit_Framework_SkippedTest' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/SkippedTest.php', |
|
| 284 | + 'PHPUnit_Framework_SkippedTestCase' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/SkippedTestCase.php', |
|
| 285 | + 'PHPUnit_Framework_SkippedTestError' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/SkippedTestError.php', |
|
| 286 | + 'PHPUnit_Framework_SkippedTestSuiteError' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', |
|
| 287 | + 'PHPUnit_Framework_SyntheticError' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/SyntheticError.php', |
|
| 288 | + 'PHPUnit_Framework_Test' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Test.php', |
|
| 289 | + 'PHPUnit_Framework_TestCase' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/TestCase.php', |
|
| 290 | + 'PHPUnit_Framework_TestFailure' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/TestFailure.php', |
|
| 291 | + 'PHPUnit_Framework_TestListener' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/TestListener.php', |
|
| 292 | + 'PHPUnit_Framework_TestResult' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/TestResult.php', |
|
| 293 | + 'PHPUnit_Framework_TestSuite' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/TestSuite.php', |
|
| 294 | + 'PHPUnit_Framework_TestSuite_DataProvider' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', |
|
| 295 | + 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', |
|
| 296 | + 'PHPUnit_Framework_Warning' => __DIR__.'/..'.'/phpunit/phpunit/src/Framework/Warning.php', |
|
| 297 | + 'PHPUnit_Runner_BaseTestRunner' => __DIR__.'/..'.'/phpunit/phpunit/src/Runner/BaseTestRunner.php', |
|
| 298 | + 'PHPUnit_Runner_Exception' => __DIR__.'/..'.'/phpunit/phpunit/src/Runner/Exception.php', |
|
| 299 | + 'PHPUnit_Runner_Filter_Factory' => __DIR__.'/..'.'/phpunit/phpunit/src/Runner/Filter/Factory.php', |
|
| 300 | + 'PHPUnit_Runner_Filter_GroupFilterIterator' => __DIR__.'/..'.'/phpunit/phpunit/src/Runner/Filter/Group.php', |
|
| 301 | + 'PHPUnit_Runner_Filter_Group_Exclude' => __DIR__.'/..'.'/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', |
|
| 302 | + 'PHPUnit_Runner_Filter_Group_Include' => __DIR__.'/..'.'/phpunit/phpunit/src/Runner/Filter/Group/Include.php', |
|
| 303 | + 'PHPUnit_Runner_Filter_Test' => __DIR__.'/..'.'/phpunit/phpunit/src/Runner/Filter/Test.php', |
|
| 304 | + 'PHPUnit_Runner_StandardTestSuiteLoader' => __DIR__.'/..'.'/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', |
|
| 305 | + 'PHPUnit_Runner_TestSuiteLoader' => __DIR__.'/..'.'/phpunit/phpunit/src/Runner/TestSuiteLoader.php', |
|
| 306 | + 'PHPUnit_Runner_Version' => __DIR__.'/..'.'/phpunit/phpunit/src/Runner/Version.php', |
|
| 307 | + 'PHPUnit_TextUI_Command' => __DIR__.'/..'.'/phpunit/phpunit/src/TextUI/Command.php', |
|
| 308 | + 'PHPUnit_TextUI_ResultPrinter' => __DIR__.'/..'.'/phpunit/phpunit/src/TextUI/ResultPrinter.php', |
|
| 309 | + 'PHPUnit_TextUI_TestRunner' => __DIR__.'/..'.'/phpunit/phpunit/src/TextUI/TestRunner.php', |
|
| 310 | + 'PHPUnit_Util_Blacklist' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Blacklist.php', |
|
| 311 | + 'PHPUnit_Util_Configuration' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Configuration.php', |
|
| 312 | + 'PHPUnit_Util_ErrorHandler' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/ErrorHandler.php', |
|
| 313 | + 'PHPUnit_Util_Fileloader' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Fileloader.php', |
|
| 314 | + 'PHPUnit_Util_Filesystem' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Filesystem.php', |
|
| 315 | + 'PHPUnit_Util_Filter' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Filter.php', |
|
| 316 | + 'PHPUnit_Util_Getopt' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Getopt.php', |
|
| 317 | + 'PHPUnit_Util_GlobalState' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/GlobalState.php', |
|
| 318 | + 'PHPUnit_Util_InvalidArgumentHelper' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', |
|
| 319 | + 'PHPUnit_Util_Log_JSON' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Log/JSON.php', |
|
| 320 | + 'PHPUnit_Util_Log_JUnit' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Log/JUnit.php', |
|
| 321 | + 'PHPUnit_Util_Log_TAP' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Log/TAP.php', |
|
| 322 | + 'PHPUnit_Util_PHP' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/PHP.php', |
|
| 323 | + 'PHPUnit_Util_PHP_Default' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/PHP/Default.php', |
|
| 324 | + 'PHPUnit_Util_PHP_Windows' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/PHP/Windows.php', |
|
| 325 | + 'PHPUnit_Util_Printer' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Printer.php', |
|
| 326 | + 'PHPUnit_Util_Regex' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Regex.php', |
|
| 327 | + 'PHPUnit_Util_String' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/String.php', |
|
| 328 | + 'PHPUnit_Util_Test' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Test.php', |
|
| 329 | + 'PHPUnit_Util_TestDox_NamePrettifier' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', |
|
| 330 | + 'PHPUnit_Util_TestDox_ResultPrinter' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', |
|
| 331 | + 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', |
|
| 332 | + 'PHPUnit_Util_TestDox_ResultPrinter_Text' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', |
|
| 333 | + 'PHPUnit_Util_TestSuiteIterator' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/TestSuiteIterator.php', |
|
| 334 | + 'PHPUnit_Util_Type' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/Type.php', |
|
| 335 | + 'PHPUnit_Util_XML' => __DIR__.'/..'.'/phpunit/phpunit/src/Util/XML.php', |
|
| 336 | + 'PHP_CodeCoverage' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage.php', |
|
| 337 | + 'PHP_CodeCoverage_Driver' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Driver.php', |
|
| 338 | + 'PHP_CodeCoverage_Driver_HHVM' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php', |
|
| 339 | + 'PHP_CodeCoverage_Driver_PHPDBG' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php', |
|
| 340 | + 'PHP_CodeCoverage_Driver_Xdebug' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php', |
|
| 341 | + 'PHP_CodeCoverage_Exception' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Exception.php', |
|
| 342 | + 'PHP_CodeCoverage_Exception_UnintentionallyCoveredCode' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php', |
|
| 343 | + 'PHP_CodeCoverage_Filter' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Filter.php', |
|
| 344 | + 'PHP_CodeCoverage_Report_Clover' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php', |
|
| 345 | + 'PHP_CodeCoverage_Report_Crap4j' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php', |
|
| 346 | + 'PHP_CodeCoverage_Report_Factory' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php', |
|
| 347 | + 'PHP_CodeCoverage_Report_HTML' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php', |
|
| 348 | + 'PHP_CodeCoverage_Report_HTML_Renderer' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php', |
|
| 349 | + 'PHP_CodeCoverage_Report_HTML_Renderer_Dashboard' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php', |
|
| 350 | + 'PHP_CodeCoverage_Report_HTML_Renderer_Directory' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php', |
|
| 351 | + 'PHP_CodeCoverage_Report_HTML_Renderer_File' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php', |
|
| 352 | + 'PHP_CodeCoverage_Report_Node' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php', |
|
| 353 | + 'PHP_CodeCoverage_Report_Node_Directory' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php', |
|
| 354 | + 'PHP_CodeCoverage_Report_Node_File' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php', |
|
| 355 | + 'PHP_CodeCoverage_Report_Node_Iterator' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php', |
|
| 356 | + 'PHP_CodeCoverage_Report_PHP' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php', |
|
| 357 | + 'PHP_CodeCoverage_Report_Text' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php', |
|
| 358 | + 'PHP_CodeCoverage_Report_XML' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php', |
|
| 359 | + 'PHP_CodeCoverage_Report_XML_Directory' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php', |
|
| 360 | + 'PHP_CodeCoverage_Report_XML_File' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php', |
|
| 361 | + 'PHP_CodeCoverage_Report_XML_File_Coverage' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php', |
|
| 362 | + 'PHP_CodeCoverage_Report_XML_File_Method' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php', |
|
| 363 | + 'PHP_CodeCoverage_Report_XML_File_Report' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php', |
|
| 364 | + 'PHP_CodeCoverage_Report_XML_File_Unit' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php', |
|
| 365 | + 'PHP_CodeCoverage_Report_XML_Node' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php', |
|
| 366 | + 'PHP_CodeCoverage_Report_XML_Project' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php', |
|
| 367 | + 'PHP_CodeCoverage_Report_XML_Tests' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php', |
|
| 368 | + 'PHP_CodeCoverage_Report_XML_Totals' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php', |
|
| 369 | + 'PHP_CodeCoverage_Util' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Util.php', |
|
| 370 | + 'PHP_CodeCoverage_Util_InvalidArgumentHelper' => __DIR__.'/..'.'/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php', |
|
| 371 | + 'PHP_Timer' => __DIR__.'/..'.'/phpunit/php-timer/src/Timer.php', |
|
| 372 | + 'PHP_Token' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 373 | + 'PHP_TokenWithScope' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 374 | + 'PHP_TokenWithScopeAndVisibility' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 375 | + 'PHP_Token_ABSTRACT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 376 | + 'PHP_Token_AMPERSAND' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 377 | + 'PHP_Token_AND_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 378 | + 'PHP_Token_ARRAY' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 379 | + 'PHP_Token_ARRAY_CAST' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 380 | + 'PHP_Token_AS' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 381 | + 'PHP_Token_ASYNC' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 382 | + 'PHP_Token_AT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 383 | + 'PHP_Token_AWAIT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 384 | + 'PHP_Token_BACKTICK' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 385 | + 'PHP_Token_BAD_CHARACTER' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 386 | + 'PHP_Token_BOOLEAN_AND' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 387 | + 'PHP_Token_BOOLEAN_OR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 388 | + 'PHP_Token_BOOL_CAST' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 389 | + 'PHP_Token_BREAK' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 390 | + 'PHP_Token_CALLABLE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 391 | + 'PHP_Token_CARET' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 392 | + 'PHP_Token_CASE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 393 | + 'PHP_Token_CATCH' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 394 | + 'PHP_Token_CHARACTER' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 395 | + 'PHP_Token_CLASS' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 396 | + 'PHP_Token_CLASS_C' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 397 | + 'PHP_Token_CLASS_NAME_CONSTANT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 398 | + 'PHP_Token_CLONE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 399 | + 'PHP_Token_CLOSE_BRACKET' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 400 | + 'PHP_Token_CLOSE_CURLY' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 401 | + 'PHP_Token_CLOSE_SQUARE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 402 | + 'PHP_Token_CLOSE_TAG' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 403 | + 'PHP_Token_COALESCE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 404 | + 'PHP_Token_COLON' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 405 | + 'PHP_Token_COMMA' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 406 | + 'PHP_Token_COMMENT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 407 | + 'PHP_Token_COMPILER_HALT_OFFSET' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 408 | + 'PHP_Token_CONCAT_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 409 | + 'PHP_Token_CONST' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 410 | + 'PHP_Token_CONSTANT_ENCAPSED_STRING' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 411 | + 'PHP_Token_CONTINUE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 412 | + 'PHP_Token_CURLY_OPEN' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 413 | + 'PHP_Token_DEC' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 414 | + 'PHP_Token_DECLARE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 415 | + 'PHP_Token_DEFAULT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 416 | + 'PHP_Token_DIR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 417 | + 'PHP_Token_DIV' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 418 | + 'PHP_Token_DIV_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 419 | + 'PHP_Token_DNUMBER' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 420 | + 'PHP_Token_DO' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 421 | + 'PHP_Token_DOC_COMMENT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 422 | + 'PHP_Token_DOLLAR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 423 | + 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 424 | + 'PHP_Token_DOT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 425 | + 'PHP_Token_DOUBLE_ARROW' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 426 | + 'PHP_Token_DOUBLE_CAST' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 427 | + 'PHP_Token_DOUBLE_COLON' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 428 | + 'PHP_Token_DOUBLE_QUOTES' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 429 | + 'PHP_Token_ECHO' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 430 | + 'PHP_Token_ELLIPSIS' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 431 | + 'PHP_Token_ELSE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 432 | + 'PHP_Token_ELSEIF' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 433 | + 'PHP_Token_EMPTY' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 434 | + 'PHP_Token_ENCAPSED_AND_WHITESPACE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 435 | + 'PHP_Token_ENDDECLARE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 436 | + 'PHP_Token_ENDFOR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 437 | + 'PHP_Token_ENDFOREACH' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 438 | + 'PHP_Token_ENDIF' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 439 | + 'PHP_Token_ENDSWITCH' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 440 | + 'PHP_Token_ENDWHILE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 441 | + 'PHP_Token_END_HEREDOC' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 442 | + 'PHP_Token_ENUM' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 443 | + 'PHP_Token_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 444 | + 'PHP_Token_EQUALS' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 445 | + 'PHP_Token_EVAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 446 | + 'PHP_Token_EXCLAMATION_MARK' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 447 | + 'PHP_Token_EXIT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 448 | + 'PHP_Token_EXTENDS' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 449 | + 'PHP_Token_FILE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 450 | + 'PHP_Token_FINAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 451 | + 'PHP_Token_FINALLY' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 452 | + 'PHP_Token_FOR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 453 | + 'PHP_Token_FOREACH' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 454 | + 'PHP_Token_FUNCTION' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 455 | + 'PHP_Token_FUNC_C' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 456 | + 'PHP_Token_GLOBAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 457 | + 'PHP_Token_GOTO' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 458 | + 'PHP_Token_GT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 459 | + 'PHP_Token_HALT_COMPILER' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 460 | + 'PHP_Token_IF' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 461 | + 'PHP_Token_IMPLEMENTS' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 462 | + 'PHP_Token_IN' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 463 | + 'PHP_Token_INC' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 464 | + 'PHP_Token_INCLUDE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 465 | + 'PHP_Token_INCLUDE_ONCE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 466 | + 'PHP_Token_INLINE_HTML' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 467 | + 'PHP_Token_INSTANCEOF' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 468 | + 'PHP_Token_INSTEADOF' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 469 | + 'PHP_Token_INTERFACE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 470 | + 'PHP_Token_INT_CAST' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 471 | + 'PHP_Token_ISSET' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 472 | + 'PHP_Token_IS_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 473 | + 'PHP_Token_IS_GREATER_OR_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 474 | + 'PHP_Token_IS_IDENTICAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 475 | + 'PHP_Token_IS_NOT_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 476 | + 'PHP_Token_IS_NOT_IDENTICAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 477 | + 'PHP_Token_IS_SMALLER_OR_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 478 | + 'PHP_Token_Includes' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 479 | + 'PHP_Token_JOIN' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 480 | + 'PHP_Token_LAMBDA_ARROW' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 481 | + 'PHP_Token_LAMBDA_CP' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 482 | + 'PHP_Token_LAMBDA_OP' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 483 | + 'PHP_Token_LINE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 484 | + 'PHP_Token_LIST' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 485 | + 'PHP_Token_LNUMBER' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 486 | + 'PHP_Token_LOGICAL_AND' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 487 | + 'PHP_Token_LOGICAL_OR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 488 | + 'PHP_Token_LOGICAL_XOR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 489 | + 'PHP_Token_LT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 490 | + 'PHP_Token_METHOD_C' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 491 | + 'PHP_Token_MINUS' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 492 | + 'PHP_Token_MINUS_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 493 | + 'PHP_Token_MOD_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 494 | + 'PHP_Token_MULT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 495 | + 'PHP_Token_MUL_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 496 | + 'PHP_Token_NAMESPACE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 497 | + 'PHP_Token_NEW' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 498 | + 'PHP_Token_NS_C' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 499 | + 'PHP_Token_NS_SEPARATOR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 500 | + 'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 501 | + 'PHP_Token_NUM_STRING' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 502 | + 'PHP_Token_OBJECT_CAST' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 503 | + 'PHP_Token_OBJECT_OPERATOR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 504 | + 'PHP_Token_ONUMBER' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 505 | + 'PHP_Token_OPEN_BRACKET' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 506 | + 'PHP_Token_OPEN_CURLY' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 507 | + 'PHP_Token_OPEN_SQUARE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 508 | + 'PHP_Token_OPEN_TAG' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 509 | + 'PHP_Token_OPEN_TAG_WITH_ECHO' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 510 | + 'PHP_Token_OR_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 511 | + 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 512 | + 'PHP_Token_PERCENT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 513 | + 'PHP_Token_PIPE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 514 | + 'PHP_Token_PLUS' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 515 | + 'PHP_Token_PLUS_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 516 | + 'PHP_Token_POW' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 517 | + 'PHP_Token_POW_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 518 | + 'PHP_Token_PRINT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 519 | + 'PHP_Token_PRIVATE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 520 | + 'PHP_Token_PROTECTED' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 521 | + 'PHP_Token_PUBLIC' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 522 | + 'PHP_Token_QUESTION_MARK' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 523 | + 'PHP_Token_REQUIRE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 524 | + 'PHP_Token_REQUIRE_ONCE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 525 | + 'PHP_Token_RETURN' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 526 | + 'PHP_Token_SEMICOLON' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 527 | + 'PHP_Token_SHAPE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 528 | + 'PHP_Token_SL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 529 | + 'PHP_Token_SL_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 530 | + 'PHP_Token_SPACESHIP' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 531 | + 'PHP_Token_SR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 532 | + 'PHP_Token_SR_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 533 | + 'PHP_Token_START_HEREDOC' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 534 | + 'PHP_Token_STATIC' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 535 | + 'PHP_Token_STRING' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 536 | + 'PHP_Token_STRING_CAST' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 537 | + 'PHP_Token_STRING_VARNAME' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 538 | + 'PHP_Token_SUPER' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 539 | + 'PHP_Token_SWITCH' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 540 | + 'PHP_Token_Stream' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token/Stream.php', |
|
| 541 | + 'PHP_Token_Stream_CachingFactory' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', |
|
| 542 | + 'PHP_Token_THROW' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 543 | + 'PHP_Token_TILDE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 544 | + 'PHP_Token_TRAIT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 545 | + 'PHP_Token_TRAIT_C' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 546 | + 'PHP_Token_TRY' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 547 | + 'PHP_Token_TYPE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 548 | + 'PHP_Token_TYPELIST_GT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 549 | + 'PHP_Token_TYPELIST_LT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 550 | + 'PHP_Token_UNSET' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 551 | + 'PHP_Token_UNSET_CAST' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 552 | + 'PHP_Token_USE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 553 | + 'PHP_Token_USE_FUNCTION' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 554 | + 'PHP_Token_VAR' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 555 | + 'PHP_Token_VARIABLE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 556 | + 'PHP_Token_WHERE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 557 | + 'PHP_Token_WHILE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 558 | + 'PHP_Token_WHITESPACE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 559 | + 'PHP_Token_XHP_ATTRIBUTE' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 560 | + 'PHP_Token_XHP_CATEGORY' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 561 | + 'PHP_Token_XHP_CATEGORY_LABEL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 562 | + 'PHP_Token_XHP_CHILDREN' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 563 | + 'PHP_Token_XHP_LABEL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 564 | + 'PHP_Token_XHP_REQUIRED' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 565 | + 'PHP_Token_XHP_TAG_GT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 566 | + 'PHP_Token_XHP_TAG_LT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 567 | + 'PHP_Token_XHP_TEXT' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 568 | + 'PHP_Token_XOR_EQUAL' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 569 | + 'PHP_Token_YIELD' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 570 | + 'PHP_Token_YIELD_FROM' => __DIR__.'/..'.'/phpunit/php-token-stream/src/Token.php', |
|
| 571 | + 'PhpToken' => __DIR__.'/..'.'/symfony/polyfill-php80/Resources/stubs/PhpToken.php', |
|
| 572 | + 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__.'/..'.'/sebastian/comparator/src/ArrayComparator.php', |
|
| 573 | + 'SebastianBergmann\\Comparator\\Comparator' => __DIR__.'/..'.'/sebastian/comparator/src/Comparator.php', |
|
| 574 | + 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__.'/..'.'/sebastian/comparator/src/ComparisonFailure.php', |
|
| 575 | + 'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__.'/..'.'/sebastian/comparator/src/DOMNodeComparator.php', |
|
| 576 | + 'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__.'/..'.'/sebastian/comparator/src/DateTimeComparator.php', |
|
| 577 | + 'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__.'/..'.'/sebastian/comparator/src/DoubleComparator.php', |
|
| 578 | + 'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__.'/..'.'/sebastian/comparator/src/ExceptionComparator.php', |
|
| 579 | + 'SebastianBergmann\\Comparator\\Factory' => __DIR__.'/..'.'/sebastian/comparator/src/Factory.php', |
|
| 580 | + 'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__.'/..'.'/sebastian/comparator/src/MockObjectComparator.php', |
|
| 581 | + 'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__.'/..'.'/sebastian/comparator/src/NumericComparator.php', |
|
| 582 | + 'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__.'/..'.'/sebastian/comparator/src/ObjectComparator.php', |
|
| 583 | + 'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__.'/..'.'/sebastian/comparator/src/ResourceComparator.php', |
|
| 584 | + 'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__.'/..'.'/sebastian/comparator/src/ScalarComparator.php', |
|
| 585 | + 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__.'/..'.'/sebastian/comparator/src/SplObjectStorageComparator.php', |
|
| 586 | + 'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__.'/..'.'/sebastian/comparator/src/TypeComparator.php', |
|
| 587 | + 'SebastianBergmann\\Diff\\Chunk' => __DIR__.'/..'.'/sebastian/diff/src/Chunk.php', |
|
| 588 | + 'SebastianBergmann\\Diff\\Diff' => __DIR__.'/..'.'/sebastian/diff/src/Diff.php', |
|
| 589 | + 'SebastianBergmann\\Diff\\Differ' => __DIR__.'/..'.'/sebastian/diff/src/Differ.php', |
|
| 590 | + 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => __DIR__.'/..'.'/sebastian/diff/src/LCS/LongestCommonSubsequence.php', |
|
| 591 | + 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => __DIR__.'/..'.'/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', |
|
| 592 | + 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => __DIR__.'/..'.'/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', |
|
| 593 | + 'SebastianBergmann\\Diff\\Line' => __DIR__.'/..'.'/sebastian/diff/src/Line.php', |
|
| 594 | + 'SebastianBergmann\\Diff\\Parser' => __DIR__.'/..'.'/sebastian/diff/src/Parser.php', |
|
| 595 | + 'SebastianBergmann\\Environment\\Console' => __DIR__.'/..'.'/sebastian/environment/src/Console.php', |
|
| 596 | + 'SebastianBergmann\\Environment\\Runtime' => __DIR__.'/..'.'/sebastian/environment/src/Runtime.php', |
|
| 597 | + 'SebastianBergmann\\Exporter\\Exporter' => __DIR__.'/..'.'/sebastian/exporter/src/Exporter.php', |
|
| 598 | + 'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__.'/..'.'/sebastian/global-state/src/Blacklist.php', |
|
| 599 | + 'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__.'/..'.'/sebastian/global-state/src/CodeExporter.php', |
|
| 600 | + 'SebastianBergmann\\GlobalState\\Exception' => __DIR__.'/..'.'/sebastian/global-state/src/Exception.php', |
|
| 601 | + 'SebastianBergmann\\GlobalState\\Restorer' => __DIR__.'/..'.'/sebastian/global-state/src/Restorer.php', |
|
| 602 | + 'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__.'/..'.'/sebastian/global-state/src/RuntimeException.php', |
|
| 603 | + 'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__.'/..'.'/sebastian/global-state/src/Snapshot.php', |
|
| 604 | + 'SebastianBergmann\\RecursionContext\\Context' => __DIR__.'/..'.'/sebastian/recursion-context/src/Context.php', |
|
| 605 | + 'SebastianBergmann\\RecursionContext\\Exception' => __DIR__.'/..'.'/sebastian/recursion-context/src/Exception.php', |
|
| 606 | + 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__.'/..'.'/sebastian/recursion-context/src/InvalidArgumentException.php', |
|
| 607 | + 'SebastianBergmann\\Version' => __DIR__.'/..'.'/sebastian/version/src/Version.php', |
|
| 608 | + 'Stringable' => __DIR__.'/..'.'/symfony/polyfill-php80/Resources/stubs/Stringable.php', |
|
| 609 | + 'Text_Template' => __DIR__.'/..'.'/phpunit/php-text-template/src/Template.php', |
|
| 610 | + 'UnhandledMatchError' => __DIR__.'/..'.'/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', |
|
| 611 | + 'ValueError' => __DIR__.'/..'.'/symfony/polyfill-php80/Resources/stubs/ValueError.php', |
|
| 612 | 612 | ); |
| 613 | 613 | |
| 614 | 614 | public static function getInitializer(ClassLoader $loader) |
| 615 | 615 | { |
| 616 | - return \Closure::bind(function () use ($loader) { |
|
| 616 | + return \Closure::bind(function() use ($loader) { |
|
| 617 | 617 | $loader->prefixLengthsPsr4 = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$prefixLengthsPsr4; |
| 618 | 618 | $loader->prefixDirsPsr4 = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$prefixDirsPsr4; |
| 619 | 619 | $loader->classMap = ComposerStaticInit4da13270269c89a28e472e1f7324e6d1::$classMap; |
@@ -6,10 +6,10 @@ |
||
| 6 | 6 | $baseDir = dirname($vendorDir); |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', |
|
| 10 | - 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', |
|
| 11 | - '60799491728b879e74601d83e38b2cad' => $vendorDir . '/illuminate/collections/helpers.php', |
|
| 12 | - '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', |
|
| 13 | - '72579e7bd17821bb1321b87411366eae' => $vendorDir . '/illuminate/support/helpers.php', |
|
| 14 | - '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', |
|
| 9 | + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', |
|
| 10 | + 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', |
|
| 11 | + '60799491728b879e74601d83e38b2cad' => $vendorDir . '/illuminate/collections/helpers.php', |
|
| 12 | + '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', |
|
| 13 | + '72579e7bd17821bb1321b87411366eae' => $vendorDir . '/illuminate/support/helpers.php', |
|
| 14 | + '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', |
|
| 15 | 15 | ); |
@@ -6,10 +6,10 @@ |
||
| 6 | 6 | $baseDir = dirname($vendorDir); |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', |
|
| 10 | - 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', |
|
| 11 | - '60799491728b879e74601d83e38b2cad' => $vendorDir . '/illuminate/collections/helpers.php', |
|
| 12 | - '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', |
|
| 13 | - '72579e7bd17821bb1321b87411366eae' => $vendorDir . '/illuminate/support/helpers.php', |
|
| 14 | - '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', |
|
| 9 | + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir.'/symfony/polyfill-mbstring/bootstrap.php', |
|
| 10 | + 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir.'/symfony/polyfill-php80/bootstrap.php', |
|
| 11 | + '60799491728b879e74601d83e38b2cad' => $vendorDir.'/illuminate/collections/helpers.php', |
|
| 12 | + '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir.'/symfony/polyfill-ctype/bootstrap.php', |
|
| 13 | + '72579e7bd17821bb1321b87411366eae' => $vendorDir.'/illuminate/support/helpers.php', |
|
| 14 | + '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir.'/symfony/deprecation-contracts/function.php', |
|
| 15 | 15 | ); |