Showing 226 of 573 total issues
Function show
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
async show(event) {
event.preventDefault();
let container = this.element.nextElementSibling && this.element.nextElementSibling.classList.contains('js-container')
? this.element.nextElementSibling : null;
Method preparePageResults
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function preparePageResults(iterable $posts): ?iterable
{
$firstIndexes = [];
$tmp = [];
$duplicates = [];
Method fetch
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch($url): self
{
if ($this->settings->isLocalUrl($url)) {
return $this;
}
Method fetch
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetch($url): self
{
if ($this->settings->isLocalUrl($url)) {
return $this;
}
Method content
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
#[OA\Response(
response: 200,
description: 'Submissions by interval retrieved. These are not guaranteed to be continuous.',
content: new OA\JsonContent(
properties: [
Method updateUser
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateUser(string $actorUrl): User
{
$user = $this->userRepository->findOneBy(['apProfileId' => $actorUrl]);
$actor = $this->apHttpClient->getActorObject($actorUrl);
Method votes
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
#[OA\Response(
response: 200,
description: 'Votes by interval retrieved. These are not guaranteed to be continuous.',
content: new OA\JsonContent(
properties: [
Method votes
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
#[OA\Response(
response: 200,
description: 'Votes by interval retrieved. These are not guaranteed to be continuous.',
content: new OA\JsonContent(
properties: [
Method content
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
#[OA\Response(
response: 200,
description: 'Submissions by interval retrieved. These are not guaranteed to be continuous.',
content: new OA\JsonContent(
properties: [
Method buildForm
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('currentPassword', PasswordType::class, [
'label' => 'current_password',
Method __invoke
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
#[OA\Response(
response: 200,
description: 'Accesses by interval retrieved. These are not guaranteed to be continuous.',
content: new OA\JsonContent(
properties: [
Method create
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function create(string $identifier, string $secret, string $name, UserSmallResponseDto $user = null, string $contactEmail = null, string $description = null, array $redirectUris = [], array $grants = [], array $scopes = ['read'], ImageDto $image = null): OAuth2ClientDto
Function getForm
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
async getForm(event) {
event.preventDefault();
if ('' !== this.containerTarget.innerHTML.trim()) {
if (false === confirm('Do you really want to leave?')) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function setLinks
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function setLinks(array $links)
{
foreach ($links as $link) {
if (!\is_array($link)) {
throw new \Exception('WebFinger links must be an array of objects');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function show
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
async show(event) {
event.preventDefault();
let container = this.element.nextElementSibling && this.element.nextElementSibling.classList.contains('js-container')
? this.element.nextElementSibling : null;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method create
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
int $id = null,
MagazineSmallResponseDto $magazine = null,
UserSmallResponseDto $reported = null,
UserSmallResponseDto $reporting = null,
string $reason = null,
Method subscribed
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
#[IsGranted('ROLE_USER')]
public function subscribed(?string $sortBy, ?string $time, PostRepository $repository, Request $request): Response
{
$user = $this->getUserOrThrow();
Function handleEntries
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
async handleEntries(url) {
let response = await fetch(url, {method: 'GET'});
response = await ok(response);
Method validate
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
#[Assert\Callback]
public function validate(
ExecutionContextInterface $context,
$payload
) {
Method getMonthlyStats
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getMonthlyStats(string $table, string $relation = null): array
{
$conn = $this->getEntityManager()
->getConnection();