Skip to content

Commit

Permalink
code coverage ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed Apr 29, 2021
1 parent cfd11f3 commit d6d3d23
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Spawn/Channeled.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ public static function throwClosed(string $errorMessage): void
throw new \Error($errorMessage);
}

/**
* @codeCoverageIgnore
*/
public static function throwIllegalValue(string $errorMessage): void
{
throw new \InvalidArgumentException($errorMessage);
Expand Down
10 changes: 8 additions & 2 deletions Spawn/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ function parallel($task, ...$argv): FutureInterface
}
}

// @codeCoverageIgnoreStart
$executable = function () use ($task, $argv, $___parallel___) {
if (\is_array($___parallel___))
\set_globals($___parallel___);
Expand All @@ -344,6 +345,7 @@ function parallel($task, ...$argv): FutureInterface
$___channeled___ = 'parallel';
return $task(...$argv);
};
// @codeCoverageIgnoreEnd

return Spawn::create($executable, 0, $channel, false)->displayOn();
}
Expand Down Expand Up @@ -440,6 +442,8 @@ function get_globals(array $vars): array
/**
* Returns an array of all `user defined` global variables, without `super globals`.
* @return array
*
* @codeCoverageIgnore
*/
function parallel_globals(): array
{
Expand All @@ -462,8 +466,9 @@ function set_globals(array $spawn_globals): void
* Check if a string is base64 valid, or has `encoded` mixed data.
*
* @param string $input
*
* @return bool|null if `null` **$input** is mixed with `encode` data.
*
* @codeCoverageIgnore
*/
function is_base64($input): ?bool
{
Expand Down Expand Up @@ -521,8 +526,9 @@ function deserializer($input)
* **serialized** decoded data representation.
*
* @param string $input
*
* @return mixed
*
* @codeCoverageIgnore
*/
function deserialize($input)
{
Expand Down
2 changes: 1 addition & 1 deletion Spawn/SerializableException.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function asThrowable(): Throwable
try {
/** @var Throwable $throwable */
$throwable = new $this->class($this->message . "\n\n" . $this->trace);
} catch (Throwable $exception) {
// @codeCoverageIgnoreStart
} catch (Throwable $exception) {
$throwable = new \Exception($this->message . "\n\n" . $this->trace, 0, $exception);
// @codeCoverageIgnoreEnd
}
Expand Down

0 comments on commit d6d3d23

Please sign in to comment.