mirror of
https://github.com/michaelachrisco/ReadOnlyTraitLaravel.git
synced 2024-12-27 16:17:20 -08:00
5627a5523c
* Refactor for PSR-2 Formatting standard and PHP DockBlock standard. * Setting real php requirement (full param casting is available since php7) * php 7 for travis
16 lines
No EOL
519 B
PHP
16 lines
No EOL
519 B
PHP
<?php
|
|
namespace MichaelAChrisco\ReadOnly;
|
|
|
|
class ReadOnlyException extends \RuntimeException
|
|
{
|
|
/**
|
|
* @param string $functionName
|
|
* @param string $modelClassName
|
|
* {@inheritDoc}
|
|
*/
|
|
public function __construct(string $functionName, string $modelClassName, int $code = 0, \Throwable $previous = null)
|
|
{
|
|
$message = sprintf('Calling [%s] method on read-only model [%s] is not allowed.', $functionName, $modelClassName);
|
|
parent::__construct($message, $code, $previous);
|
|
}
|
|
} |