Skip to content

Commit

Permalink
update php version
Browse files Browse the repository at this point in the history
  • Loading branch information
famoser committed Apr 30, 2020
1 parent c20b20d commit 7d8d85a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
matrix:
fast_finish: true
include:
- php: 7.2
- php: 7.4
env:
- COVERAGE=true
- php: nightly
Expand Down
8 changes: 4 additions & 4 deletions src/Enum/Base/BaseEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private static function camelCaseToTranslation($camelCase)
private function getPossibleValuesInternal()
{
try {
$reflection = new ReflectionClass(\get_class($this));
$reflection = new ReflectionClass(static::class);

return array_values($reflection->getConstants());
} catch (\ReflectionException $e) {
Expand All @@ -106,7 +106,7 @@ private function getChoicesForBuilderInternal()
{
try {
$res = [];
$reflection = new ReflectionClass(\get_class($this));
$reflection = new ReflectionClass(static::class);
$choices = $reflection->getConstants();

foreach ($choices as $name => $value) {
Expand All @@ -131,7 +131,7 @@ private function getChoicesForBuilderInternal()
private function getTranslationInternal($enumValue, TranslatorInterface $translator)
{
try {
$reflection = new ReflectionClass(\get_class($this));
$reflection = new ReflectionClass(static::class);

return $translator->trans($this->getTextInternal($enumValue, $reflection), [], 'enum_'.$this->camelCaseToTranslation($reflection->getShortName()));
} catch (\ReflectionException $e) {
Expand All @@ -152,7 +152,7 @@ private function getTextInternal($enumValue, $reflection = null)
{
try {
if (null === $reflection) {
$reflection = new ReflectionClass(\get_class($this));
$reflection = new ReflectionClass(static::class);
}

$choices = $reflection->getConstants();
Expand Down
1 change: 0 additions & 1 deletion src/EventGeneration/EventTarget.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use App\Entity\EventGenerationTargetClinic;
use App\Entity\EventGenerationTargetDoctor;
use App\Entity\Traits\EventGenerationTarget;
use App\Enum\EventType;

class EventTarget
{
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/TranslatableObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function getTranslationDomainForBuilder()
*/
public function getTranslationDomain()
{
$class = \get_class($this);
$class = static::class;

return $this->getTranslationDomainPrefix().'_'.NamingHelper::classToTranslationDomain($class);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Service/EventGenerationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ private function eventsToWarmupArray(array $events, array $eventTargets)
return $result;
}

/** @var EventTarget[] $eventTargetDoctorLookup */
/** @var EventTarget[] */
private $eventTargetDoctorLookup = null;
/** @var EventTarget[] $eventTargetClinicLookup */
/** @var EventTarget[] */
private $eventTargetClinicLookup = null;

/**
Expand Down

0 comments on commit 7d8d85a

Please sign in to comment.