Skip to content

Commit c8f64f2

Browse files
committed
Apply fixes from StyleCI
1 parent f45e94e commit c8f64f2

15 files changed

+22
-40
lines changed

spec/Bibs/ElectronicCollectionsSpec.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
namespace spec\Scriptotek\Alma\Bibs;
44

5+
use PhpSpec\ObjectBehavior;
56
use Scriptotek\Alma\Bibs\Bib;
67
use Scriptotek\Alma\Bibs\ElectronicCollections;
78
use Scriptotek\Alma\Client as AlmaClient;
8-
use PhpSpec\ObjectBehavior;
9-
use Prophecy\Argument;
109
use Scriptotek\Alma\Electronic\Collection;
1110
use spec\Scriptotek\Alma\SpecHelper;
1211

@@ -18,7 +17,7 @@ public function let(AlmaClient $client, Bib $bib)
1817
$this->beConstructedWith($client, $bib);
1918
}
2019

21-
function it_is_initializable()
20+
public function it_is_initializable()
2221
{
2322
$this->shouldHaveType(ElectronicCollections::class);
2423
}

spec/Bibs/FileSpec.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
namespace spec\Scriptotek\Alma\Bibs;
44

5+
use PhpSpec\ObjectBehavior;
56
use Scriptotek\Alma\Bibs\Bib;
6-
use Scriptotek\Alma\Bibs\Representation;
77
use Scriptotek\Alma\Bibs\File;
8+
use Scriptotek\Alma\Bibs\Representation;
89
use Scriptotek\Alma\Client as AlmaClient;
9-
use PhpSpec\ObjectBehavior;
10-
use Prophecy\Argument;
1110

1211
class FileSpec extends ObjectBehavior
1312
{
@@ -24,5 +23,4 @@ public function it_is_initializable()
2423
{
2524
$this->shouldHaveType(File::class);
2625
}
27-
2826
}

spec/Bibs/FilesSpec.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
namespace spec\Scriptotek\Alma\Bibs;
44

5+
use PhpSpec\ObjectBehavior;
56
use Scriptotek\Alma\Bibs\Bib;
6-
use Scriptotek\Alma\Bibs\Representation;
77
use Scriptotek\Alma\Bibs\Files;
8+
use Scriptotek\Alma\Bibs\Representation;
89
use Scriptotek\Alma\Client as AlmaClient;
9-
use PhpSpec\ObjectBehavior;
10-
use Prophecy\Argument;
1110
use spec\Scriptotek\Alma\SpecHelper;
1211

1312
class FilesSpec extends ObjectBehavior

spec/Bibs/PortfolioSpec.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace spec\Scriptotek\Alma\Bibs;
44

55
use PhpSpec\ObjectBehavior;
6-
use Prophecy\Argument;
76
use Scriptotek\Alma\Bibs\Bib;
87
use Scriptotek\Alma\Bibs\Portfolio;
98
use Scriptotek\Alma\Bibs\Portfolios;
@@ -20,7 +19,7 @@ public function let(AlmaClient $client, Bib $bib)
2019
$this->beConstructedWith($client, $bib, $portfolio_id);
2120
}
2221

23-
function it_is_initializable()
22+
public function it_is_initializable()
2423
{
2524
$this->shouldHaveType(Portfolio::class);
2625
}
@@ -45,4 +44,5 @@ public function it_belongs_to_collection(AlmaClient $client)
4544

4645
$this->getElectronicCollection()->shouldHaveType(Collection::class);
4746
$this->electronic_collection->shouldHaveType(Collection::class);
48-
}}
47+
}
48+
}

spec/Bibs/PortfoliosSpec.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
namespace spec\Scriptotek\Alma\Bibs;
44

55
use PhpSpec\ObjectBehavior;
6-
use Prophecy\Argument;
76
use Scriptotek\Alma\Bibs\Bib;
8-
use Scriptotek\Alma\Bibs\Portfolio;
97
use Scriptotek\Alma\Bibs\Portfolios;
108
use Scriptotek\Alma\Client as AlmaClient;
119
use spec\Scriptotek\Alma\SpecHelper;
@@ -18,7 +16,7 @@ public function let(AlmaClient $client, Bib $bib)
1816
$this->beConstructedWith($client, $bib);
1917
}
2018

21-
function it_is_initializable()
19+
public function it_is_initializable()
2220
{
2321
$this->shouldHaveType(Portfolios::class);
2422
}

spec/Bibs/RepresentationSpec.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
namespace spec\Scriptotek\Alma\Bibs;
44

5+
use PhpSpec\ObjectBehavior;
56
use Scriptotek\Alma\Bibs\Bib;
67
use Scriptotek\Alma\Bibs\File;
7-
use Scriptotek\Alma\Bibs\Representations;
88
use Scriptotek\Alma\Bibs\Representation;
9+
use Scriptotek\Alma\Bibs\Representations;
910
use Scriptotek\Alma\Client as AlmaClient;
10-
use PhpSpec\ObjectBehavior;
11-
use Prophecy\Argument;
1211
use spec\Scriptotek\Alma\SpecHelper;
1312

1413
class RepresentationSpec extends ObjectBehavior
@@ -52,5 +51,4 @@ public function it_has_files(AlmaClient $client)
5251
$files->valid()->shouldBe(true);
5352
$files->current()->shouldHaveType(File::class);
5453
}
55-
5654
}

spec/Bibs/RepresentationsSpec.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
namespace spec\Scriptotek\Alma\Bibs;
44

5+
use PhpSpec\ObjectBehavior;
56
use Scriptotek\Alma\Bibs\Bib;
67
use Scriptotek\Alma\Bibs\Representations;
78
use Scriptotek\Alma\Client as AlmaClient;
8-
use PhpSpec\ObjectBehavior;
9-
use Prophecy\Argument;
109
use spec\Scriptotek\Alma\SpecHelper;
1110

1211
class RepresentationsSpec extends ObjectBehavior
@@ -17,7 +16,7 @@ public function let(AlmaClient $client, Bib $bib)
1716
$this->beConstructedWith($client, $bib);
1817
}
1918

20-
function it_is_initializable()
19+
public function it_is_initializable()
2120
{
2221
$this->shouldHaveType(Representations::class);
2322
}

spec/Electronic/CollectionSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace spec\Scriptotek\Alma\Electronic;
44

55
use PhpSpec\ObjectBehavior;
6-
use Scriptotek\Alma\Electronic\Collection;
76
use Scriptotek\Alma\Client as AlmaClient;
7+
use Scriptotek\Alma\Electronic\Collection;
88
use spec\Scriptotek\Alma\SpecHelper;
99

1010
class CollectionSpec extends ObjectBehavior

spec/SpecHelper.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
namespace spec\Scriptotek\Alma;
44

55
use Danmichaelo\QuiteSimpleXMLElement\QuiteSimpleXMLElement;
6-
use function GuzzleHttp\Psr7\stream_for;
76
use Http\Client\Common\Exception\ClientErrorException;
87
use Http\Factory\Guzzle\RequestFactory;
98
use Http\Factory\Guzzle\ResponseFactory;
109
use Prophecy\Argument;
10+
use function GuzzleHttp\Psr7\stream_for;
1111

1212
class SpecHelper
1313
{
@@ -40,8 +40,7 @@ public static function makeExceptionResponse(
4040
$code = 400,
4141
$contentType = 'application/json;charset=utf-8',
4242
$cls = ClientErrorException::class
43-
)
44-
{
43+
) {
4544
$requestFactory = new RequestFactory();
4645
$responseFactory = new ResponseFactory();
4746

@@ -52,7 +51,5 @@ public static function makeExceptionResponse(
5251
->withHeader('Content-Type', $contentType)
5352
->withBody(stream_for($body))
5453
);
55-
56-
5754
}
5855
}

spec/Users/UsersSpec.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
namespace spec\Scriptotek\Alma\Users;
44

5-
use Http\Mock\Client as MockHttp;
65
use PhpSpec\ObjectBehavior;
76
use Prophecy\Argument;
87
use Scriptotek\Alma\Client as AlmaClient;
9-
use Scriptotek\Alma\Exception\RequestFailed;
108
use Scriptotek\Alma\Users\User;
119
use Scriptotek\Alma\Users\Users;
12-
use Scriptotek\Alma\Zones;
1310
use spec\Scriptotek\Alma\SpecHelper;
1411

1512
class UsersSpec extends ObjectBehavior

0 commit comments

Comments
 (0)