Skip to content

Commit 710dab9

Browse files
authored
[TASK] Remove getColNo() (#1287)
Note that the removed tests are in `UnitDeprecated`. Equivalent tests already exist for the replacement `getColumnNumber()`. Part of #974
1 parent 1dec641 commit 710dab9

File tree

4 files changed

+1
-47
lines changed

4 files changed

+1
-47
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Please also have a look at our
8080

8181
### Removed
8282

83+
- Remove `Rule::getColNo()` (use `getColumnNumber()` instead) (#1287)
8384
- Passing a string as the first argument to `getAllValues()` is no longer
8485
supported and will not work;
8586
the search pattern should now be passed as the second argument (#1243)

src/Position/Position.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ public function getColumnNumber(): ?int
4747
return $this->columnNumber;
4848
}
4949

50-
/**
51-
* @return int<0, max>
52-
*/
53-
public function getColNo(): int
54-
{
55-
return $this->getColumnNumber() ?? 0;
56-
}
57-
5850
/**
5951
* @param int<0, max>|null $lineNumber
6052
* @param int<0, max>|null $columnNumber

src/Position/Positionable.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ public function getLineNo(): int;
2828
*/
2929
public function getColumnNumber(): ?int;
3030

31-
/**
32-
* @return int<0, max>
33-
*
34-
* @deprecated in version 8.9.0, will be removed in v9.0. Use `getColumnNumber()` instead.
35-
*/
36-
public function getColNo(): int;
37-
3831
/**
3932
* @param int<0, max>|null $lineNumber
4033
* Providing zero for this parameter is deprecated in version 8.9.0, and will not be supported from v9.0.

tests/UnitDeprecated/Position/PositionTest.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -77,38 +77,6 @@ public function getLineNoReturnsZeroAfterLineNumberCleared(): void
7777
self::assertSame(0, $this->subject->getLineNo());
7878
}
7979

80-
/**
81-
* @test
82-
*/
83-
public function getColNoInitiallyReturnsZero(): void
84-
{
85-
self::assertSame(0, $this->subject->getColNo());
86-
}
87-
88-
/**
89-
* @test
90-
*
91-
* @dataProvider provideColumnNumber
92-
*/
93-
public function getColNoReturnsColumnNumberSet(int $columnNumber): void
94-
{
95-
$this->subject->setPosition(1, $columnNumber);
96-
97-
self::assertSame($columnNumber, $this->subject->getColNo());
98-
}
99-
100-
/**
101-
* @test
102-
*/
103-
public function getColNoReturnsZeroAfterColumnNumberCleared(): void
104-
{
105-
$this->subject->setPosition(1, 99);
106-
107-
$this->subject->setPosition(2);
108-
109-
self::assertSame(0, $this->subject->getColNo());
110-
}
111-
11280
/**
11381
* @test
11482
*/

0 commit comments

Comments
 (0)