Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fonts.css 404 #99

Open
kkmuffme opened this issue May 29, 2023 · 1 comment
Open

fonts.css 404 #99

kkmuffme opened this issue May 29, 2023 · 1 comment

Comments

@kkmuffme
Copy link
Contributor

https://cloud.typography.com/751592/7707372/css/fonts.css 404 (Not Found)

on https://psalm.dev/r/3d33f66c11

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/3d33f66c11
<?php

class QueryDB {}

class Compatibility {}

class DI {
   const MAPPING = array(
		'query' => QueryDB::class,
       	'comp' => Compatibility::class,
   );
    
   /**
    * @template TMapping of DI::MAPPING
    * @template TKey of key-of<DI::MAPPING>
    *
    * @param TKey $arg
    * @return TMapping[TKey]
    */
   public function get( $arg ) {
       $v = self::MAPPING[ $arg ];
       /** @psalm-trace $v */;
       return $v;
   }
}

$d = new DI();
$r = $d->get( 'comp' );
$c = new $r();
/** @psalm-trace $c */;
Psalm output (using commit 106b986):

INFO: MixedAssignment - 28:1 - Unable to determine the type that $r is being assigned to

INFO: MixedMethodCall - 29:6 - Cannot call constructor on an unknown class

INFO: Trace - 30:23 - $c: object

INFO: UnusedVariable - 29:1 - $c is never referenced or the value is not used

INFO: Trace - 22:30 - $v: Compatibility::class|QueryDB::class

ERROR: InvalidReturnStatement - 23:15 - The inferred type 'Compatibility::class|QueryDB::class' does not match the declared return type 'TMapping[TKey]' for DI::get

ERROR: InvalidReturnType - 18:15 - The declared return type 'TMapping[TKey]' for DI::get is incorrect, got 'Compatibility::class|QueryDB::class'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant