for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Wikibase\Repo\ChangeOp;
use ValueValidators\Result;
use Wikibase\DataModel\Entity\EntityId;
/**
* Class for collection of ChangeOp results
*/
class ChangeOpsResult implements ChangeOpResult {
private $changeOpResults;
private $entityId;
* @param EntityId|null $entityId
* @param ChangeOpResult[] $changeOpResults
public function __construct( EntityId $entityId = null, array $changeOpResults = [] ) {
$this->entityId = $entityId;
$this->changeOpResults = $changeOpResults;
}
public function getChangeOpsResults() {
return $this->changeOpResults;
public function getEntityId() {
return $this->entityId;
public function isEntityChanged() {
foreach ( $this->changeOpResults as $result ) {
if ( $result->isEntityChanged() ) {
return true;
return false;
public function validate(): Result {
$finalResult = Result::newSuccess();
$finalResult = Result::merge( $finalResult, $result->validate() );
$finalResult
object<ValueValidators\Result>
object<self>
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
$result->validate()
return $finalResult;
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: