SU-SWS/stanford_profile_helper

View on GitHub
modules/stanford_decoupled/src/Drush/Commands/StanfordDecoupledCommands.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Missing class import via use statement (line '41', column '17').
Open

      throw new \Exception('Invalid domain');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE)
Open

  public function __construct(private readonly EntityTypeManagerInterface $entityTypeManager, private readonly UuidInterface $uuid) {}

You must use "/**" style comments for a function comment
Open

  public function connectNextSite($domain, $options = [

Doc comment short description must end with a full stop
Open

   * Create a next site entity to connect with Next.JS site

Line exceeds 80 characters; contains 95 characters
Open

  #[CLI\Option(name: 'revalidation-secret', description: 'Use a specific revalidation secret')]

Perl-style comments are not allowed; use "// Comment" instead
Open

  #[CLI\Option(name: 'preview-secret', description: 'Use a specific preview secret')]

Perl-style comments are not allowed; use "// Comment" instead
Open

  #[CLI\Argument(name: 'domain', description: 'Next.js Domain.')]

Perl-style comments are not allowed; use "// Comment" instead
Open

  #[CLI\Option(name: 'revalidation-secret', description: 'Use a specific revalidation secret')]

Perl-style comments are not allowed; use "// Comment" instead
Open

  #[CLI\Usage(name: 'stanford-decoupled:connect-next "https://localhost:3000"', description: 'Create a next site entity to connect with Next.JS site')]

Perl-style comments are not allowed; use "// Comment" instead
Open

  #[CLI\Command(name: 'stanford-decoupled:connect-next', aliases: ['su-next-connect'])]

Unused use statement
Open

use Drush\Attributes as CLI;

Line exceeds 80 characters; contains 87 characters
Open

  #[CLI\Command(name: 'stanford-decoupled:connect-next', aliases: ['su-next-connect'])]

Line exceeds 80 characters; contains 85 characters
Open

  #[CLI\Option(name: 'preview-secret', description: 'Use a specific preview secret')]

Line exceeds 80 characters; contains 102 characters
Open

  #[CLI\Option(name: 'format', description: 'Format the result data. Available formats: json,string')]

Line exceeds 80 characters; contains 151 characters
Open

  #[CLI\Usage(name: 'stanford-decoupled:connect-next "https://localhost:3000"', description: 'Create a next site entity to connect with Next.JS site')]

Perl-style comments are not allowed; use "// Comment" instead
Open

  #[CLI\Option(name: 'format', description: 'Format the result data. Available formats: json,string')]

There are no issues that match your filters.

Category
Status