ReadOnlyTraitLaravel/src/ReadOnlyException.php
jifer 5627a5523c Small refactor (#18)
* 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
2017-12-11 14:10:25 -08:00

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);
}
}