diff --git a/composer.json b/composer.json index 87d24fa..8ee524a 100644 --- a/composer.json +++ b/composer.json @@ -1,18 +1,14 @@ { "name": "bosnadev/repositories", "description": "Laravel Repositories", - "keywords": [ - "laravel", - "repository", - "repositories", - "eloquent", - "database" - ], + "license": "MIT", + "homepage": "https://bosnadev.com", + "keywords": ["laravel", "repository", "repositories", "eloquent", "database"], "licence": "MIT", "authors": [ { "name": "Mirza Pasic", - "email": "mirza.pasic@edu.fit.ba" + "email": "mirza@bosnadev.com" }, { "name": "Maarten Paauw", @@ -21,15 +17,17 @@ ], "require": { "php": ">=5.4.0", - "illuminate/support": "5.*", - "illuminate/database": "5.*" + "illuminate/support": "^5.2", + "illuminate/database": "^5.2", + "illuminate/filesystem": "^5.2", + "illuminate/console": "^5.2" }, "require-dev": { "mockery/mockery": "dev-master@dev" }, "autoload": { "psr-4": { - "Bosnadev\\Repositories\\": "src/" + "Bosnadev\\": "src/Bosnadev/" } }, "autoload-dev": { diff --git a/src/config/repositories.php b/config/repositories.php similarity index 100% rename from src/config/repositories.php rename to config/repositories.php diff --git a/src/resources/stubs/criteria.stub b/resources/stubs/criteria.stub similarity index 100% rename from src/resources/stubs/criteria.stub rename to resources/stubs/criteria.stub diff --git a/src/resources/stubs/repository.stub b/resources/stubs/repository.stub similarity index 100% rename from src/resources/stubs/repository.stub rename to resources/stubs/repository.stub diff --git a/src/Console/Commands/Creators/CriteriaCreator.php b/src/Bosnadev/Repositories/Console/Commands/Creators/CriteriaCreator.php similarity index 97% rename from src/Console/Commands/Creators/CriteriaCreator.php rename to src/Bosnadev/Repositories/Console/Commands/Creators/CriteriaCreator.php index 6742243..50cb390 100644 --- a/src/Console/Commands/Creators/CriteriaCreator.php +++ b/src/Bosnadev/Repositories/Console/Commands/Creators/CriteriaCreator.php @@ -1,16 +1,10 @@ preventCriteriaOverwriting) { // Find existing criteria $key = $this->criteria->search(function ($item) use ($criteria) { - return (is_object($item) AND (get_class($item) == get_class($criteria))); + return (is_object($item) && (get_class($item) == get_class($criteria))); }); // Remove old criteria diff --git a/src/Exceptions/RepositoryException.php b/src/Bosnadev/Repositories/Exceptions/RepositoryException.php similarity index 71% rename from src/Exceptions/RepositoryException.php rename to src/Bosnadev/Repositories/Exceptions/RepositoryException.php index efb014f..41b4ced 100644 --- a/src/Exceptions/RepositoryException.php +++ b/src/Bosnadev/Repositories/Exceptions/RepositoryException.php @@ -1,4 +1,6 @@ -publishes( @@ -63,7 +62,7 @@ public function register() $this->commands(['command.repository.make', 'command.criteria.make']); // Config path. - $config_path = __DIR__ . '/../config/repositories.php'; + $config_path = __DIR__ . '/../../../config/repositories.php'; // Merge config. $this->mergeConfigFrom( diff --git a/tests/RepositoryTest.php b/tests/RepositoryTest.php index 376c1f3..7718f6b 100644 --- a/tests/RepositoryTest.php +++ b/tests/RepositoryTest.php @@ -1,8 +1,7 @@ -