Skip to content

Commit

Permalink
Merge pull request #68 from gsteel/llaminas-lzf
Browse files Browse the repository at this point in the history
Fix Llaminas -> Lzf Typos
  • Loading branch information
Ocramius authored Oct 11, 2022
2 parents 3640af9 + b7da1d3 commit c48e8a3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 32 deletions.
12 changes: 6 additions & 6 deletions docs/book/standard-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ The following compression formats are supported by their own adapter:

- **Bz2**
- **Gz**
- **Llaminas**
- **Lzf**
- **Rar**
- **Tar**
- **Zip**
Expand Down Expand Up @@ -622,17 +622,17 @@ All options can be set at initiation or by using a related method. For example,
for `level` are `getLevel()` and `setLevel()`. You can also use the `setOptions()` method which
accepts an array of all options.

### Llaminas Adapter
### Lzf Adapter

The Llaminas Adapter can compress and decompress:
The Lzf Adapter can compress and decompress:

- Strings

> ### Llaminas supports only Strings
> ### Lzf supports only Strings
>
> The Llaminas adapter can not handle files and directories.
> The Lzf adapter can not handle files and directories.
This adapter makes use of PHP's Llaminas extension.
This adapter makes use of PHP's Lzf extension.

There are no options available to customize this adapter.

Expand Down
18 changes: 1 addition & 17 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.27.0@faf106e717c37b8c81721845dba9de3d8deed8ff">
<files psalm-version="4.28.0@52e96bea381e6cb07a672aefec791a5817694a26">
<file src="src/AbstractDateDropdown.php">
<MissingReturnType occurrences="1">
<code>filterable</code>
Expand Down Expand Up @@ -1773,22 +1773,6 @@
<code>null</code>
</NullArgument>
</file>
<file src="test/Compress/LzfTest.php">
<MixedAssignment occurrences="3">
<code>$compressed</code>
<code>$filter</code>
<code>$filter</code>
</MixedAssignment>
<MixedMethodCall occurrences="3">
<code>compress</code>
<code>decompress</code>
<code>toString</code>
</MixedMethodCall>
<UndefinedClass occurrences="2">
<code>LlaminasCompression</code>
<code>LlaminasCompression</code>
</UndefinedClass>
</file>
<file src="test/Compress/RarTest.php">
<InvalidArgument occurrences="1">
<code>$callback</code>
Expand Down
18 changes: 9 additions & 9 deletions test/Compress/LzfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace LaminasTest\Filter\Compress;

use Laminas\Filter\Compress\Llaminas as LlaminasCompression;
use Laminas\Filter\Compress\Lzf;
use PHPUnit\Framework\TestCase;

use function extension_loaded;
Expand All @@ -13,8 +13,8 @@ class LzfTest extends TestCase
{
public function setUp(): void
{
if (! extension_loaded('llaminas')) {
$this->markTestSkipped('This adapter needs the llaminas extension');
if (! extension_loaded('lzf')) {
self::markTestSkipped('This adapter needs the lzf extension');
}
}

Expand All @@ -23,22 +23,22 @@ public function setUp(): void
*/
public function testBasicUsage(): void
{
$filter = new LlaminasCompression();
$filter = new Lzf();

$text = 'compress me';
$compressed = $filter->compress($text);
$this->assertNotEquals($text, $compressed);
self::assertNotEquals($text, $compressed);

$decompressed = $filter->decompress($compressed);
$this->assertSame($text, $decompressed);
self::assertSame($text, $decompressed);
}

/**
* testing toString
*/
public function testLlaminasToString(): void
public function testLzfToString(): void
{
$filter = new LlaminasCompression();
$this->assertSame('Llaminas', $filter->toString());
$filter = new Lzf();
self::assertSame('Lzf', $filter->toString());
}
}

0 comments on commit c48e8a3

Please sign in to comment.