run phpcs in tests directory

This commit is contained in:
Niels Vanpachtenbeke 2022-01-19 23:05:35 +01:00
parent 2b5bc25097
commit 4a55dd5141
19 changed files with 54 additions and 26 deletions

View File

@ -19,5 +19,6 @@
</rule>
<file>src/</file>
<file>tests</file>
<exclude-pattern>src/cache/</exclude-pattern>
</ruleset>

View File

@ -1,9 +1,12 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;
use Illuminate\Database\Eloquent\Model;
final class Car extends Model {
final class Car extends Model
{
protected $table = 'cars';
};

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;

View File

@ -1,11 +1,14 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOneThrough;
final class Mechanic extends Model {
final class Mechanic extends Model
{
protected $table = 'mechanics';
/**

View File

@ -1,11 +1,14 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
final class Phone extends Model {
final class Phone extends Model
{
protected $table = 'phone_numbers';
/**

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;
@ -7,7 +9,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\MorphOne;
use Illuminate\Database\Eloquent\Relations\MorphToMany;
final class Post extends Model {
final class Post extends Model
{
protected $table = 'posts';
/**

View File

@ -1,11 +1,14 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
final class Role extends Model {
final class Role extends Model
{
protected $table = 'roles';
/**

View File

@ -1,6 +1,9 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;
final class Secret extends AbstractUuidModel {
final class Secret extends AbstractUuidModel
{
};

View File

@ -1,11 +1,14 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphToMany;
final class Tag extends Model {
final class Tag extends Model
{
protected $table = 'tags';
/**

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;
@ -12,7 +14,8 @@ use Illuminate\Database\Eloquent\Relations\HasOne;
* @property string $id
* @property CarbonInterface|null $email_verified_at
*/
final class User extends Model {
final class User extends Model
{
protected $table = 'users';
/**

View File

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;

View File

@ -1,6 +1,5 @@
<?php
/**
* Inherited Methods
* @method void wantToTest($text)

View File

@ -1,6 +1,5 @@
<?php
/**
* Inherited Methods
* @method void wantToTest($text)

View File

@ -1,4 +1,5 @@
<?php
namespace Helper;
// here you can define custom actions
@ -6,5 +7,4 @@ namespace Helper;
class Acceptance extends \Codeception\Module
{
}

View File

@ -1,4 +1,5 @@
<?php
namespace Helper;
// here you can define custom actions
@ -6,5 +7,4 @@ namespace Helper;
class Functional extends \Codeception\Module
{
}

View File

@ -1,4 +1,5 @@
<?php
namespace Helper;
// here you can define custom actions
@ -6,5 +7,4 @@ namespace Helper;
class Unit extends \Codeception\Module
{
}

View File

@ -1,6 +1,5 @@
<?php
/**
* Inherited Methods
* @method void wantToTest($text)

View File

@ -33,7 +33,7 @@ echo "Preparing Laravel"
./artisan make:test ExampleTest
echo "Adding package from source"
sed -e 's|"type": "project",|&"repositories": [ { "type": "path", "url": "../psalm-plugin-laravel" } ],|' -i composer.json
sed -e 's|"type": "project",|&"repositories": [ { "type": "path", "url": "../psalm-plugin-laravel" } ],|' composer.json
COMPOSER_MEMORY_LIMIT=-1 composer require --dev "psalm/plugin-laravel:*" -W
echo "Analyzing Laravel"