PHP code example of pyro / ide-helper

1. Go to this page and download the library: Download pyro/ide-helper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pyro / ide-helper example snippets


    \Pyro\IdeHelper\IdeHelperServiceProvider::class;
    

// this will make auth()->user()->hasPermission() etc resolve properly, check screenshot below
class MyDocBlocks {
    public function handle(\Laradic\Generators\Doc\DocRegistry $registry){
        $registry->getClass(\Illuminate\Contracts\Auth\Guard::class)
            ->getMethod('user')
            ->ensureReturn([\Illuminate\Contracts\Auth\Authenticatable::class, \Anomaly\UsersModule\User\Contract\UserInterface::class]);
    }
}

/**
 * Class LinkCollection
 *
 * @link http://pyrocms.com/
 * @author PyroCMS, Inc. <[email protected]>
 * @author Ryan Thompson <[email protected]>
 * @method \Pyro\MenusModule\Link\Contract\LinkInterface[] all()
 * @method \Pyro\MenusModule\Link\Contract\LinkInterface find($key, $default=null)
 * @method \Pyro\MenusModule\Link\Contract\LinkInterface findBy($key, $value)
 * @method \Pyro\MenusModule\Link\Contract\LinkInterface first()
 * @method \Pyro\MenusModule\Link\Contract\LinkInterface[] get($key, $default=null)
 * etc...
 */
class LinkCollection extends EntryCollection{}

/**
 * Class LinkRepository
 *
 * @link http://pyrocms.com/
 * @author PyroCMS, Inc. <[email protected]>
 * @author Ryan Thompson <[email protected]>
 * @method \Pyro\MenusModule\Link\Contract\LinkInterface first($direction = 'asc')
 * @method \Pyro\MenusModule\Link\Contract\LinkInterface find($id)
 * @method \Pyro\MenusModule\Link\Contract\LinkInterface findBy($key, $value)
 * @method \Pyro\MenusModule\Link\LinkCollection|\Pyro\MenusModule\Link\Contract\LinkInterface[] findAllBy($key, $value)
 * @method \Pyro\MenusModule\Link\LinkCollection|\Pyro\MenusModule\Link\Contract\LinkInterface[] findAll(array $ids)
 * @method \Pyro\MenusModule\Link\Contract\LinkInterface create(array $attributes)
 * @method \Pyro\MenusModule\Link\Contract\LinkInterface getModel()
 * @method \Pyro\MenusModule\Link\Contract\LinkInterface newInstance(array $attributes = [])
 * etc...         
 */
class LinkRepository extends EntryRepository implements LinkRepositoryInterface{}

/** @mixin \Pyro\MenusModule\Link\LinkRepository */
interface LinkRepositoryInterface {}

/** @mixin \Pyro\MenusModule\Link\LinkModel */
class LinkPresenter extends EntryPresenter{}

/** @mixin \Pyro\MenusModule\Link\LinkModel */
interface LinkInterface {}

/** @mixin \Pyro\MenusModule\Link\LinkModel */
class LinkPresenter extends EntryPresenter{}
json
   {
       "scripts": {
            "ide": [
                "@php artisan ide-helper:generate",
                "@php artisan ide-helper:streams",
                "@php artisan ide-helper:meta",
                "@php artisan idea:completion",
                "@php artisan idea:meta",
                "@php artisan idea:toolbox"
            ]
       }
   }