Re: Pipe Operator v2

From: Date: Thu, 21 Jul 2016 04:29:18 +0000
Subject: Re: Pipe Operator v2
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-94604@lists.php.net to get a copy of this message
> On Thu, Jul 21, 2016 at 9:05 AM, Thomas Bley <mails@thomasbley.de> wrote: > to me this code is perfectly readable and static code analysis is only complaining about > missing semicolons at the end of the lines and short variable names: > > $x = loadConfig(); > $x = buildDic($x); > $x = getApp($x) > $x = getRouter($x) > $x = getDispatcher($x, $request) > $x = dispatchBusinessLogic($x, $request, new Response()) > $x = renderResponse($x) > $x = buildPsr7Response($x) > $response =emit($x); > A proper static analyzer would also not that $x is continuously changing types, another heave code smell. > I'm not sure if there is a ORM or database library out there which constructs > SQL queries with non-oop calls, maybe you can give a real-world example. > The third example in the RFC (FBShipIt) shows this exact operator in a real-world usage in "php-like" code. -Sara

« previous php.internals (#94604) next »