Skip to content

Commit

Permalink
Merge d0d7429 into 6c23e6f
Browse files Browse the repository at this point in the history
  • Loading branch information
ravanscafi committed Oct 3, 2018
2 parents 6c23e6f + d0d7429 commit c976f3f
Show file tree
Hide file tree
Showing 57 changed files with 5,027 additions and 101 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,2 +1,5 @@
/vendor
composer.lock
build
.phpcs-cache
phpcs.xml
1 change: 0 additions & 1 deletion .styleci.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .travis.yml
@@ -1,22 +1,22 @@
language: php

php:
- 7.0
- 7.1
- 7.2

cache:
directories:
- $HOME/.composer/cache

before_install:
- if [[ $TRAVIS_PHP_VERSION = 7.0 ]]; then pecl install mongodb; fi
- echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

before_script:
- travis_retry composer install ${COMPOSER_FLAGS} --ignore-platform-reqs --no-interaction --prefer-dist
- mkdir -p build/logs

script:
- vendor/bin/phpcs
- vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml

after_success:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2013-2017 Leroy Merlin Brasil
Copyright (c) 2013-2018 Leroy Merlin Brasil, Taylor Otwell

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 2 additions & 3 deletions README.md
@@ -1,6 +1,5 @@
[![Build Status](https://travis-ci.org/leroy-merlin-br/mongolid-laravel.svg?branch=master)](https://travis-ci.org/leroy-merlin-br/mongolid-laravel)
[![Coverage Status](https://coveralls.io/repos/github/leroy-merlin-br/mongolid-laravel/badge.svg?branch=master)](https://coveralls.io/github/leroy-merlin-br/mongolid-laravel?branch=master)
[![StyleCI](https://styleci.io/repos/9806273/shield)](https://styleci.io/repos/9806273)
[![Latest Stable Version](https://poser.pugx.org/leroy-merlin-br/mongolid-laravel/v/stable.png)](https://packagist.org/packages/leroy-merlin-br/mongolid-laravel)
[![Monthly Downloads](https://poser.pugx.org/leroy-merlin-br/mongolid-laravel/d/monthly.png)](https://packagist.org/packages/leroy-merlin-br/mongolid-laravel)
[![Latest Unstable Version](https://poser.pugx.org/leroy-merlin-br/mongolid-laravel/v/unstable.png)](https://packagist.org/packages/leroy-merlin-br/mongolid-laravel)
Expand Down Expand Up @@ -246,7 +245,6 @@ class User extends MongolidModel implements Authenticatable
* Set the token value for the "remember me" session.
*
* @param string $value
* @return void
*/
public function setRememberToken($value)
{
Expand Down Expand Up @@ -311,7 +309,8 @@ The new (and improved) version 2.0 of Mongolid Laravel requires php7. If you are

## License

MongoLid & MongoLid Laravel are free software distributed under the terms of the [MIT license](http://opensource.org/licenses/MIT)
MongoLid & MongoLid Laravel are free software distributed under the terms of the [MIT license](http://opensource.org/licenses/MIT).
Some of the code is based on the work of Taylor Otwell and contributors on [laravel/framework](https://github.com/laravel/framework), another free software distributed under the terms of the [MIT license](http://opensource.org/licenses/MIT).

## Additional information

Expand Down
22 changes: 14 additions & 8 deletions composer.json
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": ">=7.0",
"php": ">=7.1",
"leroy-merlin-br/mongolid": "^2.0",
"illuminate/support": "^5.4",
"illuminate/auth": "^5.4",
Expand All @@ -24,28 +24,34 @@
"phpunit/phpunit": "^6.0",
"orchestra/testbench": "^3.4",
"mockery/mockery": "^1.0",
"satooshi/php-coveralls": "^1.0"
"satooshi/php-coveralls": "^1.0",
"leroy-merlin-br/coding-standard": "^0.1.0"
},
"autoload": {
"psr-4": {
"MongolidLaravel\\": "src"
}
},
"autoload-dev": {
"classmap": [
"tests"
]
"files": [
"tests/Migrations/stubs/DropAdmin.php",
"tests/Migrations/stubs/MigrationCreatorFakeMigration.php"
],
"psr-4": {
"MongolidLaravel\\": "tests"
}
},
"extra": {
"branch-alias": {
"dev-master": "v2.0.x-dev"
"dev-master": "v2.1.x-dev"
},
"laravel": {
"providers": [
"MongolidLaravel\\MongolidServiceProvider"
"MongolidLaravel\\MongolidServiceProvider",
"MongolidLaravel\\MigrationServiceProvider"
],
"aliases": {
"MongoLid": "MongolidLaravel\\MongoLidModel"
"MongoLid": "MongolidLaravel\\MongolidModel"
}
}
}
Expand Down
24 changes: 24 additions & 0 deletions phpcs.xml.dist
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ruleset>
<arg name="basepath" value="."/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="45"/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="colors"/>

<!-- Ignore warnings, show progress -->
<arg value="nps"/>

<file>src</file>
<file>tests</file>

<rule ref="LeroyMerlin"/>

<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>tests/Migrations/stubs/</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingPropertyTypeHint">
<exclude-pattern>tests/MongolidModelTest.php</exclude-pattern>
</rule>
</ruleset>
11 changes: 0 additions & 11 deletions src/FailedJobsService.php
@@ -1,5 +1,4 @@
<?php

namespace MongolidLaravel;

use MongoDB\BSON\ObjectID;
Expand Down Expand Up @@ -51,8 +50,6 @@ public function all()
/**
* Retrieve a single job from collection.
*
* @param string $id
*
* @return mixed
*/
public function find(string $id)
Expand All @@ -64,8 +61,6 @@ public function find(string $id)
* Insert a job on collection.
*
* @param array $attributes
*
* @return InsertOneResult
*/
public function insert(array $attributes): InsertOneResult
{
Expand All @@ -74,10 +69,6 @@ public function insert(array $attributes): InsertOneResult

/**
* Remove a job from collection.
*
* @param string $id
*
* @return DeleteResult
*/
public function delete(string $id): DeleteResult
{
Expand All @@ -94,8 +85,6 @@ public function drop()

/**
* Get the actual MongoDB Collection object.
*
* @return Collection
*/
protected function rawCollection(): Collection
{
Expand Down
1 change: 0 additions & 1 deletion src/LaravelCacheComponent.php
@@ -1,5 +1,4 @@
<?php

namespace MongolidLaravel;

use Illuminate\Cache\Repository;
Expand Down
1 change: 0 additions & 1 deletion src/LaravelEventTrigger.php
@@ -1,5 +1,4 @@
<?php

namespace MongolidLaravel;

use Illuminate\Contracts\Events\Dispatcher;
Expand Down

0 comments on commit c976f3f

Please sign in to comment.