Protected member variable declared as array, used as object?

7 views
Skip to first unread message

Chris Johnson

unread,
Mar 25, 2015, 7:06:51 PM3/25/15
to aur...@googlegroups.com
Is the declaration of protected member variables which hold dependency-injected objects as arrays  intentional for some reason, or just a harmless oversight?  E.g. in Aura\Cli\Help:

    protected $option_factory = array();
...
    public function __construct(OptionFactory $option_factory)
    {
        $this->option_factory = $option_factory;

Paul M. Jones

unread,
Mar 25, 2015, 7:58:30 PM3/25/15
to aur...@googlegroups.com
Likely an oversight. Send a PR and get credit for it!


--
Paul M. Jones
pmjo...@gmail.com
http://paul-m-jones.com

Modernizing Legacy Applications in PHP
https://leanpub.com/mlaphp

Solving the N+1 Problem in PHP
https://leanpub.com/sn1php



Reply all
Reply to author
Forward
0 new messages