Skip to content

Commit

Permalink
Remove MissingReturnType psalm ignore
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Apr 28, 2020
1 parent 2bf02b6 commit b8b5c02
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libraries/classes/Server/Privileges.php
Original file line number Diff line number Diff line change
Expand Up @@ -3419,7 +3419,7 @@ public function getDbSpecificPrivsQueriesForChangeOrCopyUser(
* @param string $alter_real_sql_query SQL query for ALTER USER
* @param string $alter_sql_query SQL query for ALTER USER to be displayed
*
* @return array, $message
* @return array<int,string|Message>
*/
public function addUserAndCreateDatabase(
$_error,
Expand All @@ -3430,7 +3430,7 @@ public function addUserAndCreateDatabase(
$dbname,
$alter_real_sql_query,
$alter_sql_query
) {
): array {
if ($_error || (! empty($real_sql_query)
&& ! $this->dbi->tryQuery($real_sql_query))
) {
Expand Down
1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<InternalClass errorLevel="info" />

<MissingClosureReturnType errorLevel="info" />
<MissingReturnType errorLevel="info" />
<MissingPropertyType errorLevel="info" />
<InvalidDocblock errorLevel="info" />
<MisplacedRequiredParam errorLevel="info" />
Expand Down
3 changes: 3 additions & 0 deletions test/classes/Server/PrivilegesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use PhpMyAdmin\Tests\Stubs\DbiDummy;
use PhpMyAdmin\Url;
use PhpMyAdmin\Util;
use PhpMyAdmin\Message;
use PHPUnit\Framework\TestCase;
use stdClass;
use function htmlspecialchars;
Expand Down Expand Up @@ -1127,6 +1128,8 @@ public function testGetSqlQueriesForDisplayAndAddUser()
$sql_query
);

$this->assertInstanceOf(Message::class, $message);

//validate 6: $message
$this->assertEquals(
'You have added a new user.',
Expand Down

0 comments on commit b8b5c02

Please sign in to comment.