wyri,
@wyri@haxim.us avatar

It is Monday, and I've already written my most ridiculous bit of code of this week. A #PHP method that "converts" a string or class-string into a class-string. By returning it and telling static analyzers it is now a class-string. Mainly because I got tired of putting @var class-string everywhere. And code is used to generate code, not run at service runtime.

jaapio,
@jaapio@phpc.social avatar

@wyri introduce a value object that implements stringable? To make it more explicit in your code?

wyri,
@wyri@haxim.us avatar

@jaapio Going to do that, plus add some extra methods that give it just the class name, and just the namespace that class is in. Because that is the usecase 80% of the time.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines