for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Triadev\Leopard\Business\Helper;
use Illuminate\Database\Eloquent\Model;
use Triadev\Leopard\Searchable;
trait IsModelSearchable
{
/**
* Is model searchable
*
* @param Model $model
* @return true
* @throws \InvalidArgumentException
*/
public function isModelSearchable(Model $model) : bool
$traits = class_uses_recursive(get_class($model));
if (!isset($traits[Searchable::class])) {
throw new \InvalidArgumentException(get_class($model).' does not use the searchable trait.');
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.
}
return true;
This check marks files that end in a newline character, i.e. an empy line.