Skip to content
Open
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
48 changes: 42 additions & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ parameters:
count: 1
path: src/Controller/Component/LoginComponent.php

-
message: '#^Call to function method_exists\(\) with Authentication\\Authenticator\\AuthenticatorInterface and ''getIdentifier'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/Controller/Component/LoginComponent.php

-
message: '#^Parameter \#1 \$request of method CakeDC\\Users\\Middleware\\SocialAuthMiddleware\:\:goNext\(\) expects Cake\\Http\\ServerRequest, Psr\\Http\\Message\\ServerRequestInterface given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -60,6 +54,18 @@ parameters:
count: 1
path: src/Model/Behavior/LinkSocialBehavior.php

-
message: '#^Access to an undefined property Cake\\Datasource\\EntityInterface\:\:\$id\.$#'
identifier: property.notFound
count: 5
path: src/Model/Behavior/OneTimeLoginLinkBehavior.php

-
message: '#^Access to an undefined property Cake\\Datasource\\EntityInterface\:\:\$login_token_date\.$#'
identifier: property.notFound
count: 1
path: src/Model/Behavior/OneTimeLoginLinkBehavior.php

-
message: '#^Access to an undefined property Cake\\Datasource\\EntityInterface\:\:\$active\.$#'
identifier: property.notFound
Expand All @@ -78,6 +84,12 @@ parameters:
count: 1
path: src/Model/Behavior/RegisterBehavior.php

-
message: '#^Call to an undefined method Cake\\Datasource\\EntityInterface\:\:tokenExpired\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Model/Behavior/RegisterBehavior.php

-
message: '#^Call to an undefined method Cake\\ORM\\Table\:\:validationRegister\(\)\.$#'
identifier: method.notFound
Expand All @@ -90,6 +102,24 @@ parameters:
count: 1
path: src/Model/Behavior/SocialAccountBehavior.php

-
message: '#^Access to an undefined property Cake\\Datasource\\EntityInterface\:\:\$active\.$#'
identifier: property.notFound
count: 2
path: src/Model/Behavior/SocialAccountBehavior.php

-
message: '#^Access to an undefined property Cake\\Datasource\\EntityInterface\:\:\$token\.$#'
identifier: property.notFound
count: 1
path: src/Model/Behavior/SocialAccountBehavior.php

-
message: '#^Access to an undefined property Cake\\Datasource\\EntityInterface\:\:\$user\.$#'
identifier: property.notFound
count: 1
path: src/Model/Behavior/SocialAccountBehavior.php

-
message: '#^Method CakeDC\\Users\\Model\\Behavior\\SocialAccountBehavior\:\:resendValidation\(\) should return CakeDC\\Users\\Model\\Entity\\User but returns array\.$#'
identifier: return.type
Expand All @@ -102,6 +132,12 @@ parameters:
count: 1
path: src/Model/Behavior/SocialAccountBehavior.php

-
message: '#^Parameter \#1 \$socialAccount of method CakeDC\\Users\\Model\\Behavior\\SocialAccountBehavior\:\:_activateAccount\(\) expects CakeDC\\Users\\Model\\Entity\\SocialAccount, Cake\\Datasource\\EntityInterface given\.$#'
identifier: argument.type
count: 1
path: src/Model/Behavior/SocialAccountBehavior.php

-
message: '#^Access to an undefined property Cake\\ORM\\Table\:\:\$SocialAccounts\.$#'
identifier: property.notFound
Expand Down
3 changes: 0 additions & 3 deletions src/Identifier/SocialIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@

class SocialIdentifier extends AbstractIdentifier
{
/**
* @use \Cake\Event\EventDispatcherTrait<\CakeDC\Users\Identifier\SocialIdentifier>
*/
use EventDispatcherTrait;
use LocatorAwareTrait;

Expand Down
3 changes: 0 additions & 3 deletions src/Model/Behavior/SocialBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
*/
class SocialBehavior extends BaseTokenBehavior
{
/**
* @use \Cake\Event\EventDispatcherTrait<\CakeDC\Users\Model\Behavior\SocialBehavior>
*/
use EventDispatcherTrait;
use RandomStringTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function testCrud()
$this->assertResponseContains('<a href="/users/view/00000000-0000-0000-0000-000000000001">View</a>');
$this->assertResponseContains('<a href="/users/change-password/00000000-0000-0000-0000-000000000001">Change password</a>');
$this->assertResponseContains('<a href="/users/edit/00000000-0000-0000-0000-000000000001">Edit</a>');
$this->assertResponseContains('method="post" style="display:none;" action="/users/delete/00000000-0000-0000-0000-000000000001"');
$this->assertResponseContains('method="post" hidden="hidden" action="/users/delete/00000000-0000-0000-0000-000000000001"');
$this->assertResponseContains('>Delete<');

$this->assertResponseContains('<td>user-6</td>');
Expand All @@ -69,7 +69,7 @@ public function testCrud()
$this->assertResponseContains('<a href="/users/view/00000000-0000-0000-0000-000000000006">View</a>');
$this->assertResponseContains('<a href="/users/change-password/00000000-0000-0000-0000-000000000006">Change password</a>');
$this->assertResponseContains('<a href="/users/edit/00000000-0000-0000-0000-000000000006">Edit</a>');
$this->assertResponseContains('method="post" style="display:none;" action="/users/delete/00000000-0000-0000-0000-000000000006"');
$this->assertResponseContains('method="post" hidden="hidden" action="/users/delete/00000000-0000-0000-0000-000000000006"');

$this->get('/users/change-password/00000000-0000-0000-0000-000000000006');
$this->assertFlashMessage('Changing another user\'s password is not allowed');
Expand Down Expand Up @@ -101,7 +101,7 @@ public function testCrud()
$this->assertResponseContains('<input type="text" name="first_name" id="first-name" value="first-user-6');
$this->assertResponseContains('<input type="text" name="last_name" id="last-name" value="firts name 6');
$this->assertResponseContains('<label for="active"><input type="checkbox" name="active" value="1" id="active" checked="checked">Active</label>');
$this->assertResponseContains('method="post" style="display:none;" action="/users/delete/00000000-0000-0000-0000-000000000006"');
$this->assertResponseContains('method="post" hidden="hidden" action="/users/delete/00000000-0000-0000-0000-000000000006"');
$this->assertResponseContains('<a href="/users/index">List Users</a>');

$this->enableSecurityToken();
Expand All @@ -124,7 +124,7 @@ public function testCrud()
$this->assertResponseContains('<a href="/users/edit/00000000-0000-0000-0000-000000000006">Edit User</a>');
$this->assertResponseContains('<a href="/users/add">New User</a>');
$this->assertResponseContains('<a href="/users/index">List Users</a>');
$this->assertResponseContains('method="post" style="display:none;" action="/users/delete/00000000-0000-0000-0000-000000000006"');
$this->assertResponseContains('method="post" hidden="hidden" action="/users/delete/00000000-0000-0000-0000-000000000006"');

$this->post('/users/delete/00000000-0000-0000-0000-000000000006');
$this->assertRedirect('/users/index');
Expand Down
Loading