File tree Expand file tree Collapse file tree 6 files changed +16
-16
lines changed Expand file tree Collapse file tree 6 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,7 @@ before_script:
5
5
- php composer.phar install
6
6
7
7
script :
8
- - php vendor/bin/phpunit tests
9
- - php vendor/bin/php-cs-fixer fix --dry-run --config .php_cs.dist -v
10
- - php vendor/bin/phpstan analyse
8
+ - php composer.phar test
11
9
12
10
php :
13
11
- 7.1
Original file line number Diff line number Diff line change 30
30
}
31
31
},
32
32
"scripts" : {
33
- "lint " : " php-cs-fixer fix --verbose --show-progress=estimating" ,
34
- "lint :check" : [
33
+ "fixer " : " php-cs-fixer fix --verbose --show-progress=estimating" ,
34
+ "fixer :check" : [
35
35
" php-cs-fixer fix --dry-run --verbose --show-progress=estimating"
36
36
],
37
37
"phpunit" : " phpunit tests" ,
38
38
"phpstan" : " phpstan analyse" ,
39
39
"test" : [
40
- " @lint :check" ,
40
+ " @fixer :check" ,
41
41
" @phpunit" ,
42
42
" @phpstan"
43
43
]
Original file line number Diff line number Diff line change 15
15
16
16
namespace MultiTheftAuto \Sdk \Model ;
17
17
18
+ use MultiTheftAuto \Sdk \Model \Resource as MtaResource ;
19
+
18
20
class Resources
19
21
{
20
22
/**
21
- * @var Resource []
23
+ * @var MtaResource []
22
24
*/
23
25
protected $ resources = [];
24
26
25
- public function findByName (string $ name ): ?Resource
27
+ public function findByName (string $ name ): ?MtaResource
26
28
{
27
- $ found = array_filter ($ this ->resources , function (Resource $ resource ) use ($ name ) {
29
+ $ found = array_filter ($ this ->resources , function (MtaResource $ resource ) use ($ name ) {
28
30
return $ resource ->getName () == $ name ;
29
31
});
30
32
31
33
$ resource = current ($ found );
32
34
return $ resource ? $ resource : null ;
33
35
}
34
36
35
- public function add (Resource $ resource ): void
37
+ public function add (MtaResource $ resource ): void
36
38
{
37
39
$ this ->resources [] = $ resource ;
38
40
}
Original file line number Diff line number Diff line change 19
19
use Http \Client \HttpClient ;
20
20
use Http \Discovery \HttpClientDiscovery ;
21
21
use Http \Discovery \MessageFactoryDiscovery ;
22
+ use Http \Message \Authentication \BasicAuth ;
22
23
use Http \Message \MessageFactory ;
23
24
use MultiTheftAuto \Sdk \Authentication \Credential ;
24
25
use MultiTheftAuto \Sdk \Model \Resource ;
28
29
use MultiTheftAuto \Sdk \Response \HttpStatusVerification ;
29
30
use MultiTheftAuto \Sdk \Utils \Input ;
30
31
use MultiTheftAuto \Sdk \Utils \Translator ;
31
- use Http \Message \Authentication \BasicAuth ;
32
32
33
33
class Mta
34
34
{
Original file line number Diff line number Diff line change 4
4
5
5
namespace MultiTheftAuto \Sdk ;
6
6
7
+ use Http \Mock \Client ;
8
+ use MultiTheftAuto \Sdk \Authentication \Credential ;
7
9
use MultiTheftAuto \Sdk \Model \Element ;
8
10
use MultiTheftAuto \Sdk \Model \Resource ;
11
+ use MultiTheftAuto \Sdk \Model \Server ;
9
12
use PHPUnit \Framework \TestCase ;
10
- use Http \Mock \Client ;
11
13
use Psr \Http \Message \ResponseInterface ;
12
- use MultiTheftAuto \Sdk \Model \Server ;
13
- use MultiTheftAuto \Sdk \Authentication \Credential ;
14
14
15
15
class MtaTest extends TestCase
16
16
{
Original file line number Diff line number Diff line change 15
15
16
16
namespace MultiTheftAuto \Sdk \Utils ;
17
17
18
- use PHPUnit \Framework \TestCase ;
19
- use MultiTheftAuto \Sdk \Model \Resource ;
20
18
use MultiTheftAuto \Sdk \Model \Element ;
19
+ use MultiTheftAuto \Sdk \Model \Resource ;
20
+ use PHPUnit \Framework \TestCase ;
21
21
22
22
class TranslatorTest extends TestCase
23
23
{
You can’t perform that action at this time.
0 commit comments