-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# | ||
# Roadiz | ||
# | ||
/pimple.json | ||
|
||
# Ignore Google webmaster tool verification | ||
/google*.html | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
parameters: | ||
level: 7 | ||
level: max | ||
paths: | ||
- src | ||
excludePaths: | ||
- */node_modules/* | ||
- */bower_components/* | ||
- */static/* | ||
ignoreErrors: | ||
- identifier: missingType.iterableValue | ||
- identifier: missingType.generics | ||
- '#unknown class Parsedown(Extra)?#' | ||
- '#Instantiated class Memcached not found#' | ||
- '#Instantiated class Redis not found#' | ||
reportUnmatchedIgnoredErrors: false | ||
checkGenericClassInNonGenericObjectType: false | ||
checkMissingIterableValueType: false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace RZ\Roadiz\Core\AbstractEntities; | ||
|
||
use ApiPlatform\Doctrine\Orm\Filter\NumericFilter; | ||
use ApiPlatform\Metadata\ApiFilter; | ||
use Doctrine\Common\Comparable; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use JMS\Serializer\Annotation as Serializer; | ||
use Symfony\Component\Serializer\Annotation as SymfonySerializer; | ||
use ApiPlatform\Doctrine\Orm\Filter\RangeFilter; | ||
|
||
/** | ||
* Combined AbstractDateTimed and PositionedTrait. | ||
*/ | ||
#[ | ||
ORM\MappedSuperclass, | ||
ORM\HasLifecycleCallbacks, | ||
ORM\Table, | ||
ORM\Index(columns: ["position"]), | ||
ORM\Index(columns: ["created_at"]), | ||
ORM\Index(columns: ["updated_at"]) | ||
] | ||
abstract class AbstractDateTimedPositioned extends AbstractDateTimed implements PositionedInterface, Comparable | ||
{ | ||
use PositionedTrait; | ||
|
||
#[ | ||
ORM\Column(type: "float"), | ||
Serializer\Groups(["position"]), | ||
Serializer\Type("float"), | ||
SymfonySerializer\Groups(["position"]), | ||
ApiFilter(RangeFilter::class), | ||
Check failure on line 35 in src/Core/AbstractEntities/AbstractDateTimedPositioned.php GitHub Actions / run-tests (8.1)
Check failure on line 35 in src/Core/AbstractEntities/AbstractDateTimedPositioned.php GitHub Actions / run-tests (8.1)
Check failure on line 35 in src/Core/AbstractEntities/AbstractDateTimedPositioned.php GitHub Actions / run-tests (8.2)
Check failure on line 35 in src/Core/AbstractEntities/AbstractDateTimedPositioned.php GitHub Actions / run-tests (8.2)
Check failure on line 35 in src/Core/AbstractEntities/AbstractDateTimedPositioned.php GitHub Actions / run-tests (8.3)
|
||
ApiFilter(NumericFilter::class) | ||
Check failure on line 36 in src/Core/AbstractEntities/AbstractDateTimedPositioned.php GitHub Actions / run-tests (8.1)
Check failure on line 36 in src/Core/AbstractEntities/AbstractDateTimedPositioned.php GitHub Actions / run-tests (8.1)
Check failure on line 36 in src/Core/AbstractEntities/AbstractDateTimedPositioned.php GitHub Actions / run-tests (8.2)
Check failure on line 36 in src/Core/AbstractEntities/AbstractDateTimedPositioned.php GitHub Actions / run-tests (8.2)
Check failure on line 36 in src/Core/AbstractEntities/AbstractDateTimedPositioned.php GitHub Actions / run-tests (8.3)
|
||
] | ||
protected float $position = 0.0; | ||
} |