Skip to content

Commit

Permalink
Merge pull request #244 from InvisibleSmiley/fix/233
Browse files Browse the repository at this point in the history
Adjust documented return types to be `$this` where the pre-existing `self` declaration was too imprecise
  • Loading branch information
Ocramius authored Apr 11, 2022
2 parents 03c3030 + 3f2d984 commit fe0946c
Show file tree
Hide file tree
Showing 77 changed files with 264 additions and 264 deletions.
2 changes: 1 addition & 1 deletion src/Adapter/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function __construct(
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setProfiler(Profiler\ProfilerInterface $profiler)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/AdapterAwareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ trait AdapterAwareTrait
/**
* Set db adapter
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setDbAdapter(Adapter $adapter)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Driver/AbstractConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function inTransaction()

/**
* @param array $connectionParameters
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setConnectionParameters(array $connectionParameters)
{
Expand All @@ -107,7 +107,7 @@ public function setConnectionParameters(array $connectionParameters)
/**
* {@inheritDoc}
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setProfiler(ProfilerInterface $profiler)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Adapter/Driver/IbmDb2/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct($connectionParameters = null)
/**
* Set driver
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setDriver(IbmDb2 $driver)
{
Expand All @@ -68,7 +68,7 @@ public function setDriver(IbmDb2 $driver)

/**
* @param resource $resource DB2 resource
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setResource($resource)
{
Expand Down Expand Up @@ -204,7 +204,7 @@ public function commit()
/**
* Rollback
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
* @throws Exception\RuntimeException
*/
public function rollback()
Expand Down
8 changes: 4 additions & 4 deletions src/Adapter/Driver/IbmDb2/IbmDb2.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct($connection, ?Statement $statementPrototype = null,
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setProfiler(Profiler\ProfilerInterface $profiler)
{
Expand All @@ -63,7 +63,7 @@ public function getProfiler()
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function registerConnection(Connection $connection)
{
Expand All @@ -73,7 +73,7 @@ public function registerConnection(Connection $connection)
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function registerStatementPrototype(Statement $statementPrototype)
{
Expand All @@ -83,7 +83,7 @@ public function registerStatementPrototype(Statement $statementPrototype)
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function registerResultPrototype(Result $resultPrototype)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/Driver/IbmDb2/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Result implements ResultInterface
/**
* @param resource $resource
* @param mixed $generatedValue
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function initialize($resource, $generatedValue = null)
{
Expand Down
12 changes: 6 additions & 6 deletions src/Adapter/Driver/IbmDb2/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Statement implements StatementInterface, Profiler\ProfilerAwareInterface

/**
* @param resource $resource
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function initialize($resource)
{
Expand All @@ -51,7 +51,7 @@ public function initialize($resource)
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setDriver(IbmDb2 $driver)
{
Expand All @@ -60,7 +60,7 @@ public function setDriver(IbmDb2 $driver)
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setProfiler(Profiler\ProfilerInterface $profiler)
{
Expand All @@ -80,7 +80,7 @@ public function getProfiler()
* Set sql
*
* @param null|string $sql
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setSql($sql)
{
Expand All @@ -101,7 +101,7 @@ public function getSql()
/**
* Set parameter container
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setParameterContainer(ParameterContainer $parameterContainer)
{
Expand Down Expand Up @@ -145,7 +145,7 @@ public function getResource()
* Prepare sql
*
* @param string|null $sql
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
* @throws Exception\RuntimeException
*/
public function prepare($sql = null)
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Driver/Mysqli/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct($connectionInfo = null)
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setDriver(Mysqli $driver)
{
Expand All @@ -71,7 +71,7 @@ public function getCurrentSchema()
/**
* Set resource
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setResource(\mysqli $resource)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Driver/Mysqli/Mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function __construct(
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setProfiler(Profiler\ProfilerInterface $profiler)
{
Expand All @@ -80,7 +80,7 @@ public function getProfiler()
/**
* Register connection
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function registerConnection(Connection $connection)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/Driver/Mysqli/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Result implements
* @param mixed $resource
* @param mixed $generatedValue
* @param bool|null $isBuffered
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
* @throws Exception\InvalidArgumentException
*/
public function initialize($resource, $generatedValue, $isBuffered = null)
Expand Down
14 changes: 7 additions & 7 deletions src/Adapter/Driver/Mysqli/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct($bufferResults = false)
/**
* Set driver
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setDriver(Mysqli $driver)
{
Expand All @@ -66,7 +66,7 @@ public function setDriver(Mysqli $driver)
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setProfiler(Profiler\ProfilerInterface $profiler)
{
Expand All @@ -85,7 +85,7 @@ public function getProfiler()
/**
* Initialize
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function initialize(\mysqli $mysqli)
{
Expand All @@ -97,7 +97,7 @@ public function initialize(\mysqli $mysqli)
* Set sql
*
* @param string $sql
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setSql($sql)
{
Expand All @@ -108,7 +108,7 @@ public function setSql($sql)
/**
* Set Parameter container
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setParameterContainer(ParameterContainer $parameterContainer)
{
Expand All @@ -129,7 +129,7 @@ public function getResource()
/**
* Set resource
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setResource(mysqli_stmt $mysqliStatement)
{
Expand Down Expand Up @@ -172,7 +172,7 @@ public function isPrepared()
* Prepare
*
* @param string $sql
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
* @throws Exception\InvalidQueryException
* @throws Exception\RuntimeException
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Driver/Oci8/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct($connectionInfo = null)
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setDriver(Oci8 $driver)
{
Expand Down Expand Up @@ -65,7 +65,7 @@ public function getCurrentSchema()
* Set resource
*
* @param resource $resource
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setResource($resource)
{
Expand Down
12 changes: 6 additions & 6 deletions src/Adapter/Driver/Oci8/Oci8.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function __construct(
}

/**
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setProfiler(Profiler\ProfilerInterface $profiler)
{
Expand All @@ -94,7 +94,7 @@ public function getProfiler()
/**
* Register connection
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function registerConnection(Connection $connection)
{
Expand All @@ -106,7 +106,7 @@ public function registerConnection(Connection $connection)
/**
* Register statement prototype
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function registerStatementPrototype(Statement $statementPrototype)
{
Expand All @@ -126,7 +126,7 @@ public function getStatementPrototype()
/**
* Register result prototype
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function registerResultPrototype(Result $resultPrototype)
{
Expand All @@ -147,7 +147,7 @@ public function getResultPrototype()
*
* @param string $name
* @param AbstractFeature $feature
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function addFeature($name, $feature)
{
Expand All @@ -162,7 +162,7 @@ public function addFeature($name, $feature)
/**
* Setup the default features for Pdo
*
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function setupDefaultFeatures()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/Driver/Oci8/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Result implements Iterator, ResultInterface
* @param resource $resource
* @param null|int $generatedValue
* @param null|int $rowCount
* @return self Provides a fluent interface
* @return $this Provides a fluent interface
*/
public function initialize($resource, $generatedValue = null, $rowCount = null)
{
Expand Down
Loading

0 comments on commit fe0946c

Please sign in to comment.