Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Coder/Coder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,35 @@
public function encode(string $decoded): string
{
try {
return $this->doEncode($decoded);
return @$this->doEncode($decoded);

Check notice on line 17 in src/Coder/Coder.php

View workflow job for this annotation

GitHub Actions / run

* [No silenced errors] Silencing errors is discouraged; found: @$this->doEncode...
} catch (Exception\CoderCouldNotEncodeData $exception) {
throw $exception;
} catch (Throwable $reason) {
throw new Exception\CoderCouldNotEncodeData(__METHOD__, $decoded, $reason);

Check notice on line 21 in src/Coder/Coder.php

View workflow job for this annotation

GitHub Actions / run

* [Line length] Line exceeds 80 characters; contains 87 characters
}
}

public function decode(string $encoded): string
{
try {
return $this->doDecode($encoded);
return @$this->doDecode($encoded);

Check notice on line 28 in src/Coder/Coder.php

View workflow job for this annotation

GitHub Actions / run

* [No silenced errors] Silencing errors is discouraged; found: @$this->doDecode...
} catch (Exception\CoderCouldNotDecodeData $exception) {
throw $exception;
} catch (Throwable $reason) {
throw new Exception\CoderCouldNotDecodeData(__METHOD__, $encoded, $reason);

Check notice on line 32 in src/Coder/Coder.php

View workflow job for this annotation

GitHub Actions / run

* [Line length] Line exceeds 80 characters; contains 87 characters
}
}

/**
* @note errors will be silenced
*
* @throws Throwable
*/
abstract protected function doEncode(string $decoded): string;

/**
* @note errors will be silenced
*
* @throws Throwable
*/
abstract protected function doDecode(string $encoded): string;
Expand Down
8 changes: 6 additions & 2 deletions src/Serializer/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,35 @@
public function serialize(mixed $serializable): string
{
try {
return $this->doSerialize($serializable);
return @$this->doSerialize($serializable);

Check notice on line 17 in src/Serializer/Serializer.php

View workflow job for this annotation

GitHub Actions / run

* [No silenced errors] Silencing errors is discouraged; found: @$this->doSerialize...
} catch (Exception\SerializerCouldNotSerializeData $exception) {
throw $exception;
} catch (Throwable $reason) {
throw new Exception\SerializerCouldNotSerializeData(__METHOD__, $serializable, $reason);

Check notice on line 21 in src/Serializer/Serializer.php

View workflow job for this annotation

GitHub Actions / run

* [Line length] Line exceeds 80 characters; contains 100 characters
}
}

public function unserialize(string $serialized): mixed
{
try {
return $this->doUnserialize($serialized);
return @$this->doUnserialize($serialized);

Check notice on line 28 in src/Serializer/Serializer.php

View workflow job for this annotation

GitHub Actions / run

* [No silenced errors] Silencing errors is discouraged; found: @$this->doUnserialize...
} catch (Exception\SerializerCouldNotUnserializeData $exception) {
throw $exception;
} catch (Throwable $reason) {
throw new Exception\SerializerCouldNotUnserializeData(__METHOD__, $serialized, $reason);

Check notice on line 32 in src/Serializer/Serializer.php

View workflow job for this annotation

GitHub Actions / run

* [Line length] Line exceeds 80 characters; contains 100 characters
}
}

/**
* @note errors will be silenced
*
* @throws Throwable
*/
abstract protected function doSerialize(mixed $serializable): string;

/**
* @note errors will be silenced
*
* @throws Throwable
*/
abstract protected function doUnserialize(string $serialized): mixed;
Expand Down
Loading