Psalm
This commit is contained in:
@@ -60,27 +60,6 @@ namespace Doctrine\ORM
|
||||
/** @psalm-return \Doctrine\ORM\Query<T> */
|
||||
public function getQuery() { }
|
||||
}
|
||||
|
||||
/** @template T */
|
||||
class EntityRepository
|
||||
{
|
||||
/**
|
||||
* @psalm-param string $alias
|
||||
* @psalm-param string $indexBy
|
||||
* @psalm-return \Doctrine\ORM\QueryBuilder<T>
|
||||
*/
|
||||
public function createQueryBuilder($alias, $indexBy = null) { }
|
||||
}
|
||||
|
||||
interface EntityManagerInterface
|
||||
{
|
||||
/**
|
||||
* @template T
|
||||
* @param callable(EntityManagerInterface=): T|void $func
|
||||
* @return T|true
|
||||
*/
|
||||
public function transactional($func);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Doctrine\ORM\Internal\Hydration
|
||||
|
||||
@@ -40,4 +40,4 @@ function map($collection, callable $callback) {}
|
||||
* @psalm-return null
|
||||
* @no-named-arguments
|
||||
*/
|
||||
function each($collection, callable $callback) {}
|
||||
function each($collection, callable $callback) {}
|
||||
@@ -36,6 +36,7 @@
|
||||
"symfony/validator": "5.3.*",
|
||||
"symfony/webpack-encore-bundle": "^1.7",
|
||||
"symfony/yaml": "5.3.*",
|
||||
"thecodingmachine/safe": "^1.3",
|
||||
"webonyx/graphql-php": "^14.4"
|
||||
},
|
||||
"require-dev": {
|
||||
|
||||
143
composer.lock
generated
143
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "3515b08efed514c61055a6c44054a832",
|
||||
"content-hash": "224ed752e1775eea3a3cb9c1dc51f1e8",
|
||||
"packages": [
|
||||
{
|
||||
"name": "api-platform/core",
|
||||
@@ -7753,6 +7753,145 @@
|
||||
],
|
||||
"time": "2021-11-20T16:42:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "thecodingmachine/safe",
|
||||
"version": "v1.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thecodingmachine/safe.git",
|
||||
"reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thecodingmachine/safe/zipball/a8ab0876305a4cdaef31b2350fcb9811b5608dbc",
|
||||
"reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^0.12",
|
||||
"squizlabs/php_codesniffer": "^3.2",
|
||||
"thecodingmachine/phpstan-strict-rules": "^0.12"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "0.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Safe\\": [
|
||||
"lib/",
|
||||
"deprecated/",
|
||||
"generated/"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"deprecated/apc.php",
|
||||
"deprecated/libevent.php",
|
||||
"deprecated/mssql.php",
|
||||
"deprecated/stats.php",
|
||||
"lib/special_cases.php",
|
||||
"generated/apache.php",
|
||||
"generated/apcu.php",
|
||||
"generated/array.php",
|
||||
"generated/bzip2.php",
|
||||
"generated/calendar.php",
|
||||
"generated/classobj.php",
|
||||
"generated/com.php",
|
||||
"generated/cubrid.php",
|
||||
"generated/curl.php",
|
||||
"generated/datetime.php",
|
||||
"generated/dir.php",
|
||||
"generated/eio.php",
|
||||
"generated/errorfunc.php",
|
||||
"generated/exec.php",
|
||||
"generated/fileinfo.php",
|
||||
"generated/filesystem.php",
|
||||
"generated/filter.php",
|
||||
"generated/fpm.php",
|
||||
"generated/ftp.php",
|
||||
"generated/funchand.php",
|
||||
"generated/gmp.php",
|
||||
"generated/gnupg.php",
|
||||
"generated/hash.php",
|
||||
"generated/ibase.php",
|
||||
"generated/ibmDb2.php",
|
||||
"generated/iconv.php",
|
||||
"generated/image.php",
|
||||
"generated/imap.php",
|
||||
"generated/info.php",
|
||||
"generated/ingres-ii.php",
|
||||
"generated/inotify.php",
|
||||
"generated/json.php",
|
||||
"generated/ldap.php",
|
||||
"generated/libxml.php",
|
||||
"generated/lzf.php",
|
||||
"generated/mailparse.php",
|
||||
"generated/mbstring.php",
|
||||
"generated/misc.php",
|
||||
"generated/msql.php",
|
||||
"generated/mysql.php",
|
||||
"generated/mysqli.php",
|
||||
"generated/mysqlndMs.php",
|
||||
"generated/mysqlndQc.php",
|
||||
"generated/network.php",
|
||||
"generated/oci8.php",
|
||||
"generated/opcache.php",
|
||||
"generated/openssl.php",
|
||||
"generated/outcontrol.php",
|
||||
"generated/password.php",
|
||||
"generated/pcntl.php",
|
||||
"generated/pcre.php",
|
||||
"generated/pdf.php",
|
||||
"generated/pgsql.php",
|
||||
"generated/posix.php",
|
||||
"generated/ps.php",
|
||||
"generated/pspell.php",
|
||||
"generated/readline.php",
|
||||
"generated/rpminfo.php",
|
||||
"generated/rrd.php",
|
||||
"generated/sem.php",
|
||||
"generated/session.php",
|
||||
"generated/shmop.php",
|
||||
"generated/simplexml.php",
|
||||
"generated/sockets.php",
|
||||
"generated/sodium.php",
|
||||
"generated/solr.php",
|
||||
"generated/spl.php",
|
||||
"generated/sqlsrv.php",
|
||||
"generated/ssdeep.php",
|
||||
"generated/ssh2.php",
|
||||
"generated/stream.php",
|
||||
"generated/strings.php",
|
||||
"generated/swoole.php",
|
||||
"generated/uodbc.php",
|
||||
"generated/uopz.php",
|
||||
"generated/url.php",
|
||||
"generated/var.php",
|
||||
"generated/xdiff.php",
|
||||
"generated/xml.php",
|
||||
"generated/xmlrpc.php",
|
||||
"generated/yaml.php",
|
||||
"generated/yaz.php",
|
||||
"generated/zip.php",
|
||||
"generated/zlib.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "PHP core functions that throw exceptions instead of returning FALSE on error",
|
||||
"support": {
|
||||
"issues": "https://github.com/thecodingmachine/safe/issues",
|
||||
"source": "https://github.com/thecodingmachine/safe/tree/v1.3.3"
|
||||
},
|
||||
"time": "2020-10-28T17:51:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v3.3.4",
|
||||
@@ -12070,5 +12209,5 @@
|
||||
"ext-redis": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.2.0"
|
||||
"plugin-api-version": "2.1.0"
|
||||
}
|
||||
|
||||
26
psalm.xml
Normal file
26
psalm.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
errorLevel="4"
|
||||
resolveFromConfigFile="true"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="src" />
|
||||
<ignoreFiles>
|
||||
<directory name="vendor" />
|
||||
<directory name="src/CheeperSpaghetti" />
|
||||
<directory name="src/CheeperCommandHandlers" />
|
||||
<directory name="src/CheeperLayered" />
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
|
||||
<stubs>
|
||||
<file name=".psalm-stubs/api-platform.phpstub"/>
|
||||
<file name=".psalm-stubs/doctrine-orm.phpstub"/>
|
||||
<file name=".psalm-stubs/symfony-messenger.phpstub"/>
|
||||
<file name=".psalm-stubs/symfony-validator.phpstub"/>
|
||||
<file name=".psalm-stubs/lstrojny-functional-php.phpstub"/>
|
||||
</stubs>
|
||||
</psalm>
|
||||
@@ -93,7 +93,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
*/
|
||||
public function getUsername(): string
|
||||
{
|
||||
return $this->userName;
|
||||
return $this->userName ?? "";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,7 +118,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
/**
|
||||
* @see PasswordAuthenticatedUserInterface
|
||||
*/
|
||||
public function getPassword(): string
|
||||
public function getPassword(): ?string
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
|
||||
/**
|
||||
* @method User|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method User|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method User[] findAll()
|
||||
* @method User[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
* @method list<User> findAll()
|
||||
* @method list<User> findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class UserRepository extends ServiceEntityRepository implements PasswordUpgraderInterface
|
||||
{
|
||||
|
||||
@@ -18,6 +18,6 @@ final class DoctrineOrmFollowers implements Followers
|
||||
|
||||
public function ofAuthorId(AuthorId $authorId): ?NumberOfFollowers
|
||||
{
|
||||
// TODO: Implement ofAuthorId() method.
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -728,6 +728,9 @@
|
||||
"symfony/yaml": {
|
||||
"version": "v5.0.4"
|
||||
},
|
||||
"thecodingmachine/safe": {
|
||||
"version": "v1.3.3"
|
||||
},
|
||||
"theofidry/psysh-bundle": {
|
||||
"version": "4.3.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user