Skip to content

Commit 714e7a6

Browse files
committed
Custom Assert::isMap() and isNonEmptyMap() stubs
1 parent 66df91e commit 714e7a6

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

extension.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
parameters:
2+
stubFiles:
3+
- stubs/Assert.stub
4+
15
services:
26
-
37
class: PHPStan\Type\WebMozartAssert\AssertTypeSpecifyingExtension

stubs/Assert.stub

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace Webmozart\Assert;
4+
5+
use InvalidArgumentException;
6+
7+
class Assert
8+
{
9+
10+
/**
11+
* @param mixed $array
12+
* @param string $message
13+
*
14+
* @throws InvalidArgumentException
15+
*/
16+
public static function isMap($array, $message = ''): void;
17+
18+
/**
19+
* @param mixed $array
20+
* @param string $message
21+
*
22+
* @throws InvalidArgumentException
23+
*/
24+
public static function isNonEmptyMap($array, $message = ''): void;
25+
26+
}

0 commit comments

Comments
 (0)