Skip to content

Commit

Permalink
Github CI / fixes / Reducing coverage (#90)
Browse files Browse the repository at this point in the history
* fix ci
* update dependencies
  • Loading branch information
pvsaintpe authored May 2, 2024
1 parent 28d9f4e commit 28da413
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
fail-fast: false
env:
PHP_CS_FIXER_FUTURE_MODE: '0'
name: 'Lint PHP'
name: 'Linter PHP'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
name: 'Test / PHP ${{ matrix.php_versions }} / Postgres ${{ matrix.postgres }}'
name: 'Testing / PHP ${{ matrix.php_versions }} / Postgres ${{ matrix.postgres }}'
needs:
- lint
steps:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"laravel/framework": "^11.0"
},
"require-dev": {
"umbrellio/code-style-php": "^1.0",
"umbrellio/code-style-php": "^1.2",
"orchestra/testbench": "^9.0",
"php-coveralls/php-coveralls": "^2.7",
"codeception/codeception": "^5.0",
Expand Down
3 changes: 3 additions & 0 deletions src/Compilers/CreateCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

class CreateCompiler
{
/**
* @codeCoverageIgnore
*/
public static function compile(Grammar $grammar, Blueprint $blueprint, array $columns, array $commands = []): string
{
$compiledCommand = sprintf(
Expand Down
3 changes: 3 additions & 0 deletions src/Helpers/IndexAssertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use Illuminate\Support\Facades\DB;

/**
* @codeCoverageIgnore
*/
trait IndexAssertions
{
abstract public static function assertNotNull($actual, string $message = ''): void;
Expand Down
3 changes: 3 additions & 0 deletions src/Helpers/TableAssertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use Illuminate\Support\Facades\Schema;

/**
* @codeCoverageIgnore
*/
trait TableAssertions
{
abstract public static function assertSame($expected, $actual, string $message = ''): void;
Expand Down
3 changes: 3 additions & 0 deletions src/Helpers/ViewAssertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use Illuminate\Support\Facades\Schema;

/**
* @codeCoverageIgnore
*/
trait ViewAssertions
{
abstract public static function assertSame($expected, $actual, string $message = ''): void;
Expand Down
15 changes: 15 additions & 0 deletions src/Schema/Blueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@ public function detachPartition(string $partition): void
}

/**
* @codeCoverageIgnore
* @return LikeDefinition|Fluent
*/
public function like(string $table): Fluent
{
return $this->addCommand('like', compact('table'));
}

/**
* @codeCoverageIgnore
*/
public function ifNotExists(): Fluent
{
return $this->addCommand('ifNotExists');
Expand Down Expand Up @@ -110,6 +114,9 @@ public function dropCheck($index): Fluent
return $this->dropIndexCommand('dropUnique', 'chk', $index);
}

/**
* @codeCoverageIgnore
*/
public function hasIndex($index, bool $unique = false): bool
{
if (is_array($index)) {
Expand All @@ -120,13 +127,17 @@ public function hasIndex($index, bool $unique = false): bool
}

/**
* @codeCoverageIgnore
* @return ViewDefinition|Fluent
*/
public function createView(string $view, string $select, bool $materialize = false): Fluent
{
return $this->addCommand('createView', compact('view', 'select', 'materialize'));
}

/**
* @codeCoverageIgnore
*/
public function dropView(string $view): Fluent
{
return $this->addCommand('dropView', compact('view'));
Expand Down Expand Up @@ -166,8 +177,12 @@ public function daterange(string $column): Fluent
return $this->addColumn(DateRangeType::TYPE_NAME, $column);
}

/**
* @codeCoverageIgnore
*/
protected function getSchemaManager()
{
/** @scrutinizer ignore-call */
$connection = Schema::getConnection();
$doctrineConnection = DriverManager::getConnection($connection->getConfig());
return $doctrineConnection->getSchemaManager();

Check notice on line 188 in src/Schema/Blueprint.php

View check run for this annotation

Scrutinizer / Inspection

src/Schema/Blueprint.php#L188

The function ``Doctrine\DBAL\Connection::getSchemaManager()`` has been deprecated: Use {@see createSchemaManager()} instead.
Expand Down

0 comments on commit 28da413

Please sign in to comment.