This repository was archived by the owner on Jul 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 11 files changed +16
-16
lines changed
src/SoapBox/Formatter/Parsers Expand file tree Collapse file tree 11 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 2
2
3
3
use InvalidArgumentException ;
4
4
5
- class ArrayParser extends ParserInterface {
5
+ class ArrayParser extends Parser {
6
6
7
7
private $ array ;
8
8
Original file line number Diff line number Diff line change 3
3
use InvalidArgumentException ;
4
4
use League \Csv \Reader ;
5
5
6
- class CsvParser extends ParserInterface {
6
+ class CsvParser extends Parser {
7
7
8
8
private $ csv ;
9
9
Original file line number Diff line number Diff line change 1
1
<?php namespace SoapBox \Formatter \Parsers ;
2
2
3
- class JsonParser extends ParserInterface {
3
+ class JsonParser extends Parser {
4
4
5
5
private $ json ;
6
6
Original file line number Diff line number Diff line change 9
9
* This interface describes the abilities of a parser which is able to transform
10
10
* inputs to the object type.
11
11
*/
12
- abstract class ParserInterface {
12
+ abstract class Parser {
13
13
14
14
/**
15
15
* Constructor is used to initialize the parser
Original file line number Diff line number Diff line change 1
1
<?php namespace SoapBox \Formatter \Parsers ;
2
2
3
- class XmlParser extends ParserInterface {
3
+ class XmlParser extends Parser {
4
4
5
5
private $ xml ;
6
6
Original file line number Diff line number Diff line change 3
3
use InvalidArgumentException ;
4
4
use Spyc ;
5
5
6
- class YamlParser extends ParserInterface {
6
+ class YamlParser extends Parser {
7
7
8
8
private $ array ;
9
9
Original file line number Diff line number Diff line change 2
2
3
3
use stdClass ;
4
4
use SoapBox \Formatter \Test \TestCase ;
5
- use SoapBox \Formatter \Parsers \ParserInterface ;
5
+ use SoapBox \Formatter \Parsers \Parser ;
6
6
use SoapBox \Formatter \Parsers \ArrayParser ;
7
7
8
8
class ArrayParserTest extends TestCase {
9
9
10
10
public function testArrayParserIsInstanceOfParserInterface () {
11
11
$ parser = new ArrayParser (new \stdClass );
12
- $ this ->assertTrue ($ parser instanceof ParserInterface );
12
+ $ this ->assertTrue ($ parser instanceof Parser );
13
13
}
14
14
15
15
public function testConstructorAcceptsSerializedArray () {
Original file line number Diff line number Diff line change 1
1
<?php namespace SoapBox \Formatter \Test \Parsers ;
2
2
3
3
use SoapBox \Formatter \Test \TestCase ;
4
- use SoapBox \Formatter \Parsers \ParserInterface ;
4
+ use SoapBox \Formatter \Parsers \Parser ;
5
5
use SoapBox \Formatter \Parsers \CsvParser ;
6
6
7
7
class CsvParserTest extends TestCase {
@@ -11,7 +11,7 @@ class CsvParserTest extends TestCase {
11
11
12
12
public function testCsvParserIsInstanceOfParserInterface () {
13
13
$ parser = new CsvParser ('' );
14
- $ this ->assertTrue ($ parser instanceof ParserInterface );
14
+ $ this ->assertTrue ($ parser instanceof Parser );
15
15
}
16
16
17
17
/**
Original file line number Diff line number Diff line change 1
1
<?php namespace SoapBox \Formatter \Test \Parsers ;
2
2
3
3
use SoapBox \Formatter \Test \TestCase ;
4
- use SoapBox \Formatter \Parsers \ParserInterface ;
4
+ use SoapBox \Formatter \Parsers \Parser ;
5
5
use SoapBox \Formatter \Parsers \JsonParser ;
6
6
7
7
class JsonParserTest extends TestCase {
8
8
9
9
public function testJsonParserIsInstanceOfParserInterface () {
10
10
$ parser = new JsonParser ('' );
11
- $ this ->assertTrue ($ parser instanceof ParserInterface );
11
+ $ this ->assertTrue ($ parser instanceof Parser );
12
12
}
13
13
14
14
public function testtoArrayReturnsArrayRepresentationOfJsonObject () {
Original file line number Diff line number Diff line change 1
1
<?php namespace SoapBox \Formatter \Test \Parsers ;
2
2
3
3
use SoapBox \Formatter \Test \TestCase ;
4
- use SoapBox \Formatter \Parsers \ParserInterface ;
4
+ use SoapBox \Formatter \Parsers \Parser ;
5
5
use SoapBox \Formatter \Parsers \XmlParser ;
6
6
7
7
class XmlParserTest extends TestCase {
8
8
9
9
public function testXmlParserIsInstanceOfParserInterface () {
10
10
$ parser = new XmlParser ('' );
11
- $ this ->assertTrue ($ parser instanceof ParserInterface );
11
+ $ this ->assertTrue ($ parser instanceof Parser );
12
12
}
13
13
14
14
public function testtoArrayReturnsArrayRepresenationOfXmlObject () {
You can’t perform that action at this time.
0 commit comments