-
| Hi all We're interested in seeing if two rules exist:
Here's an example: protected function setup(): void { parent::setup(); /** @var MockInterface */ $this->mock = \Mockery::mock(BookingRepository::class); $this->app->instance(BookingRepository::class, $this->mock); $this->bookingA = new Booking([ 'StartDateTime' => '2021-07-19 09:00:00.000', 'EndDateTime' => '2021-07-19 13:00:00.000', 'PractitionerId' => '2209', 'SessionId' => '344' ]); $this->bookingB = new Booking([ 'StartDateTime' => '2021-07-22 09:00:00.000', 'EndDateTime' => '2021-07-22 09:45:00.000', 'PractitionerId' => null, 'SessionId' => '121' ]); }This would get flagged for rule 2. Whereas... protected function setup(): void { parent::setup(); /** @var MockInterface */ $this->mock = \Mockery::mock(BookingRepository::class); $this->app->instance(BookingRepository::class, $this->mock); $this->bookingA = new Booking([ 'StartDateTime' => '2021-07-19 09:00:00.000', 'EndDateTime' => '2021-07-19 13:00:00.000', 'PractitionerId' => '2209', 'SessionId' => '344' ]); $this->bookingB = new Booking([ 'StartDateTime' => '2021-07-22 09:00:00.000', 'EndDateTime' => '2021-07-22 09:45:00.000', 'PractitionerId' => null, 'SessionId' => '121' ]); }This would get flagged for rule 1. Any ideas what this would look like in terms of rulesets? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Answered by gsherwood Sep 29, 2021
Replies: 1 comment
-
| There are no included sniffs that do either of those things. Whitespace is generally excluded from standards (like in the case of the PSRs) and most others I've seen say something to the effect of "whitespace can be used to increase readability", so such as sniff as never been requested. I'd be very unlikely to include it in the core release and I can't see a broad requirement for it. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by dextermb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
There are no included sniffs that do either of those things. Whitespace is generally excluded from standards (like in the case of the PSRs) and most others I've seen say something to the effect of "whitespace can be used to increase readability", so such as sniff as never been requested. I'd be very unlikely to include it in the core release and I can't see a broad requirement for it.