Skip to content

Commit 0fcc6dc

Browse files
committed
Automatic PHP CS Fixer run.
1 parent 2376696 commit 0fcc6dc

File tree

10 files changed

+23
-27
lines changed

10 files changed

+23
-27
lines changed

.php_cs.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ return PhpCsFixer\Config::create()
2525
'doctrine_annotation_braces' => true,
2626
'doctrine_annotation_indentation' => true,
2727
'doctrine_annotation_spaces' => [
28+
'after_array_assignments_colon' => false,
29+
'after_array_assignments_equals' => false,
2830
'before_argument_assignments' => false,
2931
'before_array_assignments_colon' => false,
3032
'before_array_assignments_equals' => false,

src/Models/Character.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ class Character implements CharacterInterface, CreateableInterface, GameAwareInt
4747
private $name = "";
4848
/** @Column(type="text"); */
4949
private $displayName = "";
50-
/** @Column(type="integer", options={"default"= 10}) */
50+
/** @Column(type="integer", options={"default"=10}) */
5151
private $maxHealth = 10;
52-
/** @Column(type="integer", options={"default"= 10}) */
52+
/** @Column(type="integer", options={"default"=10}) */
5353
private $health = 10;
54-
/** @Column(type="integer", options={"default"= 1})/ */
54+
/** @Column(type="integer", options={"default"=1})/ */
5555
private $level = 1;
5656
/** @OneToMany(targetEntity="CharacterProperty", mappedBy="owner", cascade={"persist", "remove"}) */
5757
private $properties;

src/Models/MessageThread.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MessageThread implements SaveableInterface
2626
private $id;
2727
/** @Column(type="string", length=255, unique=true) */
2828
private $threadKey;
29-
/** @Column(type="boolean", options={"default"= false}) */
29+
/** @Column(type="boolean", options={"default"=false}) */
3030
private $readonly = false;
3131
/** @ManyToMany(targetEntity="Character", cascade={"persist"}, mappedBy="messageThreads") */
3232
private $participants;

src/Models/Scene.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Scene implements CreateableInterface, SceneConnectable
2727
use Deletor;
2828
use SceneBasics;
2929

30-
/** @Id @Column(type="string", length=36, unique=True, name="id", options={"fixed": true}) */
30+
/** @Id @Column(type="string", length=36, unique=True, name="id", options={"fixed"=true}) */
3131
protected $id;
3232

3333
/**

src/Models/SceneConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class SceneConnection
2828
private $incomingScene;
2929

3030
/**
31-
* @Column(type="integer", options={"default"= 0})
31+
* @Column(type="integer", options={"default"=0})
3232
*/
3333
private $directionality = 0;
3434

src/Models/SceneTemplate.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
<?php
22
declare(strict_types=1);
33

4-
54
namespace LotGD\Core\Models;
65

7-
use Doctrine\ORM\Mapping\Entity;
8-
use Doctrine\ORM\Mapping\Table;
96
use Doctrine\ORM\Mapping\Column;
7+
use Doctrine\ORM\Mapping\Entity;
108
use Doctrine\ORM\Mapping\Id;
9+
use Doctrine\ORM\Mapping\Table;
1110
use LotGD\Core\Exceptions\ArgumentException;
1211
use LotGD\Core\Exceptions\ClassNotFoundException;
1312
use LotGD\Core\SceneTemplates\SceneTemplateInterface;
1413

15-
1614
/**
17-
* Class SceneTemplates
15+
* Class SceneTemplates.
1816
* @Entity
1917
* @Table("scene_templates")
2018
*/
@@ -26,7 +24,7 @@ class SceneTemplate
2624
/** @Column(type="string", length=255, name="module") */
2725
protected $module;
2826

29-
/** @Column(type="boolean", options={"default": True}) */
27+
/** @Column(type="boolean", options={"default"=True}) */
3028
protected $userAssignable;
3129

3230
/**
@@ -38,9 +36,9 @@ class SceneTemplate
3836
*/
3937
public function __construct(string $class, string $module)
4038
{
41-
if (!class_exists($class)) {
39+
if (!\class_exists($class)) {
4240
throw new ClassNotFoundException("The class {$class} cannot be found.");
43-
} elseif (is_a($class, SceneTemplateInterface::class) === false) {
41+
} elseif (\is_a($class, SceneTemplateInterface::class) === false) {
4442
throw new ArgumentException("The given {$class} must implement SceneTemplateInterface");
4543
}
4644

@@ -62,6 +60,6 @@ public function getClass(): string
6260
*/
6361
public function setUserAssignable(bool $flag = true)
6462
{
65-
$this->userAssignable=$flag;
63+
$this->userAssignable = $flag;
6664
}
67-
}
65+
}

src/Models/Viewpoint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function getSnapshot(): ViewpointSnapshot
141141
$snapshot = new ViewpointSnapshot(
142142
$this->getTitle(),
143143
$this->getDescription(),
144-
get_class($this->getTemplate()),
144+
\get_class($this->getTemplate()),
145145
$this->getActionGroups(),
146146
$this->getAttachments(),
147147
$this->getData()

src/SceneTemplates/BasicSceneTemplate.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<?php
22
declare(strict_types=1);
33

4-
54
namespace LotGD\Core\SceneTemplates;
65

7-
86
/**
9-
* Class BasicSceneTemplate
7+
* Class BasicSceneTemplate.
108
*
119
* Offers a basic scene template. All scenes with no template use this class internally.
1210
*/
@@ -20,4 +18,4 @@ public static function getNavigationEvent(): string
2018
{
2119
return "no-template";
2220
}
23-
}
21+
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<?php
22
declare(strict_types=1);
33

4-
54
namespace LotGD\Core\SceneTemplates;
65

7-
86
interface SceneTemplateInterface
97
{
108
/**
119
* Returns the event string that's attached to the navigation-to hook.
1210
* @return string
1311
*/
1412
public static function getNavigationEvent(): string;
15-
}
13+
}

src/Tools/Model/SceneBasics.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
namespace LotGD\Core\Tools\Model;
55

66
use Doctrine\ORM\Mapping\Column;
7-
use Doctrine\ORM\Mapping\ManyToOne;
87
use Doctrine\ORM\Mapping\JoinColumn;
8+
use Doctrine\ORM\Mapping\ManyToOne;
99
use LotGD\Core\Models\SceneTemplate;
1010

1111
/**
@@ -61,7 +61,7 @@ public function getDescription(): string
6161
}
6262

6363
/**
64-
* Sets scene template
64+
* Sets scene template.
6565
* @param SceneTemplate|null $template
6666
*/
6767
public function setTemplate(?SceneTemplate $template)
@@ -70,7 +70,7 @@ public function setTemplate(?SceneTemplate $template)
7070
}
7171

7272
/**
73-
* Returns scene template
73+
* Returns scene template.
7474
* @return SceneTemplate|null
7575
*/
7676
public function getTemplate(): ?SceneTemplate

0 commit comments

Comments
 (0)