Skip to content

Commit

Permalink
Merge pull request #69 from clickbar/fix-type-annotations-ide-helper
Browse files Browse the repository at this point in the history
fix(docblocks): Mitigate issue in ide-helper docblock parsing
  • Loading branch information
ahawlitschek authored Jan 19, 2024
2 parents aef9291 + f400f5d commit 04c91a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `as` parameter for `stFrom` function

### Fixed
- Fixed builder macro docblocks to use FQDN for an issue within laravel-ide-helper
- Fixed `ST_PROJECT` function not being migrated to the GeometryType enum.

## [1.4.0](https://github.com/clickbar/laravel-magellan/tree/1.4.0) - 2023-07-02
Expand Down
18 changes: 14 additions & 4 deletions src/Database/Builder/BuilderMacros.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?php

/**
* Disabled for now, to mitigate issues with the Laravel IDE Helper Generator.
* PLEASE keep parameter annotations in here with their fully qualified class names, so that the IDE Helper Generator
* can pick them up properly.
* See https://github.com/barryvdh/laravel-ide-helper/pull/953
*
* @noinspection PhpFullyQualifiedNameUsageInspection
* @noinspection PhpUnnecessaryFullyQualifiedNameInspection
*/

namespace Clickbar\Magellan\Database\Builder;

use Clickbar\Magellan\Cast\BBoxCast;
Expand Down Expand Up @@ -54,7 +64,7 @@ public function stOrderBy()
{
/**
* @param \Clickbar\Magellan\Database\MagellanExpressions\MagellanNumericExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanBooleanExpression $magellanExpression
* @param string|null $direction
* @param string $direction
* @return static
*/
return function (MagellanNumericExpression|MagellanBooleanExpression $magellanExpression, string $direction = 'ASC') {
Expand All @@ -65,7 +75,7 @@ public function stOrderBy()
public function stWhere()
{
/**
* @param \Clickbar\Magellan\Database\MagellanExpressions\MagellanStringExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanBooleanExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanBBoxExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanNumericExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanGeometryExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanGeometryOrBboxExpression|Geometry|Box2D|Box3D|string $column
* @param \Clickbar\Magellan\Database\MagellanExpressions\MagellanStringExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanBooleanExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanBBoxExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanNumericExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanGeometryExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanGeometryOrBboxExpression|\Clickbar\Magellan\Data\Geometries\Geometry|\Clickbar\Magellan\Data\Boxes\Box2D|\Clickbar\Magellan\Data\Boxes\Box3D|string $column
* @param mixed $operator
* @param mixed $value
* @param string|null $boolean
Expand All @@ -83,7 +93,7 @@ public function stWhere()
public function stOrWhere()
{
/**
* @param \Clickbar\Magellan\Database\MagellanExpressions\MagellanStringExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanBooleanExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanBBoxExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanNumericExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanGeometryExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanGeometryOrBboxExpression|Geometry|Box2D|Box3D|string $column
* @param \Clickbar\Magellan\Database\MagellanExpressions\MagellanStringExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanBooleanExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanBBoxExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanNumericExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanGeometryExpression|\Clickbar\Magellan\Database\MagellanExpressions\MagellanGeometryOrBboxExpression|\Clickbar\Magellan\Data\Geometries\Geometry|\Clickbar\Magellan\Data\Boxes\Box2D|\Clickbar\Magellan\Data\Boxes\Box3D|string $column
* @param mixed $operator
* @param mixed $value
* @return static
Expand All @@ -100,7 +110,7 @@ public function stOrWhere()
public function stGroupBy()
{
/**
* @param array|string|MagellanBaseExpression ...$groups
* @param array|string|\Clickbar\Magellan\Database\MagellanExpressions\MagellanBaseExpression ...$groups
* @return static
*/
return function (...$groups) {
Expand Down

0 comments on commit 04c91a6

Please sign in to comment.