@return Board

@SuppressWarnings(PHPMD.StaticAccess)
180301
private function getRandomBoard()
    {
        if ($this->boards === null) {
            $this->boards = Board::all();
        }

        return $this->boards->random();
    }
1100952
protected function grid()
    {
        return Merchant::grid(Role::class, function (Grid $grid) {
            $grid->id('ID')->sortable();
            $grid->slug(trans('merchant.slug'));
            $grid->name(trans('merchant.name'));

            $grid->permissions(trans('merchant.permission'))->pluck('name')->label();

            $grid->created_at(trans('merchant.created_at'));
            $grid->updated_at(trans('merchant.updated_at'));

            $grid->actions(function (Grid\Displayers\Actions $actions) {
                if ($actions->row->slug == 'administrator') {
                    $actions->disableDelete();
                }
            });

            $grid->tools(function (Grid\Tools $tools) {
                $tools->batch(function (Grid\Tools\BatchActions $actions) {
                    $actions->disableDelete();
                });
            });
        });
    }
640655
def boards
      boards = Board.from_response client.get("/organizations/#{id}/boards/all")
      MultiAssociation.new(self, boards).proxy
    end
1316792
private function loadDashboardCards()
	{
		// Fetch all the dashboard cards for the current user
		$model = UserMetadata::model()->getPrototype('UserMetadata', array(
		             'user_id' => $this->user->id,
		             'key' => 'dashboard_cards'
		         ), array('value' => '{}'));

		$model->value = CJSON::decode($model->value);

		return $model;
	}
48047
public function build()
    {
        $stream = new Stream('php://temp', 'wb+');


        $stream->write(json_encode(new MessageDecorator($this->getMessage())));

        return $this->getHttpMessage()
            ->withAddedHeader('Content-Type', 'application/json')
            ->withBody($stream);
    }
1217466
protected function grid()
    {
        return Administrator::grid(function (Grid $grid) {
            $grid->model()->where('merchant_id', auth('merchant')->user()->merchant_id);
            $grid->mobile(trans('merchant.mobile'));
            $grid->name(trans('merchant.name'));
            $grid->roles(trans('merchant.roles'))->pluck('name')->label();
            $grid->created_at(trans('merchant.created_at'));
            $grid->updated_at(trans('merchant.updated_at'));

            $grid->actions(function (Grid\Displayers\Actions $actions)use($grid) {
                if (Administrator::find($actions->getKey())->user_type) {
                    $actions->disableDelete();}
            });

            $grid->tools(function (Grid\Tools $tools) {
                $tools->batch(function (Grid\Tools\BatchActions $actions) {
                    $actions->disableDelete();
                });
            });
        });
    }
529907
public function setBoard(array $board)
    {
        if (empty($board)) {
            return false;
        }

        // is not associative array and total size of array is not the same as board size then invalidate board
        if (($boardSize = count($board, COUNT_RECURSIVE)) == count($board) && $boardSize != pow($this->size, 2)) {
            return false;
        }

        // if not associative then set the boar as one
        if (count($board, COUNT_RECURSIVE) == count($board)) {
            $this->board = array_chunk($board, $this->size);
        } else {
            $this->board = $board;
        }

        // if distinct values is greater than 2 then invalidate board
        $boardDistinctValues = array_unique(array_filter(array_reduce($this->board, 'array_merge', [])));
        if (count($boardDistinctValues) > 2) {
            return false;
        }

        return $this->board;
    }
1103786
public function getLeaderboardTypeMapper()
    {
        if (null === $this->leaderboardType) {
            $this->leaderboardType = $this->serviceLocator->get(
                'playgroundreward_learderboardtype_mapper'
            );
        }

        return $this->leaderboardType;
    }
436477
public function getBoard($id, array $params = array())
    {
        return $this->get($this->getPath().'/'.rawurlencode($id).'/board', $params);
    }
624436
public static function get()
    {
        return FlexMessageBuilder::builder()
            ->setAltText('Restaurant')
            ->setContents(
                BubbleContainerBuilder::builder()
                    ->setHero(self::createHeroBlock())
                    ->setBody(self::createBodyBlock())
                    ->setFooter(self::createFooterBlock())
            );
    }
402650
public function getFoot() {
		if ($this->_foot === null) {
			$this->_foot = new TablePart();
			$this->_foot->setTag(self::TAG_FOOT);
		}
		
		return $this->_foot;
	}
1372745
function mapBoard(board, func) {
    return board.map(function (col) {
        return col.map(function (p) {
            return func(p);
        });
    });
}
374087
public function pins($boardId, $limit = Pagination::DEFAULT_LIMIT)
    {
        return $this->paginate(
            UrlBuilder::RESOURCE_GET_BOARD_FEED, ['board_id' => $boardId], $limit
        );
    }
1021667
private function getDefaultDashboard()
    {
        $defaultLayout = $this->dashboard->getDefaultLayout();
        $defaultLayout = $this->dashboard->decodeLayout($defaultLayout);
        $defaultDashboard = array('name' => Piwik::translate('Dashboard_Dashboard'), 'layout' => $defaultLayout, 'iddashboard' => 1);

        $widgets = $this->getVisibleWidgetsWithinDashboard($defaultDashboard);

        return $this->buildDashboard($defaultDashboard, $widgets);
    }
611314
protected function _prepareLayout()
    {
        parent::_prepareLayout();

        $tag = $this->getTag();
        if (!$tag) {
            return $this;
        }

        $this->pageConfig->getTitle()->set(__('Tag: %1', $tag->getName()));

        if ($tag && ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs'))) {
            $breadcrumbs->addCrumb('home', [
                'label' => __('Home'),
                'title' => __('Go to Home Page'),
                'link'  => $this->context->getUrlBuilder()->getBaseUrl(),
            ]);

            $breadcrumbs->addCrumb('blog', [
                'label' => __('Blog'),
                'title' => __('Blog'),
            ]);

            $breadcrumbs->addCrumb($tag->getId(), [
                'label' => __('Tag: %1', $tag->getName()),
                'title' => __('Tag: %1', $tag->getName()),
            ]);
        }

        return $this;
    }
604759
def root(self: BoardT) -> BoardT:
        """"""
        if self._stack:
            board = type(self)(None, chess960=self.chess960)
            self._stack[0].restore(board)
            return board
        else:
            return self.copy(stack=False)
495811
def new_board(self, name):
        """"""
        char = self.engine.character[name]
        board = Board(character=char)
        self.mainscreen.boards[name] = board
        self.character = char