Skip to content

Commit ad1a838

Browse files
authored
Merge pull request #667 from phil-davis/fix-ci-20240828
chore: adjust code to make php-cs-fixer and phpstan pass
2 parents db14749 + e1cc246 commit ad1a838

6 files changed

+16
-14
lines changed

bin/bench.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77

88
$start = microtime(true);
99

10-
$lol = Sabre\VObject\Reader::read($data);
10+
$lol = VObject\Reader::read($data);
1111

1212
echo 'time: '.(microtime(true) - $start)."\n";

bin/bench_freebusygenerator.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include __DIR__.'/../vendor/autoload.php';
44

55
if ($argc < 2) {
6-
echo 'sabre/vobject ', Sabre\VObject\Version::VERSION, " freebusy benchmark\n";
6+
echo 'sabre/vobject ', VObject\Version::VERSION, " freebusy benchmark\n";
77
echo "\n";
88
echo "This script can be used to measure the speed of generating a\n";
99
echo "free-busy report based on a calendar.\n";
@@ -19,7 +19,7 @@
1919
$bench = new Hoa\Bench\Bench();
2020
$bench->parse->start();
2121

22-
$vcal = Sabre\VObject\Reader::read(fopen($inputFile, 'r'));
22+
$vcal = VObject\Reader::read(fopen($inputFile, 'r'));
2323

2424
$bench->parse->stop();
2525

@@ -31,7 +31,7 @@
3131
$bench->fb->start();
3232

3333
for ($i = 0; $i < $repeat; ++$i) {
34-
$fb = new Sabre\VObject\FreeBusyGenerator($start, $end, $vcal, $timeZone);
34+
$fb = new VObject\FreeBusyGenerator($start, $end, $vcal, $timeZone);
3535
$results = $fb->getResult();
3636
}
3737
$bench->fb->stop();

bin/bench_manipulatevcard.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include __DIR__.'/../vendor/autoload.php';
44

55
if ($argc < 2) {
6-
echo 'sabre/vobject ', Sabre\VObject\Version::VERSION, " manipulation benchmark\n";
6+
echo 'sabre/vobject ', VObject\Version::VERSION, " manipulation benchmark\n";
77
echo "\n";
88
echo "This script can be used to measure the speed of opening a large amount of\n";
99
echo "vcards, making a few alterations and serializing them again.\n";
@@ -17,7 +17,7 @@
1717

1818
$input = file_get_contents($inputFile);
1919

20-
$splitter = new Sabre\VObject\Splitter\VCard($input);
20+
$splitter = new VObject\Splitter\VCard($input);
2121

2222
$bench = new Hoa\Bench\Bench();
2323

bin/rrulebench.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include __DIR__.'/../vendor/autoload.php';
44

55
if ($argc < 4) {
6-
echo 'sabre/vobject ', Sabre\VObject\Version::VERSION, " RRULE benchmark\n";
6+
echo 'sabre/vobject ', VObject\Version::VERSION, " RRULE benchmark\n";
77
echo "\n";
88
echo "This script can be used to measure the speed of the 'recurrence expansion'\n";
99
echo 'system.';
@@ -18,7 +18,7 @@
1818
$bench->parse->start();
1919

2020
echo "Parsing.\n";
21-
$vobj = Sabre\VObject\Reader::read(fopen($inputFile, 'r'));
21+
$vobj = VObject\Reader::read(fopen($inputFile, 'r'));
2222

2323
$bench->parse->stop();
2424

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
"sabre/xml" : "^3.0 || ^4.0"
3939
},
4040
"require-dev" : {
41-
"friendsofphp/php-cs-fixer": "^3.54",
41+
"friendsofphp/php-cs-fixer": "3.62.0",
4242
"phpunit/phpunit" : "^9.6",
4343
"phpunit/php-invoker" : "^2.0 || ^3.1",
44-
"phpstan/phpstan": "^1.11"
44+
"phpstan/phpstan": "^1.12"
4545
},
4646
"suggest" : {
4747
"hoa/bench" : "If you would like to run the benchmark scripts"

tests/VObject/ITip/BrokerDeleteEventTest.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Sabre\VObject\ITip;
44

5+
use Sabre\VObject\Version;
6+
57
class BrokerDeleteEventTest extends BrokerTester
68
{
79
public function testOrganizerDeleteWithDtend(): void
@@ -24,7 +26,7 @@ public function testOrganizerDeleteWithDtend(): void
2426

2527
$newMessage = null;
2628

27-
$version = \Sabre\VObject\Version::VERSION;
29+
$version = Version::VERSION;
2830

2931
$expected = [
3032
[
@@ -107,7 +109,7 @@ public function testOrganizerDeleteWithDuration(): void
107109

108110
$newMessage = null;
109111

110-
$version = \Sabre\VObject\Version::VERSION;
112+
$version = Version::VERSION;
111113

112114
$expected = [
113115
[
@@ -190,7 +192,7 @@ public function testAttendeeDeleteWithDtend(): void
190192

191193
$newMessage = null;
192194

193-
$version = \Sabre\VObject\Version::VERSION;
195+
$version = Version::VERSION;
194196

195197
$expected = [
196198
[
@@ -245,7 +247,7 @@ public function testAttendeeReplyWithDuration(): void
245247

246248
$newMessage = null;
247249

248-
$version = \Sabre\VObject\Version::VERSION;
250+
$version = Version::VERSION;
249251

250252
$expected = [
251253
[

0 commit comments

Comments
 (0)