Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
27pchrisl committed Feb 13, 2022
1 parent 604d892 commit c47e7a7
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ parameters:
- src/Helper/Symfony/Response5.php
analyse:
- src/Helper/Flysystem/Flysystem1.php
- tests/Helpers/Flysystem/TestFilesystemAdapter2.php
- tests/Helpers/Flysystem/TestFilesystemAdapter1.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
use League\Flysystem\Filesystem as Flysystem;
use SplFileInfo;

class TestFilesystemAdapter2
/**
* Flysystem 1.x test adapter
*/
class TestFilesystemAdapter1
{
public function bind()
{
Expand Down
3 changes: 3 additions & 0 deletions tests/Helpers/Flysystem/TestFilesystemAdapter3.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
use League\Flysystem\Filesystem;
use League\Flysystem\Local\LocalFilesystemAdapter;

/**
* Flysystem 3.x test adapter
*/
class TestFilesystemAdapter3 extends LocalFilesystemAdapter
{
public function bind()
Expand Down
9 changes: 9 additions & 0 deletions tests/Helpers/PHPStan/Response5.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace Flat3\Lodata\Helper\Symfony;

use Symfony\Component\HttpFoundation\Response;

class Response5 extends Response
{
}
9 changes: 2 additions & 7 deletions tests/Helpers/PHPStanHelper.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<?php

namespace Flat3\Lodata\Helper\Symfony;

use Symfony\Component\HttpFoundation\Response;

class Response5 extends Response
{
}
// Shim to prevent fatal errors when loading the response class
require_once(__DIR__.'/PHPStan/Response5.php');
4 changes: 2 additions & 2 deletions tests/Helpers/TestFilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Flat3\Lodata\Tests\Helpers;

use Flat3\Lodata\Tests\Helpers\Flysystem\TestFilesystemAdapter2;
use Flat3\Lodata\Tests\Helpers\Flysystem\TestFilesystemAdapter1;
use Flat3\Lodata\Tests\Helpers\Flysystem\TestFilesystemAdapter3;

class TestFilesystemAdapter
Expand All @@ -19,7 +19,7 @@ public static function root(): string
public static function bind()
{
$adapter = class_exists('League\Flysystem\Local\LocalFilesystemAdapter') ?
new TestFilesystemAdapter3(self::root()) : new TestFilesystemAdapter2;
new TestFilesystemAdapter3(self::root()) : new TestFilesystemAdapter1;

$adapter->bind();
}
Expand Down

0 comments on commit c47e7a7

Please sign in to comment.