@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use SilverStripe\Dev\SapphireTest; |
| 6 | 6 | use SilverStripe\Forms\NumericField; |
| 7 | 7 | use SilverStripe\Forms\RequiredFields; |
| 8 | -use SilverStripe\i18n\i18n; |
|
| 9 | 8 | |
| 10 | 9 | class NumericFieldTest extends SapphireTest |
| 11 | 10 | { |
@@ -41,6 +41,9 @@ |
||
| 41 | 41 | Injector::inst()->get(CacheInterface::class . '.cacheblock')->clear(); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | + /** |
|
| 45 | + * @param string $template |
|
| 46 | + */ |
|
| 44 | 47 | protected function _runtemplate($template, $data = null) |
| 45 | 48 | { |
| 46 | 49 | if ($data === null) { |
@@ -28,6 +28,10 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | protected $composerData = null; |
| 30 | 30 | |
| 31 | + /** |
|
| 32 | + * @param string $path |
|
| 33 | + * @param string $base |
|
| 34 | + */ |
|
| 31 | 35 | public function __construct($path, $base) |
| 32 | 36 | { |
| 33 | 37 | $this->path = rtrim($path, '/\\'); |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | * Find an attribute in a SimpleXMLElement object by name. |
| 227 | 227 | * @param SimpleXMLElement $object |
| 228 | 228 | * @param string $attribute Name of attribute to find |
| 229 | - * @return SimpleXMLElement object of the attribute |
|
| 229 | + * @return boolean object of the attribute |
|
| 230 | 230 | */ |
| 231 | 231 | public function findAttribute($object, $attribute) |
| 232 | 232 | { |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | * Note: characters are stripped from the content; make sure that your assertions take this into account. |
| 261 | 261 | * |
| 262 | 262 | * @param string $selector A basic CSS selector, e.g. 'li.jobs h3' |
| 263 | - * @param array|string $expectedMatches The content of at least one of the matched tags |
|
| 263 | + * @param string[] $expectedMatches The content of at least one of the matched tags |
|
| 264 | 264 | * @param string $message |
| 265 | 265 | * @throws PHPUnit_Framework_AssertionFailedError |
| 266 | 266 | */ |
@@ -14,8 +14,6 @@ discard block |
||
| 14 | 14 | use SilverStripe\Core\ClassInfo; |
| 15 | 15 | use SilverStripe\Core\Config\ConfigLoader; |
| 16 | 16 | use SilverStripe\Core\Config\CoreConfigFactory; |
| 17 | -use SilverStripe\Core\Config\DefaultConfig; |
|
| 18 | -use SilverStripe\Core\Config\Middleware\ExtensionMiddleware; |
|
| 19 | 17 | use SilverStripe\Core\Flushable; |
| 20 | 18 | use SilverStripe\Core\Injector\Injector; |
| 21 | 19 | use SilverStripe\Core\Manifest\ClassManifest; |
@@ -38,7 +36,6 @@ discard block |
||
| 38 | 36 | use SilverStripe\View\ThemeResourceLoader; |
| 39 | 37 | use SilverStripe\View\ThemeManifest; |
| 40 | 38 | use PHPUnit_Framework_TestCase; |
| 41 | -use Translatable; |
|
| 42 | 39 | use LogicException; |
| 43 | 40 | use Exception; |
| 44 | 41 | |
@@ -184,6 +184,9 @@ discard block |
||
| 184 | 184 | return self::$is_running_test; |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | + /** |
|
| 188 | + * @param boolean $bool |
|
| 189 | + */ |
|
| 187 | 190 | public static function set_is_running_test($bool) |
| 188 | 191 | { |
| 189 | 192 | self::$is_running_test = $bool; |
@@ -662,10 +665,10 @@ discard block |
||
| 662 | 665 | /** |
| 663 | 666 | * Assert that the matching email was sent since the last call to clearEmails() |
| 664 | 667 | * All of the parameters can either be a string, or, if they start with "/", a PREG-compatible regular expression. |
| 665 | - * @param $to |
|
| 668 | + * @param string $to |
|
| 666 | 669 | * @param $from |
| 667 | - * @param $subject |
|
| 668 | - * @param $content |
|
| 670 | + * @param string $subject |
|
| 671 | + * @param string $content |
|
| 669 | 672 | * @return array Contains the keys: 'type', 'to', 'from', 'subject', 'content', 'plainContent', 'attachedFiles', |
| 670 | 673 | * 'customHeaders', 'htmlContent', inlineImages' |
| 671 | 674 | */ |
@@ -898,7 +901,7 @@ discard block |
||
| 898 | 901 | * @param string $expectedSQL |
| 899 | 902 | * @param string $actualSQL |
| 900 | 903 | * @param string $message |
| 901 | - * @param float|int $delta |
|
| 904 | + * @param integer $delta |
|
| 902 | 905 | * @param integer $maxDepth |
| 903 | 906 | * @param boolean $canonicalize |
| 904 | 907 | * @param boolean $ignoreCase |
@@ -1186,7 +1189,7 @@ discard block |
||
| 1186 | 1189 | * Create a member and group with the given permission code, and log in with it. |
| 1187 | 1190 | * Returns the member ID. |
| 1188 | 1191 | * |
| 1189 | - * @param string|array $permCode Either a permission, or list of permissions |
|
| 1192 | + * @param string $permCode Either a permission, or list of permissions |
|
| 1190 | 1193 | * @return int Member ID |
| 1191 | 1194 | */ |
| 1192 | 1195 | public function logInWithPermission($permCode = "ADMIN") |
@@ -388,7 +388,7 @@ |
||
| 388 | 388 | /** |
| 389 | 389 | * Fields can have action to, let's check if anyone of the responds to $funcname them |
| 390 | 390 | * |
| 391 | - * @param SS_List|array $fields |
|
| 391 | + * @param FieldList $fields |
|
| 392 | 392 | * @param callable $funcName |
| 393 | 393 | * @return FormField |
| 394 | 394 | */ |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use BadMethodCallException; |
| 6 | 6 | use SilverStripe\Control\Controller; |
| 7 | -use SilverStripe\Control\Director; |
|
| 8 | 7 | use SilverStripe\Control\HTTPRequest; |
| 9 | 8 | use SilverStripe\Control\HTTPResponse; |
| 10 | 9 | use SilverStripe\Control\HTTPResponse_Exception; |
@@ -165,6 +165,11 @@ |
||
| 165 | 165 | return sprintf('%02d', self::$cost) . '$' . substr($generator->randomToken('sha1'), 0, 22); |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | + /** |
|
| 169 | + * @param string|false $hash |
|
| 170 | + * @param string $password |
|
| 171 | + * @param string $salt |
|
| 172 | + */ |
|
| 168 | 173 | public function check($hash, $password, $salt = null, $member = null) |
| 169 | 174 | { |
| 170 | 175 | if (strpos($hash, '$2y$') === 0) { |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace SilverStripe\Control\Tests; |
| 4 | 4 | |
| 5 | 5 | use InvalidArgumentException; |
| 6 | -use PHPUnit_Framework_Error; |
|
| 7 | -use SilverStripe\Control\RequestHandler; |
|
| 8 | 6 | use SilverStripe\Control\Tests\ControllerTest\AccessBaseController; |
| 9 | 7 | use SilverStripe\Control\Tests\ControllerTest\AccessSecuredController; |
| 10 | 8 | use SilverStripe\Control\Tests\ControllerTest\AccessWildcardSecuredController; |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use SilverStripe\Core\Config\Config; |
| 6 | 6 | use SilverStripe\Core\ClassInfo; |
| 7 | 7 | use SilverStripe\Dev\SapphireTest; |
| 8 | -use SilverStripe\Control\Controller; |
|
| 9 | 8 | use SilverStripe\Forms\FormField; |
| 10 | 9 | use SilverStripe\Forms\Tests\FormFieldTest\TestExtension; |
| 11 | 10 | use SilverStripe\Forms\TextField; |