diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 265afb8..2f51368 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,26 +12,27 @@ test:5.6:
before_script:
- bash build/docker_install.sh > /dev/null
- curl -sS https://getcomposer.org/installer | php
- - php composer.phar install --no-dev
+ - php composer.phar update
+ - php composer.phar install
image: php:5.6
script:
- - phpunit -c build
+ - vendor/bin/phpunit --coverage-text --colors=never
test:7:
before_script:
- bash build/docker_install.sh > /dev/null
- curl -sS https://getcomposer.org/installer | php
- - php composer.phar install --no-dev
+ - php composer.phar update
+ - php composer.phar install
image: php:7
script:
- - phpunit -c build
+ - vendor/bin/phpunit --coverage-text --colors=never
test:hhvm:
before_script:
- /usr/local/bin/composer self-update
- - curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar
- - chmod +x /usr/local/bin/phpunit
- - composer install --no-dev
+ - composer update
+ - composer install
image: 51systems/docker-gitlab-ci-runner-hhvm
script:
- - phpunit -c build
\ No newline at end of file
+ - vendor/bin/phpunit --coverage-text --colors=never
\ No newline at end of file
diff --git a/RoboFile.php b/RoboFile.php
index 2af1ee8..47ba7d7 100644
--- a/RoboFile.php
+++ b/RoboFile.php
@@ -28,13 +28,25 @@ class RoboFile extends \Robo\Tasks {
* @var array
*/
protected $taskDirs = [
- 'build/api',
- 'build/coverage',
'build/logs',
'build/pdepend',
'build/phpdox',
];
+ /**
+ * Directories to remove with the clean task
+ *
+ * @var array
+ */
+ protected $cleanDirs = [
+ 'coverage',
+ 'docs',
+ 'phpdoc',
+ 'build/logs',
+ 'build/phpdox',
+ 'build/pdepend'
+ ];
+
/**
* Do static analysis tasks
@@ -72,8 +84,17 @@ class RoboFile extends \Robo\Tasks {
@unlink($file);
}, $cleanFiles);
- $this->_cleanDir($this->taskDirs);
- $this->_deleteDir($this->taskDirs);
+ // So the task doesn't complain,
+ // make any 'missing' dirs to cleanup
+ array_map(function ($dir) {
+ if ( ! is_dir($dir))
+ {
+ `mkdir -p {$dir}`;
+ }
+ }, $this->cleanDirs);
+
+ $this->_cleanDir($this->cleanDirs);
+ $this->_deleteDir($this->cleanDirs);
}
/**
diff --git a/build/phpcs.xml b/build/phpcs.xml
index 2432930..58d9c54 100644
--- a/build/phpcs.xml
+++ b/build/phpcs.xml
@@ -36,6 +36,7 @@
+
diff --git a/build/phpunit.xml b/build/phpunit.xml
index 9677773..8b7823a 100644
--- a/build/phpunit.xml
+++ b/build/phpunit.xml
@@ -8,16 +8,16 @@
>
- ../src/Ion
+ ../src
- ../tests/Ion
+ ../tests
-
+
diff --git a/composer.json b/composer.json
index 362d959..3285a6c 100644
--- a/composer.json
+++ b/composer.json
@@ -4,12 +4,12 @@
"license":"MIT",
"autoload": {
"psr-4": {
- "Aviat\\": "src/"
+ "Aviat\\Ion\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
- "Aviat\\Ion\\Tests\\": "tests/Ion/",
+ "Aviat\\Ion\\Tests\\": "tests/",
"CodeIgniter\\": "build/CodeIgniter/"
}
},
diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml
index 2fa15d4..a774037 100644
--- a/phpdoc.dist.xml
+++ b/phpdoc.dist.xml
@@ -8,9 +8,11 @@
phpdoc
-
+
- src/Aviat
+ src
+ vendor/container-interop/container-interop/src
+ vendor/danielstjules/stringy/src
\ No newline at end of file
diff --git a/phpunit.xml b/phpunit.xml
index 3f71ab2..068260c 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -7,12 +7,12 @@
>
- src/Ion
+ src
- tests/Ion
+ tests
diff --git a/src/Ion/ArrayWrapper.php b/src/ArrayWrapper.php
similarity index 100%
rename from src/Ion/ArrayWrapper.php
rename to src/ArrayWrapper.php
diff --git a/src/Ion/Cache/CacheInterface.php b/src/Cache/CacheInterface.php
similarity index 100%
rename from src/Ion/Cache/CacheInterface.php
rename to src/Cache/CacheInterface.php
diff --git a/src/Ion/Cache/CacheManager.php b/src/Cache/CacheManager.php
similarity index 100%
rename from src/Ion/Cache/CacheManager.php
rename to src/Cache/CacheManager.php
diff --git a/src/Ion/Cache/Driver/DriverInterface.php b/src/Cache/Driver/DriverInterface.php
similarity index 100%
rename from src/Ion/Cache/Driver/DriverInterface.php
rename to src/Cache/Driver/DriverInterface.php
diff --git a/src/Ion/Cache/Driver/DriverTrait.php b/src/Cache/Driver/DriverTrait.php
similarity index 100%
rename from src/Ion/Cache/Driver/DriverTrait.php
rename to src/Cache/Driver/DriverTrait.php
diff --git a/src/Ion/Cache/Driver/NullDriver.php b/src/Cache/Driver/NullDriver.php
similarity index 100%
rename from src/Ion/Cache/Driver/NullDriver.php
rename to src/Cache/Driver/NullDriver.php
diff --git a/src/Ion/Cache/Driver/RedisDriver.php b/src/Cache/Driver/RedisDriver.php
similarity index 100%
rename from src/Ion/Cache/Driver/RedisDriver.php
rename to src/Cache/Driver/RedisDriver.php
diff --git a/src/Ion/Cache/Driver/SQLDriver.php b/src/Cache/Driver/SQLDriver.php
similarity index 100%
rename from src/Ion/Cache/Driver/SQLDriver.php
rename to src/Cache/Driver/SQLDriver.php
diff --git a/src/Ion/Config.php b/src/Config.php
similarity index 100%
rename from src/Ion/Config.php
rename to src/Config.php
diff --git a/src/Ion/ConfigInterface.php b/src/ConfigInterface.php
similarity index 100%
rename from src/Ion/ConfigInterface.php
rename to src/ConfigInterface.php
diff --git a/src/Ion/Di/Container.php b/src/Di/Container.php
similarity index 96%
rename from src/Ion/Di/Container.php
rename to src/Di/Container.php
index 221dded..7495d31 100644
--- a/src/Ion/Di/Container.php
+++ b/src/Di/Container.php
@@ -96,8 +96,8 @@ class Container implements ContainerInterface {
/**
* Get a new instance of the specified item
*
- * @param string $id - Identifier of the entry to look for.
- * @param array [$args] - Optional arguments for the factory callable
+ * @param string $id - Identifier of the entry to look for.
+ * @param array $args - Optional arguments for the factory callable
* @throws NotFoundException - No entry was found for this identifier.
* @throws ContainerException - Error while retrieving the entry.
* @return mixed
@@ -182,7 +182,7 @@ class Container implements ContainerInterface {
* Add a logger to the Container
*
* @param LoggerInterface $logger
- * @param string $id The logger 'channel'
+ * @param string $id The logger 'channel'
* @return ContainerInterface
*/
public function setLogger(LoggerInterface $logger, $id = 'default')
diff --git a/src/Ion/Di/ContainerAware.php b/src/Di/ContainerAware.php
similarity index 100%
rename from src/Ion/Di/ContainerAware.php
rename to src/Di/ContainerAware.php
diff --git a/src/Ion/Di/ContainerAwareInterface.php b/src/Di/ContainerAwareInterface.php
similarity index 100%
rename from src/Ion/Di/ContainerAwareInterface.php
rename to src/Di/ContainerAwareInterface.php
diff --git a/src/Ion/Di/ContainerInterface.php b/src/Di/ContainerInterface.php
similarity index 96%
rename from src/Ion/Di/ContainerInterface.php
rename to src/Di/ContainerInterface.php
index a1df05a..45d2228 100644
--- a/src/Ion/Di/ContainerInterface.php
+++ b/src/Di/ContainerInterface.php
@@ -61,7 +61,7 @@ interface ContainerInterface extends InteropInterface {
* Add a logger to the Container
*
* @param LoggerInterface $logger
- * @param string $id The logger 'channel'
+ * @param string $id The logger 'channel'
* @return Container
*/
public function setLogger(LoggerInterface $logger, $id = 'default');
diff --git a/src/Ion/Di/Exception/ContainerException.php b/src/Di/Exception/ContainerException.php
similarity index 100%
rename from src/Ion/Di/Exception/ContainerException.php
rename to src/Di/Exception/ContainerException.php
diff --git a/src/Ion/Di/Exception/NotFoundException.php b/src/Di/Exception/NotFoundException.php
similarity index 100%
rename from src/Ion/Di/Exception/NotFoundException.php
rename to src/Di/Exception/NotFoundException.php
diff --git a/src/Ion/Enum.php b/src/Enum.php
similarity index 100%
rename from src/Ion/Enum.php
rename to src/Enum.php
diff --git a/src/Ion/Exception/ConfigException.php b/src/Exception/ConfigException.php
similarity index 100%
rename from src/Ion/Exception/ConfigException.php
rename to src/Exception/ConfigException.php
diff --git a/src/Ion/Exception/DoubleRenderException.php b/src/Exception/DoubleRenderException.php
similarity index 100%
rename from src/Ion/Exception/DoubleRenderException.php
rename to src/Exception/DoubleRenderException.php
diff --git a/src/Ion/Friend.php b/src/Friend.php
similarity index 100%
rename from src/Ion/Friend.php
rename to src/Friend.php
diff --git a/src/Ion/Json.php b/src/Json.php
similarity index 100%
rename from src/Ion/Json.php
rename to src/Json.php
diff --git a/src/Ion/JsonException.php b/src/JsonException.php
similarity index 100%
rename from src/Ion/JsonException.php
rename to src/JsonException.php
diff --git a/src/Ion/Model.php b/src/Model.php
similarity index 100%
rename from src/Ion/Model.php
rename to src/Model.php
diff --git a/src/Ion/Model/DB.php b/src/Model/DB.php
similarity index 100%
rename from src/Ion/Model/DB.php
rename to src/Model/DB.php
diff --git a/src/Ion/StaticInstance.php b/src/StaticInstance.php
similarity index 100%
rename from src/Ion/StaticInstance.php
rename to src/StaticInstance.php
diff --git a/src/Ion/StringWrapper.php b/src/StringWrapper.php
similarity index 100%
rename from src/Ion/StringWrapper.php
rename to src/StringWrapper.php
diff --git a/src/Ion/Transformer/AbstractTransformer.php b/src/Transformer/AbstractTransformer.php
similarity index 100%
rename from src/Ion/Transformer/AbstractTransformer.php
rename to src/Transformer/AbstractTransformer.php
diff --git a/src/Ion/Transformer/TransformerInterface.php b/src/Transformer/TransformerInterface.php
similarity index 100%
rename from src/Ion/Transformer/TransformerInterface.php
rename to src/Transformer/TransformerInterface.php
diff --git a/src/Ion/Type/ArrayType.php b/src/Type/ArrayType.php
similarity index 100%
rename from src/Ion/Type/ArrayType.php
rename to src/Type/ArrayType.php
diff --git a/src/Ion/Type/StringType.php b/src/Type/StringType.php
similarity index 100%
rename from src/Ion/Type/StringType.php
rename to src/Type/StringType.php
diff --git a/src/Ion/View.php b/src/View.php
similarity index 100%
rename from src/Ion/View.php
rename to src/View.php
diff --git a/src/Ion/View/HtmlView.php b/src/View/HtmlView.php
similarity index 100%
rename from src/Ion/View/HtmlView.php
rename to src/View/HtmlView.php
diff --git a/src/Ion/View/HttpView.php b/src/View/HttpView.php
similarity index 100%
rename from src/Ion/View/HttpView.php
rename to src/View/HttpView.php
diff --git a/src/Ion/View/JsonView.php b/src/View/JsonView.php
similarity index 100%
rename from src/Ion/View/JsonView.php
rename to src/View/JsonView.php
diff --git a/src/Ion/ViewInterface.php b/src/ViewInterface.php
similarity index 100%
rename from src/Ion/ViewInterface.php
rename to src/ViewInterface.php
diff --git a/tests/Ion/BaseModelTest.php b/tests/BaseModelTest.php
similarity index 100%
rename from tests/Ion/BaseModelTest.php
rename to tests/BaseModelTest.php
diff --git a/tests/Ion/Cache/CacheManagerTest.php b/tests/Cache/CacheManagerTest.php
similarity index 100%
rename from tests/Ion/Cache/CacheManagerTest.php
rename to tests/Cache/CacheManagerTest.php
diff --git a/tests/Ion/Cache/Driver/CacheDriverBase.php b/tests/Cache/Driver/CacheDriverBase.php
similarity index 100%
rename from tests/Ion/Cache/Driver/CacheDriverBase.php
rename to tests/Cache/Driver/CacheDriverBase.php
diff --git a/tests/Ion/Cache/Driver/NullDriverTest.php b/tests/Cache/Driver/NullDriverTest.php
similarity index 100%
rename from tests/Ion/Cache/Driver/NullDriverTest.php
rename to tests/Cache/Driver/NullDriverTest.php
diff --git a/tests/Ion/Cache/Driver/RedisDriver2Test.php b/tests/Cache/Driver/RedisDriver2Test.php
similarity index 100%
rename from tests/Ion/Cache/Driver/RedisDriver2Test.php
rename to tests/Cache/Driver/RedisDriver2Test.php
diff --git a/tests/Ion/Cache/Driver/RedisDriverTest.php b/tests/Cache/Driver/RedisDriverTest.php
similarity index 100%
rename from tests/Ion/Cache/Driver/RedisDriverTest.php
rename to tests/Cache/Driver/RedisDriverTest.php
diff --git a/tests/Ion/Cache/Driver/SQLDriverTest.php b/tests/Cache/Driver/SQLDriverTest.php
similarity index 100%
rename from tests/Ion/Cache/Driver/SQLDriverTest.php
rename to tests/Cache/Driver/SQLDriverTest.php
diff --git a/tests/Ion/ConfigTest.php b/tests/ConfigTest.php
similarity index 100%
rename from tests/Ion/ConfigTest.php
rename to tests/ConfigTest.php
diff --git a/tests/Ion/Di/ContainerAwareTest.php b/tests/Di/ContainerAwareTest.php
similarity index 100%
rename from tests/Ion/Di/ContainerAwareTest.php
rename to tests/Di/ContainerAwareTest.php
diff --git a/tests/Ion/Di/ContainerTest.php b/tests/Di/ContainerTest.php
similarity index 100%
rename from tests/Ion/Di/ContainerTest.php
rename to tests/Di/ContainerTest.php
diff --git a/tests/Ion/EnumTest.php b/tests/EnumTest.php
similarity index 100%
rename from tests/Ion/EnumTest.php
rename to tests/EnumTest.php
diff --git a/tests/Ion/Exception/DoubleRenderExceptionTest.php b/tests/Exception/DoubleRenderExceptionTest.php
similarity index 100%
rename from tests/Ion/Exception/DoubleRenderExceptionTest.php
rename to tests/Exception/DoubleRenderExceptionTest.php
diff --git a/tests/Ion/FriendTest.php b/tests/FriendTest.php
similarity index 100%
rename from tests/Ion/FriendTest.php
rename to tests/FriendTest.php
diff --git a/tests/Ion/JsonTest.php b/tests/JsonTest.php
similarity index 100%
rename from tests/Ion/JsonTest.php
rename to tests/JsonTest.php
diff --git a/tests/Ion/Model/BaseDBModelTest.php b/tests/Model/BaseDBModelTest.php
similarity index 100%
rename from tests/Ion/Model/BaseDBModelTest.php
rename to tests/Model/BaseDBModelTest.php
diff --git a/tests/Ion/Transformer/AbstractTransformerTest.php b/tests/Transformer/AbstractTransformerTest.php
similarity index 100%
rename from tests/Ion/Transformer/AbstractTransformerTest.php
rename to tests/Transformer/AbstractTransformerTest.php
diff --git a/tests/Ion/Type/ArrayTypeTest.php b/tests/Type/ArrayTypeTest.php
similarity index 100%
rename from tests/Ion/Type/ArrayTypeTest.php
rename to tests/Type/ArrayTypeTest.php
diff --git a/tests/Ion/View/HtmlViewTest.php b/tests/View/HtmlViewTest.php
similarity index 100%
rename from tests/Ion/View/HtmlViewTest.php
rename to tests/View/HtmlViewTest.php
diff --git a/tests/Ion/View/HttpViewTest.php b/tests/View/HttpViewTest.php
similarity index 100%
rename from tests/Ion/View/HttpViewTest.php
rename to tests/View/HttpViewTest.php
diff --git a/tests/Ion/View/JsonViewTest.php b/tests/View/JsonViewTest.php
similarity index 100%
rename from tests/Ion/View/JsonViewTest.php
rename to tests/View/JsonViewTest.php