tests/UploadProcessorTest.php
File UploadProcessorTest.php
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Filestack\Tests;
use Filestack\FilestackConfig;
use Filestack\UploadProcessor;
Method testProcessChunks
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testProcessChunks()
{
$mock_response1 = new MockHttpResponse(408, '{"error": "timed out"}');
$mock_response2 = new MockHttpResponse(504, '{"error": "Gateway timed out"}');
$mock_response3 = new MockHttpResponse(200,
Method testCreatePartsIntelligentSuccess
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testCreatePartsIntelligentSuccess()
{
$mock_response = new MockHttpResponse(200,
json_encode([
'filename' => 'somefilename.jpg',
Method testProcessPartsIntelligentSuccess
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testProcessPartsIntelligentSuccess()
{
$test_headers = ['ETag' =>['some-etag']];
$mock_response = new MockHttpResponse(200,
json_encode([
Method testProcessPartsSuccess
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testProcessPartsSuccess()
{
$test_headers = ['ETag' =>['some-etag']];
$mock_response = new MockHttpResponse(200,
json_encode([
Method testCommitPartException
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testCommitPartException()
{
$this->expectException(FilestackException::class);
$this->expectExceptionCode(400);
Avoid unused local variables such as '$parts'. Open
Open
$parts = $upload_processor->callHandleS3PromisesResult($s3_results);
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}