Skip to content

Commit 86cdbf3

Browse files
committed
chore: update playground
1 parent 5a6d7a2 commit 86cdbf3

12 files changed

Lines changed: 303 additions & 363 deletions

playground/2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ function my_func(int $int)
66
{
77
$a = 1 + '';
88
return str_repeat('a', $int);
9-
}
9+
}

playground/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"require-dev": {
3-
"carthage-software/mago": "1.0.0-beta.12",
4-
"vimeo/psalm": "^6.13"
3+
"carthage-software/mago": "*",
4+
"vimeo/psalm": "*"
55
},
66
"config": {
77
"allow-plugins": {

playground/composer.lock

Lines changed: 228 additions & 218 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
variant = "loose"
2+
3+
[[issues]]
4+
file = "src/baseline.php"
5+
code = "non-existent-function"
6+
message = "Function `doesNotExist` could not be found."
7+
count = 1

playground/mago.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ literal-named-argument = { enabled = false }
2121
halstead = { effort-threshold = 7000 }
2222

2323
[analyzer]
24+
baseline = "mago-analysis-baseline.toml"
2425
find-unused-definitions = true
2526
find-unused-expressions = false
2627
analyze-dead-code = false

playground/out.json

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

playground/src/baseline.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
doesNotExist();

playground/src/good.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
echo 'gooo' . a(2);
44

5-
function a($f):string
5+
function a($f): string
66
{
77
return 123;
88
}

playground/src/guard.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22

3-
# ッッッ
3+
// ッッッ
44
$a = 1 + 111;
5-
echo blabla();
5+
echo blabla();
66
1 + 111;
77
echo blabla();
88
1 + 111;
9-
echo blabla();
9+
echo blabla();
1010
1 + 111;
1111
echo blabla();
1212

13-
$aa = 12313;
13+
$aa = 12313;

playground/src/inspect.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
$test = 'nice';
6+
$test2 = $test . '2';
7+
8+
function test(): true
9+
{
10+
return true;
11+
}
12+
13+
/** @mago-ignore lint:no-debug-symbols */
14+
\Mago\inspect($test, test(), $test2);

0 commit comments

Comments
 (0)