Advertisement
Guest User

Untitled

a guest
Jan 29th, 2021
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. <?php
  2.  
  3. namespace PHPSTORM_META {
  4.  
  5.     use App\Manufacturer\Entity\Manufacturer;
  6.     use App\Part\Entity\Part;
  7.     use App\Shared\Doctrine\Registry;
  8.  
  9.     override(Registry::get(), map(0, [
  10.         '' => '@',
  11.     ]));
  12.  
  13.     /** @var Registry $registry */
  14.     $registry = null;
  15.  
  16.     $part = $registry->get(Part::class, null);
  17.  
  18.     $registry->get(Manufacturer::class, $part->manufacturerId)-> // autocomplete ok
  19.        
  20.     if ($part instanceof Part) {
  21.         $registry->get(Manufacturer::class, $part->manufacturerId)-> // autocomplete empty
  22.     }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement