Skip to content

Commit

Permalink
Create mysqli.phpstub
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
  • Loading branch information
kamil-tekiela committed Nov 24, 2021
1 parent b1a201c commit fe7313c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions stubs/mysqli.phpstub
@@ -0,0 +1,30 @@
<?php

/**
* @template TValue
*
* @template-implements Traversable<int, TValue>
*/
class mysqli_result implements Traversable
{
/**
* @psalm-taint-sink callable $class

* @template T of object
* @param class-string<T> $class
* @param array $constructor_args
* @return T|null|false
*/
function fetch_object(string $class = stdClass::class, array $constructor_args = []): object|false|null {}
}


/**
* @psalm-taint-sink callable $class

* @template T of object
* @param class-string<T> $class
* @param array $constructor_args
* @return T|null|false
*/
function mysqli_fetch_object(mysqli_result $result, string $class = stdClass::class, array $constructor_args = []): object|false|null {}

0 comments on commit fe7313c

Please sign in to comment.