I understand how chaining methods works, I also understand how chaining a property as the last item in the chain works, like this example
$tank = $bmw -> fill(10) -> ride(40) -> tank;
but what about chaining a property in between two methods, how does that work? is the property secretly a method? here is an example
expect(2,2)->not->toBeGreaterThan(3)
I am learning php in the context of laravel so if this is a laravel only thing let me know.
I’ve done my due diligence and looked this up several times but I couldn’t find the answer I am looking for.