Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ pluginVersion = 2026.1.5
pluginSinceBuild = 251

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = IU
platformType = PS
platformVersion = 2025.1.1

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
platformPlugins = org.toml.lang:251.23774.216,com.jetbrains.php:251.23774.16,org.jetbrains.plugins.phpstorm-remote-interpreter:251.23774.16,org.jetbrains.plugins.phpstorm-docker:251.23774.16,com.github.xepozz.metastorm:2025.1.29,com.jetbrains.hackathon.indices.viewer:1.30
# Example: platformBundledPlugins = com.intellij.java
platformBundledPlugins = com.intellij.modules.json
platformBundledPlugins = com.intellij.modules.json,Docker
# Example: platformBundledModules = intellij.spellchecker
platformBundledModules =

Expand Down
2 changes: 1 addition & 1 deletion playground/2.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ function my_func(int $int)
{
$a = 1 + '';
return str_repeat('a', $int);
}
}
4 changes: 2 additions & 2 deletions playground/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"require-dev": {
"carthage-software/mago": "1.0.0-beta.12",
"vimeo/psalm": "^6.13"
"carthage-software/mago": "*",
"vimeo/psalm": "*"
},
"config": {
"allow-plugins": {
Expand Down
446 changes: 228 additions & 218 deletions playground/composer.lock

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions playground/mago-analysis-baseline.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
variant = "loose"

[[issues]]
file = "src/baseline.php"
code = "non-existent-function"
message = "Function `doesNotExist` could not be found."
count = 1
1 change: 1 addition & 0 deletions playground/mago.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ literal-named-argument = { enabled = false }
halstead = { effort-threshold = 7000 }

[analyzer]
baseline = "mago-analysis-baseline.toml"
find-unused-definitions = true
find-unused-expressions = false
analyze-dead-code = false
Expand Down
137 changes: 0 additions & 137 deletions playground/out.json

This file was deleted.

3 changes: 3 additions & 0 deletions playground/src/baseline.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

doesNotExist();
2 changes: 1 addition & 1 deletion playground/src/good.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo 'gooo' . a(2);

function a($f):string
function a($f): string
{
return 123;
}
Expand Down
8 changes: 4 additions & 4 deletions playground/src/guard.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

# ッッッ
// ッッッ
$a = 1 + 111;
echo blabla();
echo blabla();
1 + 111;
echo blabla();
1 + 111;
echo blabla();
echo blabla();
1 + 111;
echo blabla();

$aa = 12313;
$aa = 12313;
14 changes: 14 additions & 0 deletions playground/src/inspect.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

declare(strict_types=1);

$test = 'nice';
$test2 = $test . '2';

function test(): true
{
return true;
}

/** @mago-ignore lint:no-debug-symbols */
\Mago\inspect($test, test(), $test2);
1 change: 1 addition & 0 deletions playground/src/remove-empty-file-action.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
41 changes: 41 additions & 0 deletions playground/src/suppress-comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

/**
* My Class
*
* @package BIG
*/
class Test
{
/**
* My function
*
* @return void
*/
public function test()
{
nice(); // Ignore without a comment

/** Test */
nice(); // Ignore on an existing single-line comment

/**
* Test
*/
nice(); // Ignore on an existing multi-line comment

/**
* Test
*
* @mago-ignore analysis:test
*
* Test
*/
nice(); // Append to an existing comment in the middle
}
}

function test()
{
nice();
}
Loading
Loading