Skip to content

Commit b6c4380

Browse files
committed
Fix some PHP CS rules
1 parent fa5b09d commit b6c4380

18 files changed

+130
-172
lines changed

.php_cs

Lines changed: 0 additions & 41 deletions
This file was deleted.

Form/DataTransformer/StatusTransformer.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ public function transform($number)
1919
if (TicketMessage::STATUS_CLOSED == $number) {
2020
return 1;
2121
}
22-
23-
return;
2422
}
2523

2624
/**
@@ -35,7 +33,5 @@ public function reverseTransform($number)
3533
if (1 == $number) {
3634
return TicketMessage::STATUS_CLOSED;
3735
}
38-
39-
return;
4036
}
4137
}

Model/TicketMessageInterface.php

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,45 @@
44

55
interface TicketMessageInterface
66
{
7+
const STATUS_INVALID = 0;
8+
9+
const STATUS_OPEN = 10;
10+
11+
const STATUS_IN_PROGRESS = 11;
12+
13+
const STATUS_INFORMATION_REQUESTED = 12;
14+
15+
const STATUS_ON_HOLD = 13;
16+
17+
const STATUS_RESOLVED = 14;
18+
19+
const STATUS_CLOSED = 15;
20+
21+
const STATUSES = [
22+
self::STATUS_INVALID => 'STATUS_INVALID',
23+
self::STATUS_OPEN => 'STATUS_OPEN',
24+
self::STATUS_IN_PROGRESS => 'STATUS_IN_PROGRESS',
25+
self::STATUS_INFORMATION_REQUESTED => 'STATUS_INFORMATION_REQUESTED',
26+
self::STATUS_ON_HOLD => 'STATUS_ON_HOLD',
27+
self::STATUS_RESOLVED => 'STATUS_RESOLVED',
28+
self::STATUS_CLOSED => 'STATUS_CLOSED',
29+
];
30+
31+
const PRIORITY_INVALID = 0;
32+
33+
const PRIORITY_LOW = 20;
34+
35+
const PRIORITY_MEDIUM = 21;
36+
37+
const PRIORITY_HIGH = 22;
38+
39+
const PRIORITIES = [
40+
self::PRIORITY_INVALID => 'PRIORITY_INVALID',
41+
self::PRIORITY_LOW => 'PRIORITY_LOW',
42+
self::PRIORITY_MEDIUM => 'PRIORITY_MEDIUM',
43+
self::PRIORITY_HIGH => 'PRIORITY_HIGH',
44+
];
45+
746
/**
847
* Get id.
948
*
@@ -143,43 +182,4 @@ public function setTicket(TicketInterface $ticket = null);
143182
* @return TicketInterface
144183
*/
145184
public function getTicket();
146-
147-
const STATUS_INVALID = 0;
148-
149-
const STATUS_OPEN = 10;
150-
151-
const STATUS_IN_PROGRESS = 11;
152-
153-
const STATUS_INFORMATION_REQUESTED = 12;
154-
155-
const STATUS_ON_HOLD = 13;
156-
157-
const STATUS_RESOLVED = 14;
158-
159-
const STATUS_CLOSED = 15;
160-
161-
const STATUSES = [
162-
self::STATUS_INVALID => 'STATUS_INVALID',
163-
self::STATUS_OPEN => 'STATUS_OPEN',
164-
self::STATUS_IN_PROGRESS => 'STATUS_IN_PROGRESS',
165-
self::STATUS_INFORMATION_REQUESTED => 'STATUS_INFORMATION_REQUESTED',
166-
self::STATUS_ON_HOLD => 'STATUS_ON_HOLD',
167-
self::STATUS_RESOLVED => 'STATUS_RESOLVED',
168-
self::STATUS_CLOSED => 'STATUS_CLOSED',
169-
];
170-
171-
const PRIORITY_INVALID = 0;
172-
173-
const PRIORITY_LOW = 20;
174-
175-
const PRIORITY_MEDIUM = 21;
176-
177-
const PRIORITY_HIGH = 22;
178-
179-
const PRIORITIES = [
180-
self::PRIORITY_INVALID => 'PRIORITY_INVALID',
181-
self::PRIORITY_LOW => 'PRIORITY_LOW',
182-
self::PRIORITY_MEDIUM => 'PRIORITY_MEDIUM',
183-
self::PRIORITY_HIGH => 'PRIORITY_HIGH',
184-
];
185185
}

Tests/Component/TicketFeaturesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testFeatureAttachment($features, $class, $compare)
4141
$obj = new TicketFeatures($features, $class);
4242

4343
$this->assertInstanceOf(TicketFeatures::class, $obj);
44-
$this->assertEquals($obj->hasFeature('attachment'), $compare);
44+
$this->assertSame($obj->hasFeature('attachment'), $compare);
4545
}
4646

4747
public function featureAttachmentProvider()

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ class ConfigurationTest extends WebTestCase
99
{
1010
private $object;
1111

12-
public function setUp()
12+
protected function setUp()
1313
{
1414
$this->object = new Configuration();
1515
}
1616

17-
public function tearDown()
17+
protected function tearDown()
1818
{
1919
unset($this->object);
2020
}

Tests/DependencyInjection/HackzillaTicketExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ class HackzillaTicketExtensionTest extends WebTestCase
99
{
1010
private $object;
1111

12-
public function setUp()
12+
protected function setUp()
1313
{
1414
$this->object = new HackzillaTicketExtension();
1515
}
1616

17-
public function tearDown()
17+
protected function tearDown()
1818
{
1919
unset($this->object);
2020
}

Tests/Entity/TicketMessageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ class TicketMessageTest extends WebTestCase
99
{
1010
private $object;
1111

12-
public function setUp()
12+
protected function setUp()
1313
{
1414
$this->object = new TicketMessage();
1515
}
1616

17-
public function tearDown()
17+
protected function tearDown()
1818
{
1919
unset($this->object);
2020
}

Tests/Entity/TicketMessageWithAttachmentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ class TicketMessageWithAttachmentTest extends WebTestCase
99
{
1010
private $object;
1111

12-
public function setUp()
12+
protected function setUp()
1313
{
1414
$this->object = new TicketMessageWithAttachment();
1515
}
1616

17-
public function tearDown()
17+
protected function tearDown()
1818
{
1919
unset($this->object);
2020
}

Tests/Entity/TicketTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ class TicketTest extends WebTestCase
1010
{
1111
private $object;
1212

13-
public function setUp()
13+
protected function setUp()
1414
{
1515
$this->object = new Ticket();
1616
}
1717

18-
public function tearDown()
18+
protected function tearDown()
1919
{
2020
unset($this->object);
2121
}

Tests/EventListener/UserLoadTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ class UserLoadTest extends WebTestCase
1010
{
1111
private $object;
1212

13-
public function setUp()
13+
protected function setUp()
1414
{
1515
$userManager = $this->getUserManagerMock();
1616

1717
$this->object = new UserLoad($userManager);
1818
}
1919

20-
public function getUserManagerMock()
20+
protected function tearDown()
2121
{
22-
return $this->createMock(UserManager::class);
22+
unset($this->object);
2323
}
2424

25-
public function tearDown()
25+
public function getUserManagerMock()
2626
{
27-
unset($this->object);
27+
return $this->createMock(UserManager::class);
2828
}
2929

3030
public function testObjectCreated()

0 commit comments

Comments
 (0)