Automatic PHP CS Fixer run.
This commit is contained in:
@@ -25,6 +25,8 @@ return PhpCsFixer\Config::create()
|
||||
'doctrine_annotation_braces' => true,
|
||||
'doctrine_annotation_indentation' => true,
|
||||
'doctrine_annotation_spaces' => [
|
||||
'after_array_assignments_colon' => false,
|
||||
'after_array_assignments_equals' => false,
|
||||
'before_argument_assignments' => false,
|
||||
'before_array_assignments_colon' => false,
|
||||
'before_array_assignments_equals' => false,
|
||||
|
||||
@@ -47,11 +47,11 @@ class Character implements CharacterInterface, CreateableInterface, GameAwareInt
|
||||
private $name = "";
|
||||
/** @Column(type="text"); */
|
||||
private $displayName = "";
|
||||
/** @Column(type="integer", options={"default"= 10}) */
|
||||
/** @Column(type="integer", options={"default"=10}) */
|
||||
private $maxHealth = 10;
|
||||
/** @Column(type="integer", options={"default"= 10}) */
|
||||
/** @Column(type="integer", options={"default"=10}) */
|
||||
private $health = 10;
|
||||
/** @Column(type="integer", options={"default"= 1})/ */
|
||||
/** @Column(type="integer", options={"default"=1})/ */
|
||||
private $level = 1;
|
||||
/** @OneToMany(targetEntity="CharacterProperty", mappedBy="owner", cascade={"persist", "remove"}) */
|
||||
private $properties;
|
||||
|
||||
@@ -26,7 +26,7 @@ class MessageThread implements SaveableInterface
|
||||
private $id;
|
||||
/** @Column(type="string", length=255, unique=true) */
|
||||
private $threadKey;
|
||||
/** @Column(type="boolean", options={"default"= false}) */
|
||||
/** @Column(type="boolean", options={"default"=false}) */
|
||||
private $readonly = false;
|
||||
/** @ManyToMany(targetEntity="Character", cascade={"persist"}, mappedBy="messageThreads") */
|
||||
private $participants;
|
||||
|
||||
@@ -27,7 +27,7 @@ class Scene implements CreateableInterface, SceneConnectable
|
||||
use Deletor;
|
||||
use SceneBasics;
|
||||
|
||||
/** @Id @Column(type="string", length=36, unique=True, name="id", options={"fixed": true}) */
|
||||
/** @Id @Column(type="string", length=36, unique=True, name="id", options={"fixed"=true}) */
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@ class SceneConnection
|
||||
private $incomingScene;
|
||||
|
||||
/**
|
||||
* @Column(type="integer", options={"default"= 0})
|
||||
* @Column(type="integer", options={"default"=0})
|
||||
*/
|
||||
private $directionality = 0;
|
||||
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace LotGD\Core\Models;
|
||||
|
||||
use Doctrine\ORM\Mapping\Entity;
|
||||
use Doctrine\ORM\Mapping\Table;
|
||||
use Doctrine\ORM\Mapping\Column;
|
||||
use Doctrine\ORM\Mapping\Entity;
|
||||
use Doctrine\ORM\Mapping\Id;
|
||||
use Doctrine\ORM\Mapping\Table;
|
||||
use LotGD\Core\Exceptions\ArgumentException;
|
||||
use LotGD\Core\Exceptions\ClassNotFoundException;
|
||||
use LotGD\Core\SceneTemplates\SceneTemplateInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Class SceneTemplates
|
||||
* Class SceneTemplates.
|
||||
* @Entity
|
||||
* @Table("scene_templates")
|
||||
*/
|
||||
@@ -26,7 +24,7 @@ class SceneTemplate
|
||||
/** @Column(type="string", length=255, name="module") */
|
||||
protected $module;
|
||||
|
||||
/** @Column(type="boolean", options={"default": True}) */
|
||||
/** @Column(type="boolean", options={"default"=True}) */
|
||||
protected $userAssignable;
|
||||
|
||||
/**
|
||||
@@ -38,9 +36,9 @@ class SceneTemplate
|
||||
*/
|
||||
public function __construct(string $class, string $module)
|
||||
{
|
||||
if (!class_exists($class)) {
|
||||
if (!\class_exists($class)) {
|
||||
throw new ClassNotFoundException("The class {$class} cannot be found.");
|
||||
} elseif (is_a($class, SceneTemplateInterface::class) === false) {
|
||||
} elseif (\is_a($class, SceneTemplateInterface::class) === false) {
|
||||
throw new ArgumentException("The given {$class} must implement SceneTemplateInterface");
|
||||
}
|
||||
|
||||
@@ -62,6 +60,6 @@ class SceneTemplate
|
||||
*/
|
||||
public function setUserAssignable(bool $flag = true)
|
||||
{
|
||||
$this->userAssignable=$flag;
|
||||
$this->userAssignable = $flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ class Viewpoint implements CreateableInterface
|
||||
$snapshot = new ViewpointSnapshot(
|
||||
$this->getTitle(),
|
||||
$this->getDescription(),
|
||||
get_class($this->getTemplate()),
|
||||
\get_class($this->getTemplate()),
|
||||
$this->getActionGroups(),
|
||||
$this->getAttachments(),
|
||||
$this->getData()
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace LotGD\Core\SceneTemplates;
|
||||
|
||||
|
||||
/**
|
||||
* Class BasicSceneTemplate
|
||||
* Class BasicSceneTemplate.
|
||||
*
|
||||
* Offers a basic scene template. All scenes with no template use this class internally.
|
||||
*/
|
||||
@@ -20,4 +18,4 @@ class BasicSceneTemplate implements SceneTemplateInterface
|
||||
{
|
||||
return "no-template";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace LotGD\Core\SceneTemplates;
|
||||
|
||||
|
||||
interface SceneTemplateInterface
|
||||
{
|
||||
/**
|
||||
@@ -12,4 +10,4 @@ interface SceneTemplateInterface
|
||||
* @return string
|
||||
*/
|
||||
public static function getNavigationEvent(): string;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ declare(strict_types=1);
|
||||
namespace LotGD\Core\Tools\Model;
|
||||
|
||||
use Doctrine\ORM\Mapping\Column;
|
||||
use Doctrine\ORM\Mapping\ManyToOne;
|
||||
use Doctrine\ORM\Mapping\JoinColumn;
|
||||
use Doctrine\ORM\Mapping\ManyToOne;
|
||||
use LotGD\Core\Models\SceneTemplate;
|
||||
|
||||
/**
|
||||
@@ -61,7 +61,7 @@ trait SceneBasics
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets scene template
|
||||
* Sets scene template.
|
||||
* @param SceneTemplate|null $template
|
||||
*/
|
||||
public function setTemplate(?SceneTemplate $template)
|
||||
@@ -70,7 +70,7 @@ trait SceneBasics
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns scene template
|
||||
* Returns scene template.
|
||||
* @return SceneTemplate|null
|
||||
*/
|
||||
public function getTemplate(): ?SceneTemplate
|
||||
|
||||
Reference in New Issue
Block a user