Unverified Commit f06ad93f authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3224523 by alexpott, longwave: [PHP 8.1] Add ReturnTypeWillChange attribute where necessary

parent 967e1677
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ protected function checkListHasItemWithContent(array $scaffold_files) {
  /**
   * {@inheritdoc}
   */
  #[\ReturnTypeWillChange]
  public function getIterator() {
    return new \ArrayIterator($this->scaffoldFilesByProject);
  }
+2 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ trait ReflectionClass
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getConstants(?int $filter = null)
    {
        throw new ReflectionException('Method not implemented');
@@ -41,6 +42,7 @@ public function getConstants(?int $filter = null)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function newInstance(mixed ...$args)
    {
        throw new ReflectionException('Method not implemented');
+44 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ public function __construct(StaticReflectionParser $staticReflectionParser)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getName()
    {
        return $this->staticReflectionParser->getClassName();
@@ -57,6 +58,7 @@ public function getName()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getDocComment()
    {
        return $this->staticReflectionParser->getDocComment();
@@ -65,6 +67,7 @@ public function getDocComment()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getNamespaceName()
    {
        return $this->staticReflectionParser->getNamespaceName();
@@ -81,6 +84,7 @@ public function getUseStatements()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getMethod($name)
    {
        throw new ReflectionException('Method not implemented');
@@ -89,6 +93,7 @@ public function getMethod($name)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getProperty($name)
    {
        throw new ReflectionException('Method not implemented');
@@ -105,6 +110,7 @@ public static function export($argument, $return = false)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getConstant($name)
    {
        throw new ReflectionException('Method not implemented');
@@ -113,6 +119,7 @@ public function getConstant($name)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getConstructor()
    {
        throw new ReflectionException('Method not implemented');
@@ -121,6 +128,7 @@ public function getConstructor()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getDefaultProperties()
    {
        throw new ReflectionException('Method not implemented');
@@ -129,6 +137,7 @@ public function getDefaultProperties()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getEndLine()
    {
        throw new ReflectionException('Method not implemented');
@@ -137,6 +146,7 @@ public function getEndLine()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getExtension()
    {
        throw new ReflectionException('Method not implemented');
@@ -145,6 +155,7 @@ public function getExtension()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getExtensionName()
    {
        throw new ReflectionException('Method not implemented');
@@ -153,6 +164,7 @@ public function getExtensionName()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getFileName()
    {
        throw new ReflectionException('Method not implemented');
@@ -161,6 +173,7 @@ public function getFileName()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getInterfaceNames()
    {
        throw new ReflectionException('Method not implemented');
@@ -169,6 +182,7 @@ public function getInterfaceNames()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getInterfaces()
    {
        throw new ReflectionException('Method not implemented');
@@ -177,6 +191,7 @@ public function getInterfaces()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getMethods($filter = null)
    {
        throw new ReflectionException('Method not implemented');
@@ -185,6 +200,7 @@ public function getMethods($filter = null)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getModifiers()
    {
        throw new ReflectionException('Method not implemented');
@@ -193,6 +209,7 @@ public function getModifiers()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getParentClass()
    {
        throw new ReflectionException('Method not implemented');
@@ -201,6 +218,7 @@ public function getParentClass()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getProperties($filter = null)
    {
        throw new ReflectionException('Method not implemented');
@@ -209,6 +227,7 @@ public function getProperties($filter = null)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getShortName()
    {
        throw new ReflectionException('Method not implemented');
@@ -217,6 +236,7 @@ public function getShortName()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getStartLine()
    {
        throw new ReflectionException('Method not implemented');
@@ -225,6 +245,7 @@ public function getStartLine()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getStaticProperties()
    {
        throw new ReflectionException('Method not implemented');
@@ -233,6 +254,7 @@ public function getStaticProperties()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getStaticPropertyValue($name, $default = '')
    {
        throw new ReflectionException('Method not implemented');
@@ -241,6 +263,7 @@ public function getStaticPropertyValue($name, $default = '')
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getTraitAliases()
    {
        throw new ReflectionException('Method not implemented');
@@ -249,6 +272,7 @@ public function getTraitAliases()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getTraitNames()
    {
        throw new ReflectionException('Method not implemented');
@@ -257,6 +281,7 @@ public function getTraitNames()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function getTraits()
    {
        throw new ReflectionException('Method not implemented');
@@ -265,6 +290,7 @@ public function getTraits()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function hasConstant($name)
    {
        throw new ReflectionException('Method not implemented');
@@ -273,6 +299,7 @@ public function hasConstant($name)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function hasMethod($name)
    {
        throw new ReflectionException('Method not implemented');
@@ -281,6 +308,7 @@ public function hasMethod($name)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function hasProperty($name)
    {
        throw new ReflectionException('Method not implemented');
@@ -289,6 +317,7 @@ public function hasProperty($name)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function implementsInterface($interface)
    {
        throw new ReflectionException('Method not implemented');
@@ -297,6 +326,7 @@ public function implementsInterface($interface)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function inNamespace()
    {
        throw new ReflectionException('Method not implemented');
@@ -305,6 +335,7 @@ public function inNamespace()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isAbstract()
    {
        throw new ReflectionException('Method not implemented');
@@ -313,6 +344,7 @@ public function isAbstract()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isCloneable()
    {
        throw new ReflectionException('Method not implemented');
@@ -321,6 +353,7 @@ public function isCloneable()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isFinal()
    {
        throw new ReflectionException('Method not implemented');
@@ -329,6 +362,7 @@ public function isFinal()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isInstance($object)
    {
        throw new ReflectionException('Method not implemented');
@@ -337,6 +371,7 @@ public function isInstance($object)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isInstantiable()
    {
        throw new ReflectionException('Method not implemented');
@@ -345,6 +380,7 @@ public function isInstantiable()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isInterface()
    {
        throw new ReflectionException('Method not implemented');
@@ -353,6 +389,7 @@ public function isInterface()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isInternal()
    {
        throw new ReflectionException('Method not implemented');
@@ -361,6 +398,7 @@ public function isInternal()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isIterateable()
    {
        throw new ReflectionException('Method not implemented');
@@ -369,6 +407,7 @@ public function isIterateable()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isSubclassOf($class)
    {
        throw new ReflectionException('Method not implemented');
@@ -377,6 +416,7 @@ public function isSubclassOf($class)
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isTrait()
    {
        throw new ReflectionException('Method not implemented');
@@ -385,6 +425,7 @@ public function isTrait()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function isUserDefined()
    {
        throw new ReflectionException('Method not implemented');
@@ -393,6 +434,7 @@ public function isUserDefined()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function newInstanceArgs(array $args = [])
    {
        throw new ReflectionException('Method not implemented');
@@ -401,6 +443,7 @@ public function newInstanceArgs(array $args = [])
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function newInstanceWithoutConstructor()
    {
        throw new ReflectionException('Method not implemented');
@@ -409,6 +452,7 @@ public function newInstanceWithoutConstructor()
    /**
     * {@inheritDoc}
     */
    #[\ReturnTypeWillChange]
    public function setStaticPropertyValue($name, $value)
    {
        throw new ReflectionException('Method not implemented');
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ public function __construct($path, $regex) {
  /**
   * Implements \FilterIterator::accept().
   */
  #[\ReturnTypeWillChange]
  public function accept() {
    /** @var \SplFileInfo $file_info */
    $file_info = $this->getInnerIterator()->current();
+2 −0
Original line number Diff line number Diff line
@@ -142,6 +142,7 @@ public function removeInstanceId($instance_id) {
    $this->remove($instance_id);
  }

  #[\ReturnTypeWillChange]
  public function getIterator() {
    $instances = [];
    foreach ($this->getInstanceIds() as $instance_id) {
@@ -153,6 +154,7 @@ public function getIterator() {
  /**
   * {@inheritdoc}
   */
  #[\ReturnTypeWillChange]
  public function count() {
    return count($this->instanceIds);
  }
Loading