Re: [PEAR-DEV] Text_Password static or non-static?

[email protected] (Christian Weiske) Sat, 30 Jan 2016 23:30:59 +0100
Newsgroups php.pear.dev
Message-ID <20160130233059.387846d5@bogo>
--Sig_/LM1AmYBLh7zap9eRT95JuYk
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hello Michael,


> I'm making a PR to update the Text_Password package to explicitly
> state static methods so it works properly in PHP 7. While updating, I
> noticed the documentation and internal code seems to be written
> assuming the API is entirely static but the unit tests are written
> assuming the API uses class instances.
>=20
> For example, the docs say to use:
>=20
> Text_Password::create();
>=20
> but the unit tests use:
>=20
> $subject =3D new Text_Password();
> $subject->create();
>=20
> My question to the list is does anyone besides the unit tests use the=20
> non-static API for Text_Password?

If $this is not used within Text_Password it's ok to make the methods
static.

--=20
Regards/Mit freundlichen Gr=C3=BC=C3=9Fen
Christian Weiske

-=3D=E2=89=A1 Geeking around in the name of science since 1982 =E2=89=A1=3D-

--Sig_/LM1AmYBLh7zap9eRT95JuYk
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlatOaMACgkQFMhaCCTq+CNWiwCcCB+WpZQdQmdNt6nHJ61B9iVs
6eAAn12B/tXG1kh66ep5wCRWEmG1bYM/
=tcIx
-----END PGP SIGNATURE-----

--Sig_/LM1AmYBLh7zap9eRT95JuYk--