mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-12 11:11:31 +00:00
Import latest app updates from streamline
An updated set of source files and initialization was provided by streamline to address issues observed during initial testing. These files have been updated in order to generate a new set of app images.
This commit is contained in:
-28
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon\MessageFormatter;
|
||||
|
||||
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
|
||||
|
||||
if (!class_exists(LazyMessageFormatter::class, false)) {
|
||||
abstract class LazyMessageFormatter implements MessageFormatterInterface
|
||||
{
|
||||
public function format(string $message, string $locale, array $parameters = []): string
|
||||
{
|
||||
return $this->formatter->format(
|
||||
$message,
|
||||
$this->transformLocale($locale),
|
||||
$parameters
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon\MessageFormatter;
|
||||
|
||||
use Symfony\Component\Translation\Formatter\ChoiceMessageFormatterInterface;
|
||||
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
|
||||
|
||||
if (!class_exists(LazyMessageFormatter::class, false)) {
|
||||
abstract class LazyMessageFormatter implements MessageFormatterInterface, ChoiceMessageFormatterInterface
|
||||
{
|
||||
abstract protected function transformLocale(?string $locale): ?string;
|
||||
|
||||
public function format($message, $locale, array $parameters = [])
|
||||
{
|
||||
return $this->formatter->format(
|
||||
$message,
|
||||
$this->transformLocale($locale),
|
||||
$parameters
|
||||
);
|
||||
}
|
||||
|
||||
public function choiceFormat($message, $number, $locale, array $parameters = [])
|
||||
{
|
||||
return $this->formatter->choiceFormat($message, $number, $locale, $parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon\PHPStan;
|
||||
|
||||
use PHPStan\BetterReflection\Reflection;
|
||||
use ReflectionMethod;
|
||||
|
||||
if (!class_exists(AbstractReflectionMacro::class, false)) {
|
||||
abstract class AbstractReflectionMacro extends AbstractMacro
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getReflection(): ?ReflectionMethod
|
||||
{
|
||||
if ($this->reflectionFunction instanceof Reflection\ReflectionMethod) {
|
||||
return new Reflection\Adapter\ReflectionMethod($this->reflectionFunction);
|
||||
}
|
||||
|
||||
return $this->reflectionFunction instanceof ReflectionMethod
|
||||
? $this->reflectionFunction
|
||||
: null;
|
||||
}
|
||||
}
|
||||
}
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon\PHPStan;
|
||||
|
||||
use PHPStan\BetterReflection\Reflection;
|
||||
use ReflectionMethod;
|
||||
|
||||
if (!class_exists(AbstractReflectionMacro::class, false)) {
|
||||
abstract class AbstractReflectionMacro extends AbstractMacro
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getReflection(): ?Reflection\Adapter\ReflectionMethod
|
||||
{
|
||||
if ($this->reflectionFunction instanceof Reflection\Adapter\ReflectionMethod) {
|
||||
return $this->reflectionFunction;
|
||||
}
|
||||
|
||||
if ($this->reflectionFunction instanceof Reflection\ReflectionMethod) {
|
||||
return new Reflection\Adapter\ReflectionMethod($this->reflectionFunction);
|
||||
}
|
||||
|
||||
return $this->reflectionFunction instanceof ReflectionMethod
|
||||
? new Reflection\Adapter\ReflectionMethod(
|
||||
Reflection\ReflectionMethod::createFromName(
|
||||
$this->reflectionFunction->getDeclaringClass()->getName(),
|
||||
$this->reflectionFunction->getName()
|
||||
)
|
||||
)
|
||||
: null;
|
||||
}
|
||||
}
|
||||
}
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon\PHPStan;
|
||||
|
||||
if (!class_exists(LazyMacro::class, false)) {
|
||||
abstract class LazyMacro extends AbstractReflectionMacro
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getFileName(): ?string
|
||||
{
|
||||
$file = $this->reflectionFunction->getFileName();
|
||||
|
||||
return (($file ? realpath($file) : null) ?: $file) ?: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getStartLine(): ?int
|
||||
{
|
||||
return $this->reflectionFunction->getStartLine();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getEndLine(): ?int
|
||||
{
|
||||
return $this->reflectionFunction->getEndLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon\PHPStan;
|
||||
|
||||
if (!class_exists(LazyMacro::class, false)) {
|
||||
abstract class LazyMacro extends AbstractReflectionMacro
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return string|false
|
||||
*/
|
||||
public function getFileName()
|
||||
{
|
||||
$file = $this->reflectionFunction->getFileName();
|
||||
|
||||
return (($file ? realpath($file) : null) ?: $file) ?: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return int|false
|
||||
*/
|
||||
public function getStartLine()
|
||||
{
|
||||
return $this->reflectionFunction->getStartLine();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return int|false
|
||||
*/
|
||||
public function getEndLine()
|
||||
{
|
||||
return $this->reflectionFunction->getEndLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
-52
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon;
|
||||
|
||||
use Symfony\Component\Translation\MessageCatalogueInterface;
|
||||
|
||||
if (!class_exists(LazyTranslator::class, false)) {
|
||||
class LazyTranslator extends AbstractTranslator implements TranslatorStrongTypeInterface
|
||||
{
|
||||
public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
|
||||
{
|
||||
return $this->translate($id, $parameters, $domain, $locale);
|
||||
}
|
||||
|
||||
public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages')
|
||||
{
|
||||
$messages = $this->getPrivateProperty($catalogue, 'messages');
|
||||
|
||||
if (isset($messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id])) {
|
||||
return $messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id];
|
||||
}
|
||||
|
||||
if (isset($messages[$domain][$id])) {
|
||||
return $messages[$domain][$id];
|
||||
}
|
||||
|
||||
$fallbackCatalogue = $this->getPrivateProperty($catalogue, 'fallbackCatalogue');
|
||||
|
||||
if ($fallbackCatalogue !== null) {
|
||||
return $this->getFromCatalogue($fallbackCatalogue, $id, $domain);
|
||||
}
|
||||
|
||||
return $id;
|
||||
}
|
||||
|
||||
private function getPrivateProperty($instance, string $field)
|
||||
{
|
||||
return (function (string $field) {
|
||||
return $this->$field;
|
||||
})->call($instance, $field);
|
||||
}
|
||||
}
|
||||
}
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Carbon;
|
||||
|
||||
if (!class_exists(LazyTranslator::class, false)) {
|
||||
class LazyTranslator extends AbstractTranslator
|
||||
{
|
||||
/**
|
||||
* Returns the translation.
|
||||
*
|
||||
* @param string|null $id
|
||||
* @param array $parameters
|
||||
* @param string|null $domain
|
||||
* @param string|null $locale
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function trans($id, array $parameters = [], $domain = null, $locale = null)
|
||||
{
|
||||
return $this->translate($id, $parameters, $domain, $locale);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user