diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 000000000000..390a5217b1ef --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,36 @@ +engines: + csslint: + enabled: true + duplication: + enabled: true + config: + languages: + - ruby + - javascript + - python + - php + eslint: + enabled: false + fixme: + enabled: true + phpmd: + enabled: true +ratings: + paths: + - "**.css" + - "**.inc" + - "**.js" + - "**.jsx" + - "**.module" + - "**.php" + - "**.py" + - "**.rb" +exclude_paths: +- "bootstrap/cache" +- "resources/" +- "storage/" +- "tests/" +- "**.md" +- "**.min.js" +- "**.min.php" +- "**.min.css" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c2d0bbb7327..c7bc7ddd7110 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ Thanks for your contributions! * Make your changes and commit * Check if your branch is still in sync with the repositorys **`develop`** branch * _Read:_ [Syncing a fork](https://help.github.com/articles/syncing-a-fork/) - * _Also read:_ [How to rebase a pull request](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request) + * _Also read:_ [How to rebase a pull request](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request) * Push your branch and create a PR against the Invoice Ninja **`develop`** branch * Update the [Changelog](CHANGELOG.md) @@ -21,7 +21,7 @@ To make the contribution process nice and easy for anyone, please follow some ru to give a more detailed explanation. * Only one feature/bugfix per issue. If you want to submit more, create multiple issues. * Only one feature/bugfix per PR(pull request). Split more changes into multiple PRs. - + #### Coding Style Try to follow the [PSR-2 guidlines](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) @@ -29,7 +29,7 @@ _Example styling:_ ```php /** * Gets a preview of the email - * + * * @param TemplateService $templateService * * @return \Illuminate\Http\Response diff --git a/README.md b/README.md index e2bc81e2b63c..d6adf7880428 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # Invoice Ninja -[![Build Status](https://travis-ci.org/invoiceninja/invoiceninja.svg?branch=develop)](https://travis-ci.org/invoiceninja/invoiceninja) +[![Build Status](https://travis-ci.org/invoiceninja/invoiceninja.svg?branch=master)](https://travis-ci.org/invoiceninja/invoiceninja) [![Join the chat at https://gitter.im/hillelcoren/invoice-ninja](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hillelcoren/invoice-ninja?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ## [Hosted](https://www.invoiceninja.com) | [Self-hosted](https://invoiceninja.org) @@ -74,4 +74,4 @@ For information on how contribute to Invoice Ninja, please see our [contributing ## License Invoice Ninja is released under the Attribution Assurance License. -See [LICENSE](LICENSE) for details. \ No newline at end of file +See [LICENSE](LICENSE) for details. diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index b1bc186d9f84..34890a48e1e3 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -1461,7 +1461,6 @@ class AccountController extends BaseController return trans('texts.create_invoice_for_sample'); } - /** @var \App\Models\Account $account */ $account = Auth::user()->account; $invitation = $invoice->invitations->first(); diff --git a/app/Http/Controllers/CreditController.php b/app/Http/Controllers/CreditController.php index 1a3db4b8d7cf..5d432881d261 100644 --- a/app/Http/Controllers/CreditController.php +++ b/app/Http/Controllers/CreditController.php @@ -62,7 +62,7 @@ class CreditController extends BaseController 'method' => 'POST', 'url' => 'credits', 'title' => trans('texts.new_credit'), - 'clients' => Client::scope()->with('contacts')->orderBy('name')->get(), + 'clients' => Client::scope()->with('contacts')->orderBy('name')->get(), ]; return View::make('credits.edit', $data); diff --git a/app/Http/Controllers/DocumentController.php b/app/Http/Controllers/DocumentController.php index f25a027f8662..e6f1d8fb8c29 100644 --- a/app/Http/Controllers/DocumentController.php +++ b/app/Http/Controllers/DocumentController.php @@ -95,6 +95,10 @@ class DocumentController extends BaseController public function postUpload(CreateDocumentRequest $request) { + if (!Utils::hasFeature(FEATURE_DOCUMENTS)) { + return; + } + $result = $this->documentRepo->upload($request->all(), $doc_array); if(is_string($result)){ diff --git a/app/Listeners/AnalyticsListener.php b/app/Listeners/AnalyticsListener.php index 7234e1a52c90..7015b087cce7 100644 --- a/app/Listeners/AnalyticsListener.php +++ b/app/Listeners/AnalyticsListener.php @@ -56,4 +56,4 @@ class AnalyticsListener curl_setopt_array($curl, $opts); curl_close($curl); } -} \ No newline at end of file +} diff --git a/app/Ninja/Transformers/UserTransformer.php b/app/Ninja/Transformers/UserTransformer.php index a22308f096da..905fc669f343 100644 --- a/app/Ninja/Transformers/UserTransformer.php +++ b/app/Ninja/Transformers/UserTransformer.php @@ -29,4 +29,4 @@ class UserTransformer extends EntityTransformer 'permissions' => (int) $user->getOriginal('permissions'), ]; } -} \ No newline at end of file +} diff --git a/app/Services/PushService.php b/app/Services/PushService.php index 017426814bd8..533563fed356 100644 --- a/app/Services/PushService.php +++ b/app/Services/PushService.php @@ -154,4 +154,4 @@ class PushService else return trans('texts.notification_invoice_viewed_subject', ['invoice' => $invoice->invoice_number, 'client' => $invoice->client->name]); } -} \ No newline at end of file +} diff --git a/composer.json b/composer.json index d7870aee98ad..7af865f8912b 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "omnipay/gocardless": "dev-master", "omnipay/stripe": "dev-master", "doctrine/dbal": "2.5.x", - "laravelcollective/bus": "5.2.*", + "laravelcollective/bus": "5.2.*", "laravel/framework": "5.2.*", "laravelcollective/html": "5.2.*", "symfony/css-selector": "~3.0", diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index d2a83f399d8d..027d562629f0 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2028,6 +2028,7 @@ $LANG = array( 'apply_taxes' => 'Apply taxes', 'min_to_max_users' => ':min to :max users', 'max_users_reached' => 'The maximum number of users has been reached.', + 'dwolla' => 'Dwolla', 'buy_now_buttons' => 'Buy Now Buttons', 'landing_page' => 'Landing Page', 'payment_type' => 'Payment Type', diff --git a/tests/acceptance/CheckBalanceCest.php b/tests/acceptance/CheckBalanceCest.php index 68cae45c3154..2dfa8e7f35a8 100644 --- a/tests/acceptance/CheckBalanceCest.php +++ b/tests/acceptance/CheckBalanceCest.php @@ -17,7 +17,7 @@ class CheckBalanceCest public function checkBalance(AcceptanceTester $I) { $I->wantTo('ensure the balance is correct'); - + $clientEmail = $this->faker->safeEmail; $productKey = $this->faker->text(10); $productPrice = $this->faker->numberBetween(1, 20); @@ -30,7 +30,7 @@ class CheckBalanceCest $I->see($clientEmail); $clientId = $I->grabFromCurrentUrl('~clients/(\d+)~'); - + // create product $I->amOnPage('/products/create'); $I->fillField(['name' => 'product_key'], $productKey); @@ -39,7 +39,7 @@ class CheckBalanceCest $I->click('Save'); $I->wait(1); $I->see($productKey); - + // create invoice $I->amOnPage('/invoices/create'); $I->selectDropdown($I, $clientEmail, '.client_select .dropdown-toggle'); @@ -51,7 +51,7 @@ class CheckBalanceCest $invoiceId = $I->grabFromCurrentUrl('~invoices/(\d+)~'); $I->amOnPage("/clients/{$clientId}"); $I->see('Balance $' . $productPrice); - + // update the invoice $I->amOnPage('/invoices/' . $invoiceId); $I->fillField(['name' => 'invoice_items[0][qty]'], 2); @@ -91,4 +91,4 @@ class CheckBalanceCest $I->see('Balance $0.00'); $I->see('Paid to Date $' . ($productPrice * 2)); } -} \ No newline at end of file +}