Showing 109 of 109 total issues
Possibly zero references to use statement for classlike/namespace Config
(\Illuminate\Support\Facades\Config)
Open
Open
use Illuminate\Support\Facades\Config;
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared function \config()
Confirmed
Confirmed
$ver = $ver !== null ? $ver : config('uuid.default_version');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared function \config()
Confirmed
Confirmed
$node = $node !== null ? $node : config('uuid.default_node');
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to ?string
Open
Open
$uuid[8] = chr(ord($uuid[8]) & static::CLEAR_VAR | static::VAR_RFC);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \TakeawayTown\LaravelUuid\Providers\UuidServiceProvider::publishes
Open
Open
$this->publishes([
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared function \config()
Open
Open
if (!$model->{config('uuid.uuid_column')}) {
- Create a ticketCreate a ticket
- Exclude checks
Reduce the number of returns of this function 4, down to the maximum allowed 3. Open
Open
public static function generate($ver = null, $node = null, $namespace = null)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.
Noncompliant Code Example
With the default threshold of 3:
function myFunction(){ // Noncompliant as there are 4 return statements if (condition1) { return true; } else { if (condition2) { return false; } else { return true; } } return false; }
Reference to undeclared property \TakeawayTown\LaravelUuid\Classes\Uuid->bytes
Open
Open
$this->bytes = $uuid;
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \TakeawayTown\LaravelUuid\Classes\UnexpectedValueException
(Did you mean class \UnexpectedValueException) Open
Open
throw new UnexpectedValueException('Version ' . $ver . ' is unsupported.');
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \Illuminate\Support\ServiceProvider
Open
Open
class UuidServiceProvider extends ServiceProvider
- Create a ticketCreate a ticket
- Exclude checks
Reference to parent from trait \TakeawayTown\LaravelUuid\Classes\Uuid,1
Open
Open
parent::boot();
- Create a ticketCreate a ticket
- Exclude checks
Possibly zero references to use statement for classlike/namespace UuidServiceProvider
(\TakeawayTown\LaravelUuid\Providers\UuidServiceProvider)
Open
Open
use TakeawayTown\LaravelUuid\Providers\UuidServiceProvider;
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \TakeawayTown\LaravelUuid\Classes\InvalidArgumentException
(Did you mean class \InvalidArgumentException) Open
Open
throw new InvalidArgumentException('A binary namespace is required for Version 3 or 5 UUIDs.');
- Create a ticketCreate a ticket
- Exclude checks
Call to method where
on non-class type string
Open
Open
$results = $query->where(config('uuid.uuid_column'), $uuid);
- Create a ticketCreate a ticket
- Exclude checks
Trait \TakeawayTown\LaravelUuid\Classes\Uuid
defined at /code/src/Traits/Uuid.php:8
was previously defined as Class \TakeawayTown\LaravelUuid\Classes\Uuid
at /code/src/Classes/Uuid.php:13
Open
Open
trait Uuid
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared function \config()
Open
Open
$model->{config('uuid.uuid_column')} = strtoupper(Uuid::generate()->string);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared function \config()
Open
Open
if ($uuid !== $model->{config('uuid.uuid_column')}) {
- Create a ticketCreate a ticket
- Exclude checks
Reduce the number of returns of this function 14, down to the maximum allowed 3. Open
Open
public function __get($var)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.
Noncompliant Code Example
With the default threshold of 3:
function myFunction(){ // Noncompliant as there are 4 return statements if (condition1) { return true; } else { if (condition2) { return false; } else { return true; } } return false; }
Call to method __construct
from undeclared class \TakeawayTown\LaravelUuid\Classes\InvalidArgumentException
(Did you mean class \InvalidArgumentException) Open
Open
throw new InvalidArgumentException('A name-string is required for Version 3 or 5 UUIDs.');
- Create a ticketCreate a ticket
- Exclude checks
Argument 2 (raw_output)
is 1
but \sha1()
takes bool
Open
Open
$uuid = substr(sha1($namespace . $node, 1), 0, 16);
- Create a ticketCreate a ticket
- Exclude checks