Skip to content

Commit

Permalink
Ref #52 - Add examples that have @example tags into them and use mu…
Browse files Browse the repository at this point in the history
…ltiple lines
  • Loading branch information
williamdes committed Nov 18, 2022
1 parent aa663b0 commit 8a642d0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/phar/data/src/StringExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,31 @@ class IPv4Address implements Stringable {
private string $oct3;
private string $oct4;

/**
* Elementum semper nullam primis tempus quisque tempor.
*
* @example
* $redis->pipeline()
* ->select(1)
* ->del('newkey')
* ->select(0)
* ->del('newkey')
* ->mset(['source1' => 'value1', 'exists' => 'old_value'])
* ->exec();
*/
public function __construct(string $oct1, string $oct2, string $oct3, string $oct4) {
$this->oct1 = $oct1;
$this->oct2 = $oct2;
$this->oct3 = $oct3;
$this->oct4 = $oct4;
}

/**
* Elementum semper nullam primis tempus quisque tempor.
*
* @example $redis->copy('source1', 'newkey');
* @example $redis->copy('source1', 'newkey', ['db' => 1]);
*/
public function __toString(): string {
return "$this->oct1.$this->oct2.$this->oct3.$this->oct4";
}
Expand Down

0 comments on commit 8a642d0

Please sign in to comment.