Skip to content

Conversation

@AngelFQC
Copy link
Member

@AngelFQC AngelFQC commented Jul 2, 2024

No description provided.

@AngelFQC AngelFQC linked an issue Jul 2, 2024 that may be closed by this pull request
@AngelFQC AngelFQC force-pushed the 5600 branch 2 times, most recently from 2e63a93 to 482774f Compare July 2, 2024 22:35
@codecov
Copy link

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 54.01460% with 63 lines in your changes missing coverage. Please review.

Project coverage is 39.08%. Comparing base (11d197c) to head (b81a686).
Report is 30 commits behind head on master.

Files Patch % Lines
...e/Migrations/Schema/V200/Version20240702222600.php 7.69% 24 Missing ⚠️
...e/Migrations/Schema/V200/Version20230913162700.php 0.00% 18 Missing ⚠️
src/CoreBundle/Entity/ResourceNode.php 86.11% 5 Missing ⚠️
src/CoreBundle/Repository/Node/UserRepository.php 0.00% 4 Missing ⚠️
...reBundle/Controller/Api/BaseResourceFileAction.php 25.00% 3 Missing ⚠️
...e/Migrations/Schema/V200/Version20170525122900.php 0.00% 3 Missing ⚠️
...e/Migrations/Schema/V200/Version20240515124400.php 0.00% 2 Missing ⚠️
src/CoreBundle/Controller/ResourceController.php 93.33% 1 Missing ⚠️
src/CoreBundle/Controller/TemplateController.php 0.00% 1 Missing ⚠️
...e/Migrations/Schema/V200/Version20201215142610.php 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5625      +/-   ##
============================================
- Coverage     39.13%   39.08%   -0.05%     
- Complexity    10961    10988      +27     
============================================
  Files           864      867       +3     
  Lines         45332    45407      +75     
============================================
+ Hits          17739    17746       +7     
- Misses        27593    27661      +68     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

#[ORM\Column(type: 'datetime')]
protected $updatedAt;

#[ORM\ManyToOne(inversedBy: 'resourceFiles')]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

protected $updatedAt;

#[ORM\ManyToOne(inversedBy: 'resourceFiles')]
private ?ResourceNode $resourceNode = null;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 8 spaces, found 4

return $this;
}

public function getResourceNode(): ?ResourceNode

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 8 spaces, found 4

return $this;
}

public function getResourceNode(): ?ResourceNode

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing function doc comment

return $this->resourceNode;
}

public function setResourceNode(?ResourceNode $resourceNode): static

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 8 spaces, found 4

return $this->resourceNode;
}

public function setResourceNode(?ResourceNode $resourceNode): static

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing function doc comment

return $this->resourceNode;
}

public function setResourceNode(?ResourceNode $resourceNode): static

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope keyword "static" must be followed by a single space

]
)]
#[ApiFilter(filterClass: OrderFilter::class, properties: ['id', 'title', 'resourceFile', 'createdAt', 'updatedAt'])]
#[ApiFilter(filterClass: OrderFilter::class, properties: ['id', 'title', 'createdAt', 'updatedAt'])]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

protected ?ResourceFile $resourceFile = null;
//#[ORM\OneToOne(inversedBy: 'resourceNode', targetEntity: ResourceFile::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
//#[ORM\JoinColumn(name: 'resource_file_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
#protected ?ResourceFile $resourceFile = null;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

* @var Collection<int, ResourceFile>
*/
#[Groups(['resource_node:read', 'resource_node:write', 'document:read', 'document:write', 'message:read'])]
#[ORM\OneToMany(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.

@AngelFQC AngelFQC marked this pull request as ready for review July 2, 2024 23:57
'rootClose' => '</ul>',
//'childOpen' => '<li class="doc_resource lp_resource_element ">',
'childOpen' => function ($child) {
'childOpen' => function ($child) {;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opening brace must be the last content on the line

cascade: ['persist', 'remove'],
fetch: 'EXTRA_LAZY',
)]
private Collection $resourceFiles;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 8 spaces, found 4

$this->comments = new ArrayCollection();
$this->createdAt = new DateTime();
$this->fileEditableText = false;
$this->resourceFiles = new ArrayCollection();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected at least 12 spaces, found 8

{
if ($this->hasResourceFile()) {
$mimeType = $this->getResourceFile()->getMimeType();
if ($resourceFile = $this->resourceFiles->first()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 12 spaces, found 8

if ($this->hasResourceFile()) {
$mimeType = $this->getResourceFile()->getMimeType();
if ($resourceFile = $this->resourceFiles->first()) {
$mimeType = $resourceFile->getMimeType();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected at least 16 spaces, found 12

}

public function getIcon(): string
public function getIcon(?string $additionalClass = null): string

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 8 spaces, found 4

}

public function getIcon(): string
public function getIcon(?string $additionalClass = null): string

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing function doc comment

}
}

if ($additionalClass) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 12 spaces, found 8

}

if ($additionalClass) {
$class .= " $additionalClass";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected at least 16 spaces, found 12

{
if ($this->hasResourceFile()) {
$mimeType = $this->getResourceFile()->getMimeType();
if ($resourceFile = $this->resourceFiles->first()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 12 spaces, found 8

@qlty-cloud-legacy
Copy link

An error occurred when fetching issues.

View more on Code Climate.

@ywarnier ywarnier merged commit 95b92f6 into chamilo:master Jul 4, 2024
@AngelFQC AngelFQC deleted the 5600 branch October 14, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C2] Allow multi-format media files

2 participants