Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Assert.php

function Assert::notNull

@psalm-pure @psalm-assert !null $value

Parameters

mixed $value:

string $message:

Throws

InvalidArgumentException

21 calls to Assert::notNull()
Covers::create in vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php
Covers::resolveFqsen in vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php
Deprecated::create in vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php
Generic::create in vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php
Creates a new tag that represents any unknown tag type.
Link::create in vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php

... See full list

File

vendor/webmozart/assert/src/Assert.php, line 614

Class

Assert
Efficient assertions to validate the input/output of your methods.

Namespace

Webmozart\Assert

Code

public static function notNull($value, $message = '') {
    if (null === $value) {
        static::reportInvalidArgument($message ?: 'Expected a value other than null.');
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal