for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/**
* Saito - The Threaded Web Forum
*
* @copyright Copyright (c) the Saito Project Developers
* @link https://github.com/Schlaefer/Saito
* @license http://opensource.org/licenses/MIT
*/
namespace Saito\User\Userlist;
use App\Model\Table\UsersTable;
use Cake\ORM\TableRegistry;
use Saito\RememberTrait;
* Lazy load list of all users and cache
class UserlistModel
{
use RememberTrait;
* Returns array with list of usernames
* @return array usernames
public function get(): array
return $this->remember('userlist', function () {
/** @var UsersTable $users */
$users = TableRegistry::get('Users');
Cake\ORM\TableRegistry::get()
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
$users = /** @scrutinizer ignore-deprecated */ TableRegistry::get('Users');
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
return $users->userlist();
});
}
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.