original_string: public function getAll(): iterable
      {
          if ($this->permissions === null) {
  
              /** @var array $list */
              $list = app()->getCollector()->collect('permissions')->get();
  
              $key = 0;
              $names = [];
              $permissions = [];
  
              foreach ($list as $name => $description) {
                  $permissions[] = new Permission($name, $description);
                  $names[$name] = $key;
                  $key++;
              }
  
              $this->permissions = $permissions;
              $this->names = $names;
          }
  
          return $this->permissions;
      }
code: public function getAll(): iterable
      {
          if ($this->permissions === null) {
  
              /** @var array $list */
              $list = app()->getCollector()->collect('permissions')->get();
  
              $key = 0;
              $names = [];
              $permissions = [];
  
              foreach ($list as $name => $description) {
                  $permissions[] = new Permission($name, $description);
                  $names[$name] = $key;
                  $key++;
              }
  
              $this->permissions = $permissions;
              $this->names = $names;
          }
  
          return $this->permissions;
      }
code_tokens: public function getAll ( ) : iterable { if ( $ this -> permissions === null ) { /** @var array $list */ $ list = app ( ) -> getCollector ( ) -> collect ( 'permissions' ) -> get ( ) ; $ key = 0 ; $ names = [ ] ; $ permissions = [ ] ; foreach ( $ list as $ name => $ description ) { $ permissions [ ] = new Permission ( $ name , $ description ) ; $ names [ $ name ] = $ key ; $ key ++ ; } $ this -> permissions = $ permissions ; $ this -> names = $ names ; } return $ this -> permissions ; }
docstring: Get all permissions
  
  @return iterable|IPermission[]
docstring_tokens: Get all permissions