for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Wikibase\DataModel\Fixtures;
use Hashable;
/**
* @license GPL-2.0+
* @author Jeroen De Dauw < [email protected] >
*/
class HashArrayElement implements Hashable {
public $text = '';
public function __construct( $text ) {
$this->text = $text;
}
public function getHash() {
return sha1( $this->text );
public static function getInstances() {
$stuff = [
'foo',
'bar',
'baz',
'bah',
'~=[,,_,,]:3',
];
$instances = [];
foreach ( $stuff as $thinghy ) {
$instances[] = new static( $thinghy );
return $instances;