for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Helldar\LaravelLangPublisher\Concerns;
use Helldar\LaravelLangPublisher\Facades\Path;
use Helldar\Support\Facades\Helpers\Str;
trait Contains
{
protected function isValidation(string $filename, bool $is_path = false): bool
$this->log('Does the file contain validation messages?', $filename);
log()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$this->/** @scrutinizer ignore-call */
log('Does the file contain validation messages?', $filename);
$filename = $is_path ? Path::filename($filename) : $filename;
return Str::startsWith($filename, 'validation');
}
protected function isJson(string $filename): bool
$this->log('Does the file contain json?', $filename);
return Str::endsWith($filename, 'json');
protected function isPhp(string $filename): bool
$this->log('Does the file contain php?', $filename);
return Str::endsWith($filename, 'php');