Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 16 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,24 @@ on:
pull_request:

jobs:
test:
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.5' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
php-version: '8.5'
- uses: ramsey/composer-install@v3
- run: composer phpunit

- name: Get composer cache
uses: actions/cache@v4
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
path: ~/.cache/composer
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --prefer-dist --no-interaction

- name: Run PHPUnit
run: vendor/bin/phpunit --configuration phpunit.xml.dist
php-version: '8.5'
- uses: ramsey/composer-install@v3
- run: composer phpstan
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@
},
"autoload": {
"psr-4": {
"Respect\\": "library/Respect"
"Respect\\Data\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Respect\\Data\\": "tests/"
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<arg value="p" />
<arg value="s" />

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

<rule ref="Respect" />
Expand Down
8 changes: 4 additions & 4 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
parameters:
level: 1
level: 2
paths:
- library/
- src/
- tests/
ignoreErrors:
- message: '/Call to an undefined static method Respect\\Data\\Collections\\(Collection|Filtered|Mix|Typed)::\w+\(\)\./'
- message: '/Call to an undefined method Respect\\Data\\AbstractMapper::\w+\(\)\./'
- message: '/Call to an undefined (static )?method Respect\\Data\\(AbstractMapper|Collections\\(Collection|Filtered|Mix|Typed))::\w+\(\)\./'
- message: '/Access to an undefined property Respect\\Data\\Collections\\Collection::\$\w+\./'
- message: '/Unsafe usage of new static\(\)\./'
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data;

use Respect\Data\Collections\Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data;

use RecursiveArrayIterator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Collections;

use Respect\Data\AbstractMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Collections;

interface Filterable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Collections;

class Filtered extends Collection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Collections;

class Mix extends Collection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Collections;

interface Mixable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Collections;

interface Typable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Collections;

class Typed extends Collection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Styles;

abstract class AbstractStyle implements Stylable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Styles;

class CakePHP extends Standard
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Styles;

class NorthWind extends Standard
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Styles;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Styles;

class Sakila extends Standard
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Styles;

class Standard extends AbstractStyle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Styles;

interface Stylable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data;

use Respect\Data\Collections\Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data;

use Respect\Data\Collections\Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Collections;

class CollectionTest extends \PHPUnit\Framework\TestCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Collections;

class FilteredTest extends \PHPUnit\Framework\TestCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Collections;

class MixedTest extends \PHPUnit\Framework\TestCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Respect\Data\Collections;

class TypedTest extends \PHPUnit\Framework\TestCase
Expand Down
Loading