Fenos\Notifynder\Parsers\NotifynderParser::setStrictExtra PHP Method

setStrictExtra() public static method

if it's enabled then will throws exceptions when extra params will not be parsed correctly will be handy in development.
public static setStrictExtra ( boolean | true $set = true )
$set boolean | true
    public static function setStrictExtra($set = true)
    {
        static::$strictMode = $set;
    }

Usage Example

Esempio n. 1
0
 /** @test */
 public function it_will_throw_exception_when_strict_extra_is_enabled()
 {
     $extra = null;
     $notification = ['body' => ['text' => 'Hi {to.username} hello {extra.hello}'], 'to' => ['username' => 'jhon'], 'extra' => json_encode($extra)];
     NotifynderParser::setStrictExtra(true);
     $this->shouldThrow(ExtraParamsException::class)->during('parse', [$notification]);
 }
All Usage Examples Of Fenos\Notifynder\Parsers\NotifynderParser::setStrictExtra