diff --git a/README.md b/README.md index 99c305f..475c6e1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # apparat/object +[![Build Status](https://secure.travis-ci.org/apparat/object.svg)](https://travis-ci.org/apparat/object) +[![Coverage Status](https://coveralls.io/repos/apparat/object/badge.svg?branch=master&service=github)](https://coveralls.io/github/apparat/object?branch=master) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/apparat/object/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/apparat/object/?branch=master) +[![Code Climate](https://codeclimate.com/github/apparat/object/badges/gpa.svg)](https://codeclimate.com/github/apparat/object) +[![Documentation Status](https://readthedocs.org/projects/apparat-object/badge/?version=latest)](http://apparat-object.readthedocs.io/en/latest/?badge=latest) + Purpose of this module: 1. **Mapping between objects and their file resources** @@ -32,13 +38,11 @@ Please find the [project documentation](doc/index.md) in the `doc` directory. I This library requires PHP 5.6 or later. I recommend using the latest available version of PHP as a matter of principle. It has no userland dependencies. -## Quality +## Dependencies -[![Build Status](https://secure.travis-ci.org/apparat/object.svg)](https://travis-ci.org/apparat/object) -[![Coverage Status](https://coveralls.io/repos/apparat/object/badge.svg?branch=master&service=github)](https://coveralls.io/github/apparat/object?branch=master) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/apparat/object/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/apparat/object/?branch=master) -[![Code Climate](https://codeclimate.com/github/apparat/object/badges/gpa.svg)](https://codeclimate.com/github/apparat/object) -[![Documentation Status](https://readthedocs.org/projects/apparat-object/badge/?version=latest)](http://apparat-object.readthedocs.io/en/latest/?badge=latest) +![Composer dependency graph](https://rawgit.com/apparat/object/master/doc/dependencies.svg) + +## Quality To run the unit tests at the command line, issue `composer install` and then `phpunit` at the package root. This requires [Composer](http://getcomposer.org/) to be available as `composer`, and [PHPUnit](http://phpunit.de/manual/) to be available as `phpunit`. diff --git a/composer.json b/composer.json index 7d4661c..7d00727 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ ], "require": { "php": ">=5.6.0", - "apparat/resource": "@dev", + "apparat/resource": "dev-master", "dominicsayers/isemail": "dev-master", "league/commonmark": "^0.13", "psr/http-message": "~1.0" @@ -23,7 +23,9 @@ "phpunit/phpunit": "^5.3", "satooshi/php-coveralls": "^1.0", "codeclimate/php-test-reporter": "dev-master", - "apparat/dev": "@dev" + "apparat/dev": "@dev", + "apparat/kernel": "@dev", + "clue/graph-composer": "dev-master" }, "repositories": [ { @@ -45,6 +47,11 @@ "type": "vcs", "url": "git@github.com:dominicsayers/isemail.git", "reference": "master" + }, + { + "type": "git", + "url": "git@github.com:jkphl/graph-composer.git", + "reference": "master" } ], "autoload": { diff --git a/doc/dependencies.svg b/doc/dependencies.svg new file mode 100644 index 0000000..8ce88bf --- /dev/null +++ b/doc/dependencies.svg @@ -0,0 +1,216 @@ + + + + + + +G + + +apparat/object + +apparat/object + + +php + +php + + +apparat/object->php + + +>=5.6.0 + + +apparat/resource + +apparat/resource: dev-master + + +apparat/object->apparat/resource + + +dev-master + + +dominicsayers/isemail + +dominicsayers/isemail: dev-master + + +apparat/object->dominicsayers/isemail + + +dev-master + + +league/commonmark + +league/commonmark: 0.13.4 + + +apparat/object->league/commonmark + + +^0.13 + + +psr/http-message + +psr/http-message: 1.0.1 + + +apparat/object->psr/http-message + + +~1.0 + + +apparat/kernel + +apparat/kernel: dev-master + + +apparat/object->apparat/kernel + + +@dev + + +apparat/resource->php + + +>=5.6.0 + + +apparat/resource->league/commonmark + + +^0.13 + + +apparat/resource->apparat/kernel + + +dev-master + + +symfony/yaml + +symfony/yaml: v3.2.1 + + +apparat/resource->symfony/yaml + + +^3.1 + + +league/commonmark->php + + +>=5.4.8 + + +ext-mbstring + +ext-mbstring + + +league/commonmark->ext-mbstring + + +* + + +psr/http-message->php + + +>=5.3.0 + + +apparat/kernel->php + + +>=5.6.0 + + +level-2/dice + +level-2/dice: 2.0.3 + + +apparat/kernel->level-2/dice + + +2.* + + +monolog/monolog + +monolog/monolog: 1.22.0 + + +apparat/kernel->monolog/monolog + + +1.x + + +vlucas/phpdotenv + +vlucas/phpdotenv: v2.4.0 + + +apparat/kernel->vlucas/phpdotenv + + +2.* + + +level-2/dice->php + + +>=5.6.0 + + +monolog/monolog->php + + +>=5.3.0 + + +psr/log + +psr/log: 1.0.2 + + +monolog/monolog->psr/log + + +~1.0 + + +vlucas/phpdotenv->php + + +>=5.3.9 + + +symfony/yaml->php + + +>=5.5.9 + + +psr/log->php + + +>=5.3.0 + + + diff --git a/src/Object/Domain/Model/Object/Traits/SystemPropertiesTrait.php b/src/Object/Domain/Model/Object/Traits/SystemPropertiesTrait.php index 1c7f4a0..874262f 100644 --- a/src/Object/Domain/Model/Object/Traits/SystemPropertiesTrait.php +++ b/src/Object/Domain/Model/Object/Traits/SystemPropertiesTrait.php @@ -155,7 +155,6 @@ public function getLatitude() */ public function setLatitude($latitude) { - /** @var SystemProperties $this */ $this->setSystemProperties($this->systemProperties->setLatitude($latitude)); return $this; } @@ -178,7 +177,6 @@ public function getLongitude() */ public function setLongitude($longitude) { - /** @var SystemProperties $this */ $this->setSystemProperties($this->systemProperties->setLongitude($longitude)); return $this; } @@ -201,7 +199,6 @@ public function getElevation() */ public function setElevation($elevation) { - /** @var SystemProperties $this */ $this->setSystemProperties($this->systemProperties->setElevation($elevation)); return $this; } diff --git a/src/Object/Infrastructure/Repository/Repository.php b/src/Object/Infrastructure/Repository/Repository.php index 245359a..763f38d 100644 --- a/src/Object/Infrastructure/Repository/Repository.php +++ b/src/Object/Infrastructure/Repository/Repository.php @@ -38,6 +38,7 @@ use Apparat\Kernel\Tests\Kernel; use Apparat\Object\Domain\Repository\Service; +use Apparat\Object\Domain\Repository\Repository as DomainRepository; /** * Repository gateway @@ -52,7 +53,7 @@ class Repository * * @param string $url Repository URL (relative or absolute including the apparat base URL) * @param array $config Repository configuration - * @return \Apparat\Object\Domain\Repository\Repository Repository instance + * @return DomainRepository Repository instance * @throws InvalidArgumentException If the repository URL is invalid * @throws InvalidArgumentException If the repository configuration is empty * @api @@ -67,7 +68,8 @@ public static function register($url, array $config) } // Instantiate the object repository - $repository = Kernel::create(\Apparat\Object\Domain\Repository\Repository::class, [$url, $config]); + /** @var DomainRepository $repository */ + $repository = Kernel::create(DomainRepository::class, [$url, $config]); // Register the repository Kernel::create(Service::class)->register($url, $repository); @@ -80,7 +82,7 @@ public static function register($url, array $config) * Instantiate and return an object repository * * @param string $url Repository URL (relative or absolute including the apparat base URL) - * @return \Apparat\Object\Domain\Repository\Repository Object repository + * @return DomainRepository Object repository * @throws InvalidArgumentException If the repository URL is invalid * @throws InvalidArgumentException If the repository URL is unknown * @api @@ -100,7 +102,7 @@ public static function instance($url) * * @param string $url Repository URL (relative or absolute including the apparat base URL) * @param array $config Repository configuration - * @return \Apparat\Object\Domain\Repository\Repository Repository instance + * @return DomainRepository Repository instance * @api */ public static function create($url, array $config)