@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace SilverStripe\Logging\Tests; |
| 4 | 4 | |
| 5 | 5 | use Monolog\Handler\HandlerInterface; |
| 6 | -use PhpParser\Node\Scalar\MagicConst\Dir; |
|
| 7 | 6 | use SilverStripe\Control\Director; |
| 8 | 7 | use SilverStripe\Core\Injector\Injector; |
| 9 | 8 | use SilverStripe\Dev\SapphireTest; |
@@ -42,6 +42,9 @@ |
||
| 42 | 42 | return Injector::inst()->get(PermissionChecker::class.'.testpermissions'); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | + /** |
|
| 46 | + * @param DataObject $member |
|
| 47 | + */ |
|
| 45 | 48 | public function canEdit($member = null) |
| 46 | 49 | { |
| 47 | 50 | if (!$member) { |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use SilverStripe\ORM\DataObject; |
| 8 | 8 | use SilverStripe\Security\InheritedPermissions; |
| 9 | 9 | use SilverStripe\Security\InheritedPermissionsExtension; |
| 10 | -use SilverStripe\Security\Member; |
|
| 11 | 10 | use SilverStripe\Security\PermissionChecker; |
| 12 | 11 | use SilverStripe\Security\Security; |
| 13 | 12 | use SilverStripe\Versioned\Versioned; |
@@ -159,6 +159,10 @@ discard block |
||
| 159 | 159 | ]); |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | + /** |
|
| 163 | + * @param \SilverStripe\ORM\FieldType\DBHTMLText $result |
|
| 164 | + * @param string[] $expected |
|
| 165 | + */ |
|
| 162 | 166 | private function assertExpectedStrings($result, $expected) |
| 163 | 167 | { |
| 164 | 168 | foreach ($expected as $expectedStr) { |
@@ -1089,6 +1093,10 @@ discard block |
||
| 1089 | 1093 | $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult); |
| 1090 | 1094 | } |
| 1091 | 1095 | |
| 1096 | + /** |
|
| 1097 | + * @param string $a |
|
| 1098 | + * @param string $b |
|
| 1099 | + */ |
|
| 1092 | 1100 | public function assertEqualIgnoringWhitespace($a, $b, $message = '') |
| 1093 | 1101 | { |
| 1094 | 1102 | $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b), $message); |
@@ -1817,6 +1825,11 @@ discard block |
||
| 1817 | 1825 | $this->_renderWithSourceFileComments('SSViewerTestComments/'.$template['name'], $template['expected']); |
| 1818 | 1826 | } |
| 1819 | 1827 | } |
| 1828 | + |
|
| 1829 | + /** |
|
| 1830 | + * @param string $name |
|
| 1831 | + * @param string $expected |
|
| 1832 | + */ |
|
| 1820 | 1833 | private function _renderWithSourceFileComments($name, $expected) |
| 1821 | 1834 | { |
| 1822 | 1835 | $viewer = new SSViewer(array($name)); |
@@ -19,6 +19,11 @@ |
||
| 19 | 19 | parent::__construct(); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | + /** |
|
| 23 | + * @param ManifestFileFinder $finder |
|
| 24 | + * @param null|string $base |
|
| 25 | + * @param string[] $expect |
|
| 26 | + */ |
|
| 22 | 27 | public function assertFinderFinds($finder, $base, $expect, $message = null) |
| 23 | 28 | { |
| 24 | 29 | if (!$base) { |
@@ -310,6 +310,9 @@ |
||
| 310 | 310 | |
| 311 | 311 | private static $method_from_cache = array(); |
| 312 | 312 | |
| 313 | + /** |
|
| 314 | + * @param string $method |
|
| 315 | + */ |
|
| 313 | 316 | public static function has_method_from($class, $method, $compclass) |
| 314 | 317 | { |
| 315 | 318 | $lClass = strtolower($class); |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use SilverStripe\Core\Injector\Injectable; |
| 6 | 6 | use Iterator; |
| 7 | - |
|
| 8 | 7 | use SilverStripe\Control\Director; |
| 9 | 8 | |
| 10 | 9 | /** |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use SilverStripe\ORM\DataObjectInterface; |
| 7 | 7 | use SilverStripe\Security\Member; |
| 8 | 8 | use SilverStripe\Security\Security; |
| 9 | -use SilverStripe\View\Requirements; |
|
| 10 | 9 | |
| 11 | 10 | /** |
| 12 | 11 | * Two masked input fields, checks for matching passwords. |
@@ -190,7 +190,7 @@ |
||
| 190 | 190 | /** |
| 191 | 191 | * Ensure that the query is ready to execute. |
| 192 | 192 | * |
| 193 | - * @param array|null $queriedColumns Any columns to filter the query by |
|
| 193 | + * @param string[] $queriedColumns Any columns to filter the query by |
|
| 194 | 194 | * @return SQLSelect The finalised sql query |
| 195 | 195 | */ |
| 196 | 196 | public function getFinalisedQuery($queriedColumns = null) |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | * @param Member $member The member to log in. |
| 19 | 19 | * @param Boolean $persistent boolean If set to true, the login may persist beyond the current session. |
| 20 | 20 | * @param HTTPRequest $request The request of the visitor that is logging in, to get, for example, cookies. |
| 21 | - * @param HTTPResponse $response The response object to modify, if needed. |
|
| 21 | + * @return void |
|
| 22 | 22 | */ |
| 23 | 23 | public function logIn(Member $member, $persistent, HTTPRequest $request); |
| 24 | 24 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * Log any logged-in member out of this identity store. |
| 27 | 27 | * |
| 28 | 28 | * @param HTTPRequest $request The request of the visitor that is logging out, to get, for example, cookies. |
| 29 | - * @param HTTPResponse $response The response object to modify, if needed. |
|
| 29 | + * @return void |
|
| 30 | 30 | */ |
| 31 | 31 | public function logOut(HTTPRequest $request); |
| 32 | 32 | } |