@@ -60,7 +60,7 @@ |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | - * @return FixtureFactory |
|
| 63 | + * @return \SilverStripe\Dev\FixtureFactory |
|
| 64 | 64 | */ |
| 65 | 65 | public function getFixtureFactory() { |
| 66 | 66 | if(!$this->fixtureFactory) { |
@@ -36,6 +36,7 @@ |
||
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * Get Mink session from MinkContext |
| 39 | + * @return \Behat\Mink\Session |
|
| 39 | 40 | */ |
| 40 | 41 | public function getSession($name = null) { |
| 41 | 42 | return $this->getMainContext()->getSession($name); |
@@ -2,13 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\Framework\Test\Behaviour; |
| 4 | 4 | |
| 5 | -use Behat\Behat\Context\ClosuredContextInterface; |
|
| 6 | -use Behat\Behat\Context\TranslatedContextInterface; |
|
| 7 | 5 | use Behat\Behat\Context\BehatContext; |
| 8 | -use Behat\Behat\Context\Step; |
|
| 9 | -use Behat\Behat\Exception\PendingException; |
|
| 10 | 6 | use Behat\Mink\Exception\ElementHtmlException; |
| 11 | -use Behat\Gherkin\Node\PyStringNode; |
|
| 12 | 7 | use Behat\Gherkin\Node\TableNode; |
| 13 | 8 | use Behat\MinkExtension\Context\MinkContext as MinkContext; |
| 14 | 9 | use Symfony\Component\DomCrawler\Crawler; |
@@ -321,6 +321,7 @@ |
||
| 321 | 321 | * Forces the JavaScript requirements to the end of the body, right before the closing tag |
| 322 | 322 | * |
| 323 | 323 | * @param bool |
| 324 | + * @param boolean $var |
|
| 324 | 325 | * @return $this |
| 325 | 326 | */ |
| 326 | 327 | public function setForceJSToBottom($var) |
@@ -2,9 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SilverStripe\ORM\Versioning; |
| 4 | 4 | |
| 5 | -use SilverStripe\Forms\FieldList; |
|
| 6 | -use SilverStripe\Forms\TextField; |
|
| 7 | -use SilverStripe\Forms\ReadonlyField; |
|
| 8 | 5 | use SilverStripe\i18n\i18n; |
| 9 | 6 | use SilverStripe\ORM\HasManyList; |
| 10 | 7 | use SilverStripe\ORM\ValidationException; |
@@ -97,6 +97,9 @@ |
||
| 97 | 97 | return $return; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | + /** |
|
| 101 | + * @param boolean $index |
|
| 102 | + */ |
|
| 100 | 103 | function f($index) { |
| 101 | 104 | return stripslashes($this->row[$index]); |
| 102 | 105 | } |
@@ -61,9 +61,17 @@ discard block |
||
| 61 | 61 | return $path; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | + /** |
|
| 65 | + * @param integer $parent |
|
| 66 | + * @param integer $position |
|
| 67 | + */ |
|
| 64 | 68 | function _create($parent, $position) { |
| 65 | 69 | return $this->_move(0, $parent, $position); |
| 66 | 70 | } |
| 71 | + |
|
| 72 | + /** |
|
| 73 | + * @param integer $id |
|
| 74 | + */ |
|
| 67 | 75 | function _remove($id) { |
| 68 | 76 | if((int)$id === 1) { return false; } |
| 69 | 77 | $data = $this->_get_node($id); |
@@ -100,6 +108,10 @@ discard block |
||
| 100 | 108 | ); |
| 101 | 109 | return true; |
| 102 | 110 | } |
| 111 | + |
|
| 112 | + /** |
|
| 113 | + * @param integer $id |
|
| 114 | + */ |
|
| 103 | 115 | function _move($id, $ref_id, $position = 0, $is_copy = false) { |
| 104 | 116 | if((int)$ref_id === 0 || (int)$id === 1) { return false; } |
| 105 | 117 | $sql = array(); // Queries executed at the end |
@@ -238,6 +250,10 @@ discard block |
||
| 238 | 250 | if($is_copy) $this->_fix_copy($ind, $position); |
| 239 | 251 | return $node === false || $is_copy ? $ind : true; |
| 240 | 252 | } |
| 253 | + |
|
| 254 | + /** |
|
| 255 | + * @param integer $position |
|
| 256 | + */ |
|
| 241 | 257 | function _fix_copy($id, $position) { |
| 242 | 258 | $node = $this->_get_node($id); |
| 243 | 259 | $children = $this->_get_children($id, true); |
@@ -118,6 +118,10 @@ |
||
| 118 | 118 | |
| 119 | 119 | // Patch in multibyte support |
| 120 | 120 | if (!function_exists('mb_substr')) {
|
| 121 | + |
|
| 122 | + /** |
|
| 123 | + * @param string $str |
|
| 124 | + */ |
|
| 121 | 125 | function mb_substr($str, $start, $len = '', $encoding="UTF-8"){
|
| 122 | 126 | $limit = strlen($str); |
| 123 | 127 | |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | /** |
| 53 | 53 | * Throws an error message back to the user. This will stop all execution. |
| 54 | 54 | * |
| 55 | - * @param {String} $str Message to send back to user.
|
|
| 55 | + * @param string $str Message to send back to user. |
|
| 56 | 56 | */ |
| 57 | 57 | function throwError($str) {
|
| 58 | 58 | die('{"result":null,"id":null,"error":{"errstr":"' . addslashes($str) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
|
@@ -342,6 +342,9 @@ discard block |
||
| 342 | 342 | return null; |
| 343 | 343 | } |
| 344 | 344 | |
| 345 | + /** |
|
| 346 | + * @param integer $len |
|
| 347 | + */ |
|
| 345 | 348 | function skip($len) { |
| 346 | 349 | $this->_pos += $len; |
| 347 | 350 | } |
@@ -369,6 +372,9 @@ discard block |
||
| 369 | 372 | return $this->readValue($reader); |
| 370 | 373 | } |
| 371 | 374 | |
| 375 | + /** |
|
| 376 | + * @param Moxiecode_JSONReader $reader |
|
| 377 | + */ |
|
| 372 | 378 | function readValue(&$reader) { |
| 373 | 379 | $this->data = array(); |
| 374 | 380 | $this->parents = array(); |
@@ -554,6 +560,11 @@ discard block |
||
| 554 | 560 | return '"' . $input . '"'; |
| 555 | 561 | } |
| 556 | 562 | |
| 563 | + /** |
|
| 564 | + * @param string $utf8 |
|
| 565 | + * |
|
| 566 | + * @return string |
|
| 567 | + */ |
|
| 557 | 568 | function _utf82utf16($utf8) { |
| 558 | 569 | if (function_exists('mb_convert_encoding')) |
| 559 | 570 | return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); |