20220717
This commit is contained in:
31
vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php
vendored
Normal file
31
vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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 ReflectionMethod;
|
||||
|
||||
if (!class_exists(AbstractReflectionMacro::class, false)) {
|
||||
abstract class AbstractReflectionMacro extends AbstractMacro
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getReflection(): ?ReflectionMethod
|
||||
{
|
||||
return $this->reflectionFunction instanceof ReflectionMethod
|
||||
? $this->reflectionFunction
|
||||
: null;
|
||||
}
|
||||
}
|
||||
}
|
41
vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php
vendored
Normal file
41
vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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;
|
||||
}
|
||||
|
||||
return $this->reflectionFunction instanceof ReflectionMethod
|
||||
? new Reflection\Adapter\ReflectionMethod(
|
||||
Reflection\ReflectionMethod::createFromName(
|
||||
$this->reflectionFunction->getDeclaringClass()->getName(),
|
||||
$this->reflectionFunction->getName()
|
||||
)
|
||||
)
|
||||
: null;
|
||||
}
|
||||
}
|
||||
}
|
43
vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php
vendored
Normal file
43
vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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
|
||||
{
|
||||
return $this->reflectionFunction->getFileName();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getStartLine(): ?int
|
||||
{
|
||||
return $this->reflectionFunction->getStartLine();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getEndLine(): ?int
|
||||
{
|
||||
return $this->reflectionFunction->getEndLine();
|
||||
}
|
||||
}
|
||||
}
|
49
vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php
vendored
Normal file
49
vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<?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()
|
||||
{
|
||||
return $this->reflectionFunction->getFileName();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return int|false
|
||||
*/
|
||||
public function getStartLine()
|
||||
{
|
||||
return $this->reflectionFunction->getStartLine();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return int|false
|
||||
*/
|
||||
public function getEndLine()
|
||||
{
|
||||
return $this->reflectionFunction->getEndLine();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user