remove stubs directory, should not be here

This commit is contained in:
TomasVotruba 2021-05-13 18:23:06 +01:00
parent 07c8068e71
commit 8528472b31
63 changed files with 0 additions and 1147 deletions

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\ORM;
if (class_exists('Doctrine\ORM\EntityManager')) {
return;
}
class EntityManager
{
}

View File

@ -1,16 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\ORM;
use Doctrine\Common\Persistence\ObjectManager;
if (interface_exists('Doctrine\ORM\EntityManagerInterface')) {
return;
}
interface EntityManagerInterface extends ObjectManager
{
}

View File

@ -1,23 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\ORM;
if (class_exists('Doctrine\ORM\EntityRepository')) {
return;
}
// @see https://github.com/doctrine/orm/blob/2.8.x/lib/Doctrine/ORM/EntityRepository.php
class EntityRepository
{
/**
* @var EntityManagerInterface
*/
protected $_em;
public function createQueryBuilder(): QueryBuilder
{
return new QueryBuilder();
}
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\ORM;
if (class_exists('Doctrine\ORM\QueryBuilder')) {
return;
}
class QueryBuilder
{
}

View File

@ -1,29 +0,0 @@
<?php
namespace Carbon;
use DateInterval;
use DateTimeInterface;
use DateTimeZone;
if (class_exists('Carbon\Carbon')) {
return;
}
class Carbon extends \DateTime
{
public static function now(): self
{
return new self();
}
public static function today(): self
{
return new self();
}
public function subDays(int $days): self
{
return $this;
}
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\Common\Collections;
if (class_exists('Doctrine\Common\Collections\ArrayCollection')) {
return;
}
class ArrayCollection
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\Common\Collections;
if (interface_exists('Doctrine\Common\Collections\Collection')) {
return;
}
interface Collection
{
}

View File

@ -1,18 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\Common\Persistence;
use Doctrine\ORM\EntityManagerInterface;
if (class_exists('Doctrine\Common\Persistence\ManagerRegistry')) {
return;
}
final class ManagerRegistry
{
public function getManager(): ObjectManager
{
}
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\Common\Persistence;
if (interface_exists('Doctrine\Common\Persistence\ObjectManager')) {
return;
}
interface ObjectManager
{
public function getRepository(): \Doctrine\ORM\EntityRepository;
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\ORM;
if (class_exists('Doctrine\ORM\EntityManager')) {
return;
}
class EntityManager
{
}

View File

@ -1,16 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\ORM;
use Doctrine\Common\Persistence\ObjectManager;
if (interface_exists('Doctrine\ORM\EntityManagerInterface')) {
return;
}
interface EntityManagerInterface extends ObjectManager
{
}

View File

@ -1,23 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\ORM;
if (class_exists('Doctrine\ORM\EntityRepository')) {
return;
}
// @see https://github.com/doctrine/orm/blob/2.8.x/lib/Doctrine/ORM/EntityRepository.php
class EntityRepository
{
/**
* @var EntityManagerInterface
*/
protected $_em;
public function createQueryBuilder(): QueryBuilder
{
return new QueryBuilder();
}
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\ORM;
if (class_exists('Doctrine\ORM\QueryBuilder')) {
return;
}
class QueryBuilder
{
}

View File

@ -1,18 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\Persistence;
use Doctrine\ORM\EntityManagerInterface;
if (class_exists('Doctrine\Persistence\ManagerRegistry')) {
return;
}
final class ManagerRegistry
{
public function getManager(): ObjectManager
{
}
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Doctrine\Persistence;
if (interface_exists('Doctrine\Persistence\ObjectManager')) {
return;
}
interface ObjectManager
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace GuzzleHttp\Message;
if (interface_exists('GuzzleHttp\Message\MessageInterface')) {
return;
}
interface MessageInterface
{
public function getMessage();
}

View File

@ -1,19 +0,0 @@
<?php
declare(strict_types=1);
if (class_exists('Mockery')) {
return;
}
class Mockery
{
/**
* @param mixed ...$args
*
* @return \Mockery\MockInterface
*/
public static function mock(...$args) {
return new \Mockery\DummyMock();
}
}

View File

@ -1,10 +0,0 @@
<?php
declare(strict_types=1);
namespace Mockery;
class DummyMock implements MockInterface
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Mockery;
if (class_exists('Mockery\MockerInterface')) {
return;
}
interface MockInterface
{
}

View File

@ -1,10 +0,0 @@
<?php
if (function_exists('mock')) {
return;
}
function mock(): \Mockery\MockInterface
{
return new DummyMock();
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Nette\Application\UI;
if (class_exists('Nette\Application\UI\Control')) {
return;
}
class Control
{
}

View File

@ -1,13 +0,0 @@
<?php
declare(strict_types=1);
namespace Nette\Application\UI;
if (class_exists('Nette\Application\UI\Form')) {
return;
}
class Form
{
}

View File

@ -1,13 +0,0 @@
<?php
declare(strict_types=1);
namespace Nette\Application\UI;
if (class_exists('Nette\Application\UI\Presenter')) {
return;
}
class Presenter
{
}

View File

@ -1,13 +0,0 @@
<?php
declare(strict_types=1);
namespace Nette\DI;
if (class_exists('Nette\DI\CompilerExtension')) {
return;
}
class CompilerExtension
{
}

View File

@ -1,12 +0,0 @@
<?php
declare(strict_types=1);
if (class_exists('PHPExcel_CalcEngine_Logger')) {
return;
}
final class PHPExcel_CalcEngine_Logger
{
}

View File

@ -1,11 +0,0 @@
<?php
declare(strict_types=1);
if (class_exists('PHPExcel_Cell_DataValidation')) {
return;
}
final class PHPExcel_Cell_DataValidation
{
}

View File

@ -1,15 +0,0 @@
<?php
declare(strict_types=1);
// @see: https://github.com/PHPOffice/PHPExcel/blob/1.8/Classes/PHPExcel.php
final class PHPExcel
{
/**
* @return PHPExcel_Worksheet
*/
public function setActiveSheetIndex($pIndex = 0)
{
}
}

View File

@ -1,12 +0,0 @@
<?php
declare(strict_types=1);
if (class_exists('PHPExcel_Cell')) {
return;
}
final class PHPExcel_Cell
{
}

View File

@ -1,11 +0,0 @@
<?php
declare(strict_types=1);
if (class_exists('PHPExcel_Style_Conditional')) {
return;
}
final class PHPExcel_Style_Conditional
{
}

View File

@ -1,8 +0,0 @@
<?php
declare(strict_types=1);
final class PHPExcel_Worksheet
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace PHP_CodeSniffer\Sniffs;
if (interface_exists('PHP_CodeSniffer\Sniffs\Sniff')) {
return;
}
interface Sniff
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace PhpSpec;
if (class_exists('PhpSpec\ObjectBehavior')) {
return;
}
class ObjectBehavior
{
}

View File

@ -1,23 +0,0 @@
<?php
declare(strict_types=1);
namespace Ramsey\Uuid;
if (class_exists('Ramsey\Uuid\Uuid')) {
return;
}
class Uuid implements UuidInterface
{
public static function uuid4(): self
{
return new Uuid();
}
public function toString()
{
// dummy value
return '%s-%s-%s-%s-%s';
}
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Ramsey\Uuid;
if (interface_exists('Ramsey\Uuid\UuidInterface')) {
return;
}
interface UuidInterface
{
}

View File

@ -1,28 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Bundle\FrameworkBundle\Controller;
use Doctrine\Common\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;
if (class_exists('Symfony\Bundle\FrameworkBundle\Controller\AbstractController')) {
return;
}
abstract class AbstractController
{
public function getDoctrine(): ManagerRegistry
{
}
public function render($templateName, $params = []): Response
{
}
public function redirectToRoute($routeName): RedirectResponse
{
}
}

View File

@ -1,18 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Bundle\FrameworkBundle\Controller;
use Symfony\Component\Form\FormInterface;
if (class_exists('Symfony\Bundle\FrameworkBundle\Controller\Controller')) {
return;
}
class Controller
{
public function createForm(): FormInterface
{
}
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Bundle\FrameworkBundle\Controller;
if (trait_exists('Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait')) {
return;
}
trait ControllerTrait
{
}

View File

@ -1,13 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Bundle\FrameworkBundle\Kernel;
if (class_exists('Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait')) {
return;
}
trait MicroKernelTrait
{
}

View File

@ -1,20 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Bundle\FrameworkBundle\Test;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerInterface;
if (class_exists('Symfony\Bundle\FrameworkBundle\Test\KernelTestCase')) {
return;
}
class KernelTestCase extends TestCase
{
/**
* @var ContainerInterface
*/
protected static $container;
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Bundle\FrameworkBundle\Test;
if (class_exists('Symfony\Bundle\FrameworkBundle\Test\WebTestCase')) {
return;
}
class WebTestCase extends KernelTestCase
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Config\Definition\Builder;
if (class_exists('Symfony\Component\Config\Definition\Builder\TreeBuilder')) {
return;
}
class TreeBuilder
{
}

View File

@ -1,17 +0,0 @@
<?php
declare(strict_types=1);
// faking expression language, to be able to downgrade vendor/symfony/dependency-injection/ContainerBuilder.php,
// because it has optional-dependency on expression language
namespace Symfony\Component\ExpressionLanguage;
if (interface_exists('Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface')) {
return;
}
interface ExpressionFunctionProviderInterface
{
}

View File

@ -1,17 +0,0 @@
<?php
declare(strict_types=1);
// faking expression language, to be able to downgrade vendor/symfony/dependency-injection/ContainerBuilder.php,
// because it has optional-dependency on expression language
namespace Symfony\Component\ExpressionLanguage;
if (class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) {
return;
}
final class ExpressionLanguage
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Form;
if (class_exists('Symfony\Component\Form\AbstractType')) {
return;
}
abstract class AbstractType
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Form;
if (class_exists('Symfony\Component\Form\AbstractTypeExtension')) {
return;
}
abstract class AbstractTypeExtension
{
}

View File

@ -1,17 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Form\Extension\Core\Type;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormTypeInterface;
if (class_exists('Symfony\Component\Form\Extension\Core\Type\TextType')) {
return;
}
class TextType implements FormTypeInterface, FormBuilderInterface
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Form;
if (class_exists('Symfony\Component\Form\Form')) {
return;
}
final class Form
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Form;
if (class_exists('Symfony\Component\Form\FormBuilder')) {
return;
}
class FormBuilder implements FormBuilderInterface
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Form;
if (interface_exists('Symfony\Component\Form\FormBuilderInterface')) {
return;
}
interface FormBuilderInterface
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Form;
if (interface_exists('Symfony\Component\Form\FormConfigBuilderInterface')) {
return;
}
interface FormConfigBuilderInterface
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Form;
if (interface_exists('Symfony\Component\Form\FormInterface')) {
return;
}
interface FormInterface
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Form;
if (interface_exists('Symfony\Component\Form\FormTypeInterface')) {
return;
}
interface FormTypeInterface
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\HttpFoundation;
if (class_exists('Symfony\Component\HttpFoundation\RedirectResponse')) {
return;
}
final class RedirectResponse extends Response
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\HttpFoundation;
if (class_exists('Symfony\Component\HttpFoundation\Request')) {
return;
}
final class Request
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\HttpFoundation;
if (class_exists('Symfony\Component\HttpFoundation\Response')) {
return;
}
class Response
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Process;
if (class_exists('Symfony\Component\Process\ProcessBuilder')) {
return;
}
class ProcessBuilder
{
}

View File

@ -1,177 +0,0 @@
<?php
/** @changelog https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Annotation/Route.php */
declare(strict_types=1);
namespace Symfony\Component\Routing\Annotation;
if (class_exists('Symfony\Component\Routing\Annotation\Route')) {
return;
}
/**
* @Annotation
* @Target({"CLASS", "METHOD"})
*/
class Route
{
private $path;
private $localizedPaths = [];
private $name;
private $requirements = [];
private $options = [];
private $defaults = [];
private $host;
private $methods = [];
private $schemes = [];
private $condition;
private $locale;
private $format;
private $utf8;
/**
* @param array $data An array of key/value parameters
*
* @throws \BadMethodCallException
*/
public function __construct(array $data)
{
if (isset($data['localized_paths'])) {
throw new \BadMethodCallException(sprintf('Unknown property "localized_paths" on annotation "%s".', \get_class($this)));
}
if (isset($data['value'])) {
$data[\is_array($data['value']) ? 'localized_paths' : 'path'] = $data['value'];
unset($data['value']);
}
if (isset($data['path']) && \is_array($data['path'])) {
$data['localized_paths'] = $data['path'];
unset($data['path']);
}
if (isset($data['locale'])) {
$data['defaults']['_locale'] = $data['locale'];
unset($data['locale']);
}
if (isset($data['format'])) {
$data['defaults']['_format'] = $data['format'];
unset($data['format']);
}
if (isset($data['utf8'])) {
$data['options']['utf8'] = filter_var($data['utf8'], FILTER_VALIDATE_BOOLEAN) ?: false;
unset($data['utf8']);
}
foreach ($data as $key => $value) {
$method = 'set'.str_replace('_', '', $key);
if (!method_exists($this, $method)) {
throw new \BadMethodCallException(sprintf('Unknown property "%s" on annotation "%s".', $key, \get_class($this)));
}
$this->$method($value);
}
}
public function setPath($path)
{
$this->path = $path;
}
public function getPath()
{
return $this->path;
}
public function setLocalizedPaths(array $localizedPaths)
{
$this->localizedPaths = $localizedPaths;
}
public function getLocalizedPaths(): array
{
return $this->localizedPaths;
}
public function setHost($pattern)
{
$this->host = $pattern;
}
public function getHost()
{
return $this->host;
}
public function setName($name)
{
$this->name = $name;
}
public function getName()
{
return $this->name;
}
public function setRequirements($requirements)
{
$this->requirements = $requirements;
}
public function getRequirements()
{
return $this->requirements;
}
public function setOptions($options)
{
$this->options = $options;
}
public function getOptions()
{
return $this->options;
}
public function setDefaults($defaults)
{
$this->defaults = $defaults;
}
public function getDefaults()
{
return $this->defaults;
}
public function setSchemes($schemes)
{
$this->schemes = \is_array($schemes) ? $schemes : [$schemes];
}
public function getSchemes()
{
return $this->schemes;
}
public function setMethods($methods)
{
$this->methods = \is_array($methods) ? $methods : [$methods];
}
public function getMethods()
{
return $this->methods;
}
public function setCondition($condition)
{
$this->condition = $condition;
}
public function getCondition()
{
return $this->condition;
}
}

View File

@ -1,37 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Routing\Generator;
if (interface_exists('Symfony\Component\Routing\Generator\UrlGeneratorInterface')) {
return;
}
interface UrlGeneratorInterface
{
/**
* Generates an absolute URL, e.g. "http://example.com/dir/file".
*/
const ABSOLUTE_URL = true;
/**
* Generates an absolute path, e.g. "/dir/file".
*/
const ABSOLUTE_PATH = false;
/**
* Generates a relative path based on the current request path, e.g. "../parent-file".
*
* @see UrlGenerator::getRelativePath()
*/
const RELATIVE_PATH = 'relative';
/**
* Generates a network path, e.g. "//example.com/dir/file".
* Such reference reuses the current scheme but specifies the host.
*/
const NETWORK_PATH = 'network';
public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH);
}

View File

@ -1,26 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Routing;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
if (class_exists('Symfony\Component\Routing\Router')) {
return;
}
class Router implements RouterInterface
{
/**
* {@inheritdoc}
*/
public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)
{
return $this->getGenerator()->generate($name, $parameters, $referenceType);
}
private function getGenerator(): UrlGeneratorInterface
{
}
}

View File

@ -1,16 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Routing;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
if (interface_exists('Symfony\Component\Routing\RouterInterface')) {
return;
}
interface RouterInterface extends UrlGeneratorInterface
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Translation;
if (class_exists('Symfony\Component\Translation\Translator')) {
return;
}
class Translator implements TranslatorInterface
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\Translation;
if (interface_exists('Symfony\Component\Translation\TranslatorInterface')) {
return;
}
interface TranslatorInterface
{
}

View File

@ -1,14 +0,0 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\VarDumper\Test;
if (trait_exists('Symfony\Component\VarDumper\Test\VarDumperTestTrait\VarDumperTestTrait')) {
return;
}
trait VarDumperTestTrait
{
}