Test Setup Failed
Push — master ( bcd5a1...e5f8b7 )
by Daniel
02:52
created

LaravelGmailTest::getEnvironmentSetUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
use Dacastro4\LaravelGmail\Facade\LaravelGmail;
4
use Dacastro4\LaravelGmail\LaravelGmailClass;
5
use Tests\TestCase;
6
7
class LaravelGmailTest extends TestCase
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
8
{
9
10
	/**
11
	 * @var LaravelGmailClass
12
	 */
13
	public $laravel;
14
15
	protected function getEnvironmentSetUp( $app )
16
	{
17
		$this->laravel = new LaravelGmailClass($app['config']);
18
	}
19
20
	/**
21
	 * @test
22
	 */
23
	public function returns_gmail_authentication_url()
24
	{
25
		$url = $this->laravel->getAuthUrl();
0 ignored issues
show
Unused Code introduced by
$url is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
26
27
	}
28
29
}
30