Skip to content

Commit 368d8af

Browse files
tontonsbgithub-actions[bot]
authored andcommitted
Apply CS fixes
1 parent bc7a659 commit 368d8af

File tree

13 files changed

+13
-36
lines changed

13 files changed

+13
-36
lines changed

Diff for: src/Exceptions/InvalidExpressionType.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@
22

33
namespace GlaivePro\SF\Exceptions;
44

5-
class InvalidExpressionType extends \DomainException
6-
{
7-
//
8-
}
5+
class InvalidExpressionType extends \DomainException {}

Diff for: src/Exceptions/MethodNotImplemented.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@
22

33
namespace GlaivePro\SF\Exceptions;
44

5-
class MethodNotImplemented extends \BadMethodCallException
6-
{
7-
//
8-
}
5+
class MethodNotImplemented extends \BadMethodCallException {}

Diff for: src/MariaDB/Point.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public function Z(): Expression
2020

2121
public function M(): Expression
2222
{
23-
throw new MethodNotImplemented();
23+
throw new MethodNotImplemented;
2424
}
2525
}

Diff for: src/MariaDB/Sfc.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected static function callFromMethod(string $method, array $args): Geometry
4040
*/
4141
public static function point(float $x, float $y, int $srid = null): Point
4242
{
43-
$point = Point::fromMethod('Point', $x, $y);
43+
$point = Point::fromMethod('Point', $x, $y);
4444

4545
if (\is_null($srid))
4646
return $point;
@@ -79,5 +79,4 @@ public static function bdMPolyFromText(string $multiLineStringTaggedText, int $S
7979
{
8080
throw new MethodNotImplemented;
8181
}
82-
8382
}

Diff for: src/MySQL/MultiSurface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ class MultiSurface extends GeometryCollection implements OGCMultiSurface
1414

1515
public function pointOnSurface(): \GlaivePro\SF\OGC\Contracts\Point
1616
{
17-
throw new MethodNotImplemented();
17+
throw new MethodNotImplemented;
1818
}
1919
}

Diff for: src/MySQL/Point.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public function Z(): Expression
2020

2121
public function M(): Expression
2222
{
23-
throw new MethodNotImplemented();
23+
throw new MethodNotImplemented;
2424
}
2525
}

Diff for: src/MySQL/Sfc.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected static function callFromMethod(string $method, array $args): Geometry
4040
*/
4141
public static function point(float $x, float $y, int $srid = null): Point
4242
{
43-
$point = Point::fromMethod('Point', $x, $y);
43+
$point = Point::fromMethod('Point', $x, $y);
4444

4545
if (\is_null($srid))
4646
return $point;
@@ -79,5 +79,4 @@ public static function bdMPolyFromText(string $multiLineStringTaggedText, int $S
7979
{
8080
throw new MethodNotImplemented;
8181
}
82-
8382
}

Diff for: src/OGC/Contracts/TIN.php

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace GlaivePro\SF\OGC\Contracts;
44

5-
use GlaivePro\SF\Expression;
6-
75
/**
86
* Defines geometry model according to
97
* 6.1.12 PolyhedralSurface

Diff for: tests/Integration/MariaDB/PDOTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
class PDOTest extends TestCase
1313
{
14-
protected \PDO $pdo;
14+
protected PDO $pdo;
1515

1616
protected function setUp(): void
1717
{
1818
parent::setUp();
1919

20-
$dsn = "mysql:host=127.0.0.1;port=3306;dbname=sfa;";
20+
$dsn = 'mysql:host=127.0.0.1;port=3306;dbname=sfa;';
2121

2222
$this->pdo = new PDO($dsn, 'sfa', 'sfa', options: [
2323
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,

Diff for: tests/Integration/MySQL/PDOTest.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
class PDOTest extends TestCase
1313
{
14-
protected \PDO $pdo;
14+
protected PDO $pdo;
1515

1616
protected function setUp(): void
1717
{
1818
parent::setUp();
1919

20-
$dsn = "mysql:host=127.0.0.1;port=3306;dbname=sfa;";
20+
$dsn = 'mysql:host=127.0.0.1;port=3306;dbname=sfa;';
2121

2222
$this->pdo = new PDO($dsn, 'sfa', 'sfa', [
2323
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
@@ -84,7 +84,6 @@ public function testComplexActions(): void
8484
));
8585
}
8686

87-
8887
protected function selectVal(Expression $expression)
8988
{
9089
$query = $this->pdo->prepare("SELECT $expression as value");

Diff for: tests/Integration/PostGIS/PDOTest.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
class PDOTest extends TestCase
1313
{
14-
protected \PDO $pdo;
14+
protected PDO $pdo;
1515

1616
protected function setUp(): void
1717
{
1818
parent::setUp();
1919

20-
$dsn = "pgsql:host=localhost;port=5432;dbname=sfa;";
20+
$dsn = 'pgsql:host=localhost;port=5432;dbname=sfa;';
2121

2222
$this->pdo = new PDO($dsn, 'sfa', 'sfa', [
2323
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
@@ -81,7 +81,6 @@ public function testComplexActions(): void
8181
));
8282
}
8383

84-
8584
protected function selectVal(Expression $expression)
8685
{
8786
$query = $this->pdo->prepare("SELECT $expression as value");

Diff for: tests/MariaDB/MethodTest.php

-10
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,9 @@
44

55
use GlaivePro\SF\Exceptions\MethodNotImplemented;
66
use PHPUnit\Framework\TestCase;
7-
use GlaivePro\SF\MariaDB\Curve;
87
use GlaivePro\SF\MariaDB\Geometry;
9-
use GlaivePro\SF\MariaDB\GeometryCollection;
10-
use GlaivePro\SF\MariaDB\Line;
11-
use GlaivePro\SF\MariaDB\LinearRing;
12-
use GlaivePro\SF\MariaDB\LineString;
13-
use GlaivePro\SF\MariaDB\MultiSurface;
148
use GlaivePro\SF\MariaDB\Point;
159
use GlaivePro\SF\MariaDB\Polygon;
16-
use GlaivePro\SF\MariaDB\PolyhedralSurface;
17-
use GlaivePro\SF\MariaDB\Surface;
18-
use GlaivePro\SF\MariaDB\TIN;
19-
use GlaivePro\SF\MariaDB\Triangle;
2010

2111
/**
2212
* Ensure that methods use the dialect-specific syntax.

Diff for: tests/MySQL/MethodTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,4 @@ public function testSurfacePointOnSurfaceNotImplemented(): void
123123
$curve = new Surface('surface');
124124
$curve->pointOnSurface();
125125
}
126-
127126
}

0 commit comments

Comments
 (0)