Skip to content

Commit

Permalink
Change namespace to Port
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeboer committed May 30, 2015
1 parent df6b456 commit 9945b57
Show file tree
Hide file tree
Showing 118 changed files with 328 additions and 317 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -24,7 +24,9 @@ install:
- if [[ "$TRAVIS_PHP_VERSION" == "hhvm" ]]; then composer require mongofill/mongofill=dev-master --no-update; fi
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction

script: phpunit ${PHPUNIT_FLAGS}
script:
- vendor/bin/phpunit
- vendor/bin/phpspec run

after_script:
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
Expand Down
13 changes: 11 additions & 2 deletions composer.json
Expand Up @@ -24,16 +24,25 @@
"docs": "https://portphp.readthedocs.org"
},
"require": {
"php": ">=5.4.0"
"php": ">=5.4.0",
"psr/log": "~1.0"
},
"autoload": {
"psr-4": {
"Port\\": "src/"
}
},
"require-dev": {
"ext-iconv": "*",
"ext-mbstring": "*",
"ext-sqlite3": "*",
"phpunit/phpunit": "^4.0",
"phpspec/phpspec": "^2.1"
"phpspec/phpspec": "^2.1",
"doctrine/dbal": "~2.4",
"doctrine/orm": "~2.4",
"phpoffice/phpexcel": "~1.8",
"symfony/property-access": "2.3",
"symfony/validator": "~2.3"
},
"autoload-dev": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions spec/Exception/DuplicateHeadersExceptionSpec.php
@@ -1,6 +1,6 @@
<?php

namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;

use PhpSpec\ObjectBehavior;

Expand All @@ -13,12 +13,12 @@ function let()

function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\DuplicateHeadersException');
$this->shouldHaveType('Port\Exception\DuplicateHeadersException');
}

function it_is_a_reader_exception()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\ReaderException');
$this->shouldHaveType('Port\Exception\ReaderException');
}

function it_has_a_message()
Expand Down
6 changes: 3 additions & 3 deletions spec/Exception/MappingExceptionSpec.php
@@ -1,19 +1,19 @@
<?php

namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;

use PhpSpec\ObjectBehavior;

class MappingExceptionSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\MappingException');
$this->shouldHaveType('Port\Exception\MappingException');
}

function it_is_an_exception()
{
$this->shouldHaveType('Exception');
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}
}
6 changes: 3 additions & 3 deletions spec/Exception/ReaderExceptionSpec.php
@@ -1,19 +1,19 @@
<?php

namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;

use PhpSpec\ObjectBehavior;

class ReaderExceptionSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\ReaderException');
$this->shouldHaveType('Port\Exception\ReaderException');
}

function it_is_an_exception()
{
$this->shouldHaveType('Exception');
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}
}
6 changes: 3 additions & 3 deletions spec/Exception/SourceNotFoundExceptionSpec.php
@@ -1,19 +1,19 @@
<?php

namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;

use PhpSpec\ObjectBehavior;

class SourceNotFoundExceptionSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\SourceNotFoundException');
$this->shouldHaveType('Port\Exception\SourceNotFoundException');
}

function it_is_an_exception()
{
$this->shouldHaveType('Exception');
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}
}
6 changes: 3 additions & 3 deletions spec/Exception/UnexpectedTypeExceptionSpec.php
@@ -1,6 +1,6 @@
<?php

namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;

use PhpSpec\ObjectBehavior;

Expand All @@ -13,12 +13,12 @@ public function let()

function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\UnexpectedTypeException');
$this->shouldHaveType('Port\Exception\UnexpectedTypeException');
}

function it_is_an_unexpected_value_exception()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\UnexpectedValueException');
$this->shouldHaveType('Port\Exception\UnexpectedValueException');
}

function it_has_a_message_with_scalar_type()
Expand Down
6 changes: 3 additions & 3 deletions spec/Exception/UnexpectedValueExceptionSpec.php
@@ -1,18 +1,18 @@
<?php

namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;

use PhpSpec\ObjectBehavior;

class UnexpectedValueExceptionSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\UnexpectedValueException');
$this->shouldHaveType('Port\Exception\UnexpectedValueException');
}

function it_is_an_exception()
{
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}
}
6 changes: 3 additions & 3 deletions spec/Exception/ValidationExceptionSpec.php
@@ -1,6 +1,6 @@
<?php

namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;

use PhpSpec\ObjectBehavior;
use Symfony\Component\Validator\ConstraintViolationListInterface;
Expand All @@ -14,13 +14,13 @@ function let(ConstraintViolationListInterface $list)

function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\ValidationException');
$this->shouldHaveType('Port\Exception\ValidationException');
}

function it_is_an_exception()
{
$this->shouldHaveType('Exception');
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}

function it_has_a_list_of_violations(ConstraintViolationListInterface $list)
Expand Down
6 changes: 3 additions & 3 deletions spec/Exception/WriterExceptionSpec.php
@@ -1,19 +1,19 @@
<?php

namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;

use PhpSpec\ObjectBehavior;

class WriterExceptionSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\WriterException');
$this->shouldHaveType('Port\Exception\WriterException');
}

function it_is_an_exception()
{
$this->shouldHaveType('Exception');
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}
}
6 changes: 3 additions & 3 deletions spec/Filter/DateTimeThresholdFilterSpec.php
@@ -1,8 +1,8 @@
<?php

namespace spec\Ddeboer\DataImport\Filter;
namespace spec\Port\Filter;

use Ddeboer\DataImport\ValueConverter\DateTimeValueConverter;
use Port\ValueConverter\DateTimeValueConverter;
use PhpSpec\ObjectBehavior;

class DateTimeThresholdFilterSpec extends ObjectBehavior
Expand All @@ -14,7 +14,7 @@ function let(DateTimeValueConverter $valueConverter)

function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Filter\DateTimeThresholdFilter');
$this->shouldHaveType('Port\Filter\DateTimeThresholdFilter');
}

function it_throws_an_exception_when_no_threshold_is_set()
Expand Down
4 changes: 2 additions & 2 deletions spec/Filter/OffsetFilterSpec.php
@@ -1,6 +1,6 @@
<?php

namespace spec\Ddeboer\DataImport\Filter;
namespace spec\Port\Filter;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand All @@ -9,7 +9,7 @@ class OffsetFilterSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Filter\OffsetFilter');
$this->shouldHaveType('Port\Filter\OffsetFilter');
}

function it_does_not_limit_by_default()
Expand Down
6 changes: 3 additions & 3 deletions spec/Filter/ValidatorFilterSpec.php
@@ -1,6 +1,6 @@
<?php

namespace spec\Ddeboer\DataImport\Filter;
namespace spec\Port\Filter;

use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintViolationList;
Expand Down Expand Up @@ -32,7 +32,7 @@ function let(ValidatorInterface $validator)

function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Filter\ValidatorFilter');
$this->shouldHaveType('Port\Filter\ValidatorFilter');
}

function it_validates_an_item(ValidatorInterface $validator, Constraint $constraint, ConstraintViolationList $list)
Expand Down Expand Up @@ -77,7 +77,7 @@ function it_validates_an_item_and_the_validation_fails_with_exception(ValidatorI
$this->throwExceptions(true);
$this->add('key1', $constraint);

$this->shouldThrow('Ddeboer\DataImport\Exception\ValidationException')->during__invoke($this->item1);
$this->shouldThrow('Port\Exception\ValidationException')->during__invoke($this->item1);

$this->getViolations()->shouldReturn([1 => $list]);
}
Expand Down
6 changes: 3 additions & 3 deletions spec/Reader/Factory/CsvReaderFactorySpec.php
@@ -1,20 +1,20 @@
<?php

namespace spec\Ddeboer\DataImport\Reader\Factory;
namespace spec\Port\Reader\Factory;

use PhpSpec\ObjectBehavior;

class CsvReaderFactorySpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\CsvReaderFactory');
$this->shouldHaveType('Port\Reader\Factory\CsvReaderFactory');
}

function it_creates_a_reader()
{
$file = new \SplFileObject(tempnam(sys_get_temp_dir(), null));

$this->getReader($file)->shouldHaveType('Ddeboer\DataImport\Reader\CsvReader');
$this->getReader($file)->shouldHaveType('Port\Reader\CsvReader');
}
}
6 changes: 3 additions & 3 deletions spec/Reader/Factory/DbalReaderFactorySpec.php
@@ -1,6 +1,6 @@
<?php

namespace spec\Ddeboer\DataImport\Reader\Factory;
namespace spec\Port\Reader\Factory;

use Doctrine\DBAL\Connection;
use PhpSpec\ObjectBehavior;
Expand All @@ -14,11 +14,11 @@ function let(Connection $dbal)

function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\DbalReaderFactory');
$this->shouldHaveType('Port\Reader\Factory\DbalReaderFactory');
}

function it_creates_a_reader()
{
$this->getReader('SQL', [])->shouldHaveType('Ddeboer\DataImport\Reader\DbalReader');
$this->getReader('SQL', [])->shouldHaveType('Port\Reader\DbalReader');
}
}
6 changes: 3 additions & 3 deletions spec/Reader/Factory/DoctrineReaderFactorySpec.php
@@ -1,6 +1,6 @@
<?php

namespace spec\Ddeboer\DataImport\Reader\Factory;
namespace spec\Port\Reader\Factory;

use Doctrine\Common\Persistence\ObjectManager;
use PhpSpec\ObjectBehavior;
Expand All @@ -14,11 +14,11 @@ function let(ObjectManager $objectManager)

function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\DoctrineReaderFactory');
$this->shouldHaveType('Port\Reader\Factory\DoctrineReaderFactory');
}

function it_creates_a_reader()
{
$this->getReader('Entity')->shouldHaveType('Ddeboer\DataImport\Reader\DoctrineReader');
$this->getReader('Entity')->shouldHaveType('Port\Reader\DoctrineReader');
}
}
6 changes: 3 additions & 3 deletions spec/Reader/Factory/ExcelReaderFactorySpec.php
@@ -1,20 +1,20 @@
<?php

namespace spec\Ddeboer\DataImport\Reader\Factory;
namespace spec\Port\Reader\Factory;

use PhpSpec\ObjectBehavior;

class ExcelReaderFactorySpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\ExcelReaderFactory');
$this->shouldHaveType('Port\Reader\Factory\ExcelReaderFactory');
}

function it_creates_a_reader()
{
$file = new \SplFileObject(tempnam(sys_get_temp_dir(), null));

$this->getReader($file)->shouldHaveType('Ddeboer\DataImport\Reader\ExcelReader');
$this->getReader($file)->shouldHaveType('Port\Reader\ExcelReader');
}
}
4 changes: 2 additions & 2 deletions spec/ResultSpec.php
@@ -1,6 +1,6 @@
<?php

namespace spec\Ddeboer\DataImport;
namespace spec\Port;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand All @@ -16,7 +16,7 @@ function let(\DateTime $startTime, \DateTime $endTime, \SplObjectStorage $except

function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Result');
$this->shouldHaveType('Port\Result');
}

function it_has_a_name()
Expand Down

0 comments on commit 9945b57

Please sign in to comment.