The throw_if function throws the given exception if a given boolean expression evaluates to true:
<?php throw_if(! Auth::user()->isAdmin(), AuthorizationException::class);

throw_if(
    ! Auth::user()->isAdmin(),
    AuthorizationException::class,
    'You are not allowed to access this page.'
);
<?php     function _startUpload($name, $fileInfo, $isMultiple)

    {

        if (FileUploadConfiguration::isUsingS3()) {

            throw_if($isMultiple, S3DoesntSupportMultipleFileUploads::class);



            $file = UploadedFile::fake()->create($fileInfo[0]['name'], $fileInfo[0]['size'] / 1024, $fileInfo[0]['type']);
<?php             'updated*',

        ];



        throw_if(

            str($methodName)->is($protectedMethods),

            new DirectlyCallingLifecycleHooksNotAllowedException($methodName, $this->component->getName())

        );



        $this->callTraitHook('call', ['methodName' => $methodName, 'params' => $params, 'returnEarly' => $returnEarly]);

    }
<?php             }

        }



        throw_if(empty($allRules), new MissingRulesException($this));



        $messages = empty($messages) ? $this->getMessages() : $messages;

        $attributes = empty($attributes) ? $this->getValidationAttributes() : $attributes;