Skip to content

Commit fa7fad7

Browse files
committed
- Added YODA test cases
1 parent 859d69d commit fa7fad7

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
// @expectedPass
4+
5+
namespace flyeralarm\CodingGuidelines;
6+
7+
class IfThisIsTrueEqualsTrue
8+
{
9+
private $isTrue;
10+
11+
public function foo()
12+
{
13+
if ($this->isTrue == true) {
14+
}
15+
}
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
// @expectedError YODA is discouraged
4+
5+
namespace flyeralarm\CodingGuidelines;
6+
7+
class IfTrueEqualsThisIsTrue
8+
{
9+
private $isTrue;
10+
11+
public function foo()
12+
{
13+
if (true == $this->isTrue) {
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)