mirror of
https://github.com/danog/psalm.git
synced 2025-01-10 15:09:04 +01:00
Daniil Gentili
d0be59e16e
* Immutable CodeLocation * Remove excess clones * Remove external clones * Remove leftover clones * Fix final clone issue * Immutable storages * Refactoring * Fixes * Fixes * Fix * Fix * Fixes * Simplify * Fixes * Fix * Fixes * Update * Fix * Cache global types * Fix * Update * Update * Fixes * Fixes * Refactor * Fixes * Fix * Fix * More caching * Fix * Fix * Update * Update * Fix * Fixes * Update * Refactor * Update * Fixes * Break one more test * Fix * FIx * Fix * Fix * Fix * Fix * Improve performance and readability * Equivalent logic * Fixes * Revert * Revert "Revert" This reverts commit f9175100c8452c80559234200663fd4c4f4dd889. * Fix * Fix reference bug * Make default TypeVisitor immutable * Bugfix * Remove clones * Partial refactoring * Refactoring * Fixes * Fix * Fixes * Fixes * cs-fix * Fix final bugs * Add test * Misc fixes * Update * Fixes * Experiment with removing different property * revert "Experiment with removing different property" This reverts commit ac1156e077fc4ea633530d51096d27b6e88bfdf9. * Uniform naming * Uniform naming * Hack hotfix * Clean up $_FILES ref #8621 * Undo hack, try fixing properly * Helper method * Remove redundant call * Partially fix bugs * Cleanup * Change defaults * Fix bug * Fix (?, hope this doesn't break anything else) * cs-fix * Review fixes * Bugfix * Bugfix * Improve logic * Update
45 lines
874 B
PHP
45 lines
874 B
PHP
<?php
|
|
|
|
namespace Psalm\Storage;
|
|
|
|
use Psalm\CodeLocation;
|
|
use Psalm\Internal\Scanner\UnresolvedConstantComponent;
|
|
use Psalm\Type\Union;
|
|
|
|
/**
|
|
* @psalm-immutable
|
|
*/
|
|
final class AttributeArg
|
|
{
|
|
use ImmutableNonCloneableTrait;
|
|
/**
|
|
* @var ?string
|
|
* @psalm-suppress PossiblyUnusedProperty It's part of the public API for now
|
|
*/
|
|
public $name;
|
|
|
|
/**
|
|
* @var Union|UnresolvedConstantComponent
|
|
*/
|
|
public $type;
|
|
|
|
/**
|
|
* @var CodeLocation
|
|
* @psalm-suppress PossiblyUnusedProperty It's part of the public API for now
|
|
*/
|
|
public $location;
|
|
|
|
/**
|
|
* @param Union|UnresolvedConstantComponent $type
|
|
*/
|
|
public function __construct(
|
|
?string $name,
|
|
$type,
|
|
CodeLocation $location
|
|
) {
|
|
$this->name = $name;
|
|
$this->type = $type;
|
|
$this->location = $location;
|
|
}
|
|
}
|