[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern

WordPress Trac noreply at wordpress.org
Thu Sep 1 04:38:46 UTC 2016


#37699: Death to Globals Episode #1: A Registry, A Pattern
----------------------------+------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  4.7
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------

Comment (by wonderboymusic):

 Typing happens on the property.

 {{{#!php
 <?php
 class Buritto {
     /**
      * @var wpdb
      */
     protected $db;

     public function __construct() {
         $this->db = whatever();
     }
 }
 }}}

 Any content store is going to return `mixed`:
 {{{#!php
 <?php
 $foo = wp_cache_get( 'object' );
 $foo = wp_cache_get( 'string' );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37699#comment:64>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list