Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/browser-kit/History.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
11:bfffd8d7479a | 12:7a779792577d |
---|---|
30 $this->position = -1; | 30 $this->position = -1; |
31 } | 31 } |
32 | 32 |
33 /** | 33 /** |
34 * Adds a Request to the history. | 34 * Adds a Request to the history. |
35 * | |
36 * @param Request $request A Request instance | |
37 */ | 35 */ |
38 public function add(Request $request) | 36 public function add(Request $request) |
39 { | 37 { |
40 $this->stack = array_slice($this->stack, 0, $this->position + 1); | 38 $this->stack = array_slice($this->stack, 0, $this->position + 1); |
41 $this->stack[] = clone $request; | 39 $this->stack[] = clone $request; |
47 * | 45 * |
48 * @return bool true if the history is empty, false otherwise | 46 * @return bool true if the history is empty, false otherwise |
49 */ | 47 */ |
50 public function isEmpty() | 48 public function isEmpty() |
51 { | 49 { |
52 return count($this->stack) == 0; | 50 return 0 == count($this->stack); |
53 } | 51 } |
54 | 52 |
55 /** | 53 /** |
56 * Goes back in the history. | 54 * Goes back in the history. |
57 * | 55 * |