Internal - Format code

pull/3570/head
Julio Montoya 4 years ago
parent 241b61b0ed
commit a64171a189
  1. 2
      ecs.php
  2. 14
      src/CoreBundle/Entity/Promotion.php
  3. 12
      src/CoreBundle/Entity/ResourceComment.php
  4. 22
      src/CoreBundle/Entity/ResourceFile.php
  5. 47
      src/CoreBundle/Entity/ResourceLink.php
  6. 22
      src/CoreBundle/Entity/ResourceNode.php
  7. 32
      src/CoreBundle/Entity/ResourceRight.php
  8. 10
      src/CoreBundle/Entity/ResourceType.php

@ -10,7 +10,7 @@ declare(strict_types=1);
use PhpCsFixer\Fixer\Operator\IncrementStyleFixer;
use SlevomatCodingStandard\Sniffs\Variables\UnusedVariableSniff;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\Configuration\Option;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ContainerConfigurator $containerConfigurator): void {

@ -93,10 +93,8 @@ class Promotion
* Set description.
*
* @param string $description
*
* @return Promotion
*/
public function setDescription($description)
public function setDescription($description): self
{
$this->description = $description;
@ -115,12 +113,8 @@ class Promotion
/**
* Set career.
*
* @param Career $career
*
* @return Promotion
*/
public function setCareer($career)
public function setCareer(Career $career): self
{
$this->career = $career;
@ -141,10 +135,8 @@ class Promotion
* Set status.
*
* @param int $status
*
* @return Promotion
*/
public function setStatus($status)
public function setStatus($status): self
{
$this->status = $status;

@ -114,16 +114,6 @@ class ResourceComment
return $this->id;
}
/**
* @return ResourceComment
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
public function getContent(): string
{
return $this->content;
@ -175,7 +165,7 @@ class ResourceComment
/**
* @return ResourceComment[]
*/
public function getChildren(): array
public function getChildren()
{
return $this->children;
}

@ -203,18 +203,12 @@ class ResourceFile
return false;
}
/**
* @return string
*/
public function getName()
public function getName(): string
{
return $this->name;
}
/**
* @return ResourceFile
*/
public function setName($name)
public function setName($name): self
{
$this->name = $name;
@ -234,7 +228,7 @@ class ResourceFile
*
* @return $this
*/
public function setCrop($crop)
public function setCrop($crop): self
{
$this->crop = $crop;
@ -288,13 +282,6 @@ class ResourceFile
return $this->id;
}
public function setId($id): self
{
$this->id = $id;
return $this;
}
/*public function getDescription(): string
{
return $this->description;
@ -389,9 +376,6 @@ class ResourceFile
return $this;
}
/**
* @return File
*/
public function getFile(): ?File
{
return $this->file;

@ -132,10 +132,8 @@ class ResourceLink
/**
* @param ArrayCollection $rights
*
* @return $this
*/
public function setResourceRight($rights)
public function setResourceRight($rights): self
{
$this->resourceRight = $rights;
@ -146,10 +144,7 @@ class ResourceLink
return $this;
}
/**
* @return $this
*/
public function addResourceRight(ResourceRight $right)
public function addResourceRight(ResourceRight $right): self
{
$right->setResourceLink($this);
$this->resourceRight[] = $right;
@ -173,46 +168,28 @@ class ResourceLink
return $this->id;
}
/**
* @param User $user
*
* @return $this
*/
public function setUser(User $user = null)
public function setUser(User $user = null): self
{
$this->user = $user;
return $this;
}
/**
* @param Course $course
*
* @return $this
*/
public function setCourse(Course $course = null)
public function setCourse(Course $course = null): self
{
$this->course = $course;
return $this;
}
/**
* @param Session $session
*
* @return $this
*/
public function setSession(Session $session = null)
public function setSession(Session $session = null): self
{
$this->session = $session;
return $this;
}
/**
* @return CGroup
*/
public function getGroup()
public function getGroup(): ?CGroup
{
return $this->group;
}
@ -224,20 +201,12 @@ class ResourceLink
return $this;
}
/**
* @return Usergroup
*/
public function getUserGroup()
public function getUserGroup(): ?Usergroup
{
return $this->userGroup;
}
/**
* @param Usergroup $group
*
* @return $this
*/
public function setUserGroup(Usergroup $group = null)
public function setUserGroup(Usergroup $group = null): self
{
$this->userGroup = $group;

@ -229,8 +229,6 @@ class ResourceNode
/**
* Returns the resource creator.
*
* @return User
*/
public function getCreator(): ?User
{
@ -276,12 +274,10 @@ class ResourceNode
/**
* Return the lvl value of the resource in the tree.
*
* @return int
*/
public function getLevel()
public function getLevel(): int
{
return $this->level;
return (int) $this->level;
}
/**
@ -412,10 +408,7 @@ class ResourceNode
return $pathForDisplay;
}
/**
* @return ResourceType
*/
public function getResourceType()
public function getResourceType(): ResourceType
{
return $this->resourceType;
}
@ -435,10 +428,7 @@ class ResourceNode
return $this->resourceLinks;
}
/**
* @return ResourceNode
*/
public function setResourceLinks($resourceLinks)
public function setResourceLinks($resourceLinks): self
{
$this->resourceLinks = $resourceLinks;
@ -446,9 +436,7 @@ class ResourceNode
}
/**
* @param Session $session
*
* @return ArrayCollection
* @return ResourceLink[]
*/
public function hasSession(Session $session = null)
{

@ -39,10 +39,7 @@ class ResourceRight
*/
protected $mask;
/**
* @return string
*/
public function __toString()
public function __toString(): string
{
return (string) $this->getId();
}
@ -83,43 +80,22 @@ class ResourceRight
return $this->resourceLink;
}
/**
* @param ResourceLink $resourceLink
*
* @return $this
*/
public function setResourceLink($resourceLink)
public function setResourceLink(ResourceLink $resourceLink): self
{
$this->resourceLink = $resourceLink;
return $this;
}
/**
* @return string
*/
public function getRole()
public function getRole(): string
{
return $this->role;
}
/**
* @param string $role
*
* @return $this
*/
public function setRole($role)
public function setRole(string $role): self
{
$this->role = $role;
return $this;
}
/**
* @param int $id
*/
public function setId($id)
{
$this->id = $id;
}
}

@ -65,18 +65,12 @@ class ResourceType
return $this;
}
/**
* @return string
*/
public function getName()
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*/
public function setName($name): self
public function setName(string $name): self
{
$this->name = $name;

Loading…
Cancel
Save