Merge pull request #5 from JorisDebonnet/patch-1

Short array syntax [] in Page and PageController
This commit is contained in:
Chris Joe 2017-11-06 14:50:09 +13:00 committed by GitHub
commit 80ce526563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 9 deletions

View File

@ -4,9 +4,7 @@ use SilverStripe\CMS\Model\SiteTree;
class Page extends SiteTree
{
private static $db = array(
);
private static $db = [];
private static $has_one = array(
);
private static $has_one = [];
}

View File

@ -9,19 +9,17 @@ class PageController extends ContentController
* permissions or conditions required to allow the user to access it.
*
* <code>
* array (
* [
* 'action', // anyone can access this action
* 'action' => true, // same as above
* 'action' => 'ADMIN', // you must have ADMIN permissions to access this action
* 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
* );
* ];
* </code>
*
* @var array
*/
private static $allowed_actions = array(
);
private static $allowed_actions = [];
protected function init()
{