1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Apply code styles

This commit is contained in:
Oliver Hader 2022-01-21 15:53:06 +01:00
parent 62a0ece035
commit 3fedb5cce6
No known key found for this signature in database
GPG Key ID: C19FAFD699012A5A
5 changed files with 12 additions and 8 deletions

View File

@ -1395,7 +1395,7 @@ class Config
} catch (Throwable $t) {
throw new ConfigException(
'Failed to process plugin file extensions ' . $pluginClassName,
1635800581,
1_635_800_581,
$t
);
}
@ -1438,7 +1438,7 @@ class Config
} catch (Throwable $t) {
throw new ConfigException(
'Failed to invoke plugin ' . $plugin_class_name,
1635800582,
1_635_800_582,
$t
);
}
@ -1505,11 +1505,11 @@ class Config
self::requirePath($pluginclas_class_path);
} else {
if (!class_exists($pluginClassName)) {
throw new \UnexpectedValueException($pluginClassName . ' is not a known class');
throw new UnexpectedValueException($pluginClassName . ' is not a known class');
}
}
if (!is_a($pluginClassName, PluginInterface::class, true)) {
throw new \UnexpectedValueException($pluginClassName . ' is not a PluginInterface implementation');
throw new UnexpectedValueException($pluginClassName . ' is not a PluginInterface implementation');
}
$this->plugins[$pluginClassName] = new $pluginClassName;
$projectAnalyzer->progress->debug('Loaded plugin ' . $pluginClassName . PHP_EOL);

View File

@ -1,4 +1,5 @@
<?php
namespace Psalm\Plugin;
use Psalm\Internal\Analyzer\FileAnalyzer;

View File

@ -1,4 +1,5 @@
<?php
namespace Psalm\Plugin;
use SimpleXMLElement;

View File

@ -1,4 +1,5 @@
<?php
namespace Psalm\Plugin;
interface PluginInterface

View File

@ -1,4 +1,5 @@
<?php
namespace Psalm;
use LogicException;
@ -54,7 +55,7 @@ class PluginFileExtensionsSocket implements FileExtensionsInterface
$className,
FileScanner::class
),
1622727271
1_622_727_271
);
}
if (!empty($this->config->getFiletypeScanners()[$fileExtension])
@ -62,7 +63,7 @@ class PluginFileExtensionsSocket implements FileExtensionsInterface
) {
throw new LogicException(
sprintf('Cannot redeclare scanner for file-type %s', $fileExtension),
1622727272
1_622_727_272
);
}
$this->additionalFileTypeScanners[$fileExtension] = $className;
@ -90,7 +91,7 @@ class PluginFileExtensionsSocket implements FileExtensionsInterface
$className,
FileAnalyzer::class
),
1622727281
1_622_727_281
);
}
if (!empty($this->config->getFiletypeAnalyzers()[$fileExtension])
@ -98,7 +99,7 @@ class PluginFileExtensionsSocket implements FileExtensionsInterface
) {
throw new LogicException(
sprintf('Cannot redeclare analyzer for file-type %s', $fileExtension),
1622727282
1_622_727_282
);
}
$this->additionalFileTypeAnalyzers[$fileExtension] = $className;