Skip to content

Commit

Permalink
Apply code styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ohader committed Jan 30, 2022
1 parent 62a0ece commit 3fedb5c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/Psalm/Config.php
Expand Up @@ -1395,7 +1395,7 @@ public function processPluginFileExtensions(ProjectAnalyzer $projectAnalyzer): v
} catch (Throwable $t) {
throw new ConfigException(
'Failed to process plugin file extensions ' . $pluginClassName,
1635800581,
1_635_800_581,
$t
);
}
Expand Down Expand Up @@ -1438,7 +1438,7 @@ public function initializePlugins(ProjectAnalyzer $project_analyzer): void
} catch (Throwable $t) {
throw new ConfigException(
'Failed to invoke plugin ' . $plugin_class_name,
1635800582,
1_635_800_582,
$t
);
}
Expand Down Expand Up @@ -1505,11 +1505,11 @@ private function loadPlugin(ProjectAnalyzer $projectAnalyzer, string $pluginClas
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);
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Plugin/FileExtensionsInterface.php
@@ -1,4 +1,5 @@
<?php

namespace Psalm\Plugin;

use Psalm\Internal\Analyzer\FileAnalyzer;
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Plugin/PluginFileExtensionsInterface.php
@@ -1,4 +1,5 @@
<?php

namespace Psalm\Plugin;

use SimpleXMLElement;
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Plugin/PluginInterface.php
@@ -1,4 +1,5 @@
<?php

namespace Psalm\Plugin;

interface PluginInterface
Expand Down
9 changes: 5 additions & 4 deletions src/Psalm/PluginFileExtensionsSocket.php
@@ -1,4 +1,5 @@
<?php

namespace Psalm;

use LogicException;
Expand Down Expand Up @@ -54,15 +55,15 @@ public function addFileTypeScanner(string $fileExtension, string $className): vo
$className,
FileScanner::class
),
1622727271
1_622_727_271
);
}
if (!empty($this->config->getFiletypeScanners()[$fileExtension])
|| !empty($this->additionalFileTypeScanners[$fileExtension])
) {
throw new LogicException(
sprintf('Cannot redeclare scanner for file-type %s', $fileExtension),
1622727272
1_622_727_272
);
}
$this->additionalFileTypeScanners[$fileExtension] = $className;
Expand Down Expand Up @@ -90,15 +91,15 @@ public function addFileTypeAnalyzer(string $fileExtension, string $className): v
$className,
FileAnalyzer::class
),
1622727281
1_622_727_281
);
}
if (!empty($this->config->getFiletypeAnalyzers()[$fileExtension])
|| !empty($this->additionalFileTypeAnalyzers[$fileExtension])
) {
throw new LogicException(
sprintf('Cannot redeclare analyzer for file-type %s', $fileExtension),
1622727282
1_622_727_282
);
}
$this->additionalFileTypeAnalyzers[$fileExtension] = $className;
Expand Down

0 comments on commit 3fedb5c

Please sign in to comment.