Skip to content

Commit

Permalink
fixing cs errors and adding migrations on exclude list (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
N-M authored and chartjes committed Dec 13, 2019
1 parent dff0d98 commit 37cf4a6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ TXT;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->name('opencfp')
->exclude('cache');
->exclude('cache')
->exclude('migrations');

return PhpCsFixer\Config::create()
->setUsingCache(true)
Expand Down
25 changes: 18 additions & 7 deletions migrations.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
<?php

declare(strict_types=1);

/**
* Copyright (c) 2013-2019 OpenCFP
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @see https://github.com/opencfp/opencfp
*/

return [
'name' => 'OpenCFP Migrations',
'migrations_namespace' => 'OpenCFP\Migrations',
'table_name' => 'migration_versions',
'column_name' => 'version',
'column_length' => 14,
'name' => 'OpenCFP Migrations',
'migrations_namespace' => 'OpenCFP\Migrations',
'table_name' => 'migration_versions',
'column_name' => 'version',
'column_length' => 14,
'executed_at_column_name' => 'executed_at',
'migrations_directory' => '/migrations',
'all_or_nothing' => true,
'migrations_directory' => '/migrations',
'all_or_nothing' => true,
'check_database_platform' => true,
];
5 changes: 2 additions & 3 deletions tests/Integration/Domain/Model/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace OpenCFP\Test\Integration\Domain\Model;

use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Relations\HasMany;
use OpenCFP\Domain\Model\Talk;
use OpenCFP\Domain\Model\TalkComment;
use OpenCFP\Domain\Model\TalkMeta;
Expand Down Expand Up @@ -74,8 +73,8 @@ public function metaRelationWorks()
*/
public function scopeSearchWillReturnAllWhenNoSearch()
{
$initialCount = count(User::search()->get());
$count = $this->faker()->numberBetween(3, 5);
$initialCount = \count(User::search()->get());
$count = $this->faker()->numberBetween(3, 5);

factory(User::class, $count)->create();
$totalExpectedCount = $initialCount + $count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function promoteActionFailsOnUserNotFound()
$id = $this->faker()->numberBetween(500);

/** @var Model\User $admin */
$admin = factory(Model\User::class, 1)->create()->first();
$admin = factory(Model\User::class, 1)->create()->first();
$csrfToken = $this->container->get('security.csrf.token_manager')
->getToken('admin_speaker_promote')
->getValue();
Expand Down

0 comments on commit 37cf4a6

Please sign in to comment.