/** * @return Post * * @SuppressWarnings(PHPMD.StaticAccess) */ private function getRandomPost() { if ($this->posts === null) { $this->posts = Post::all(); } return $this->posts->random(); }
/** * @return User * * @SuppressWarnings(PHPMD.StaticAccess) */ protected function getRandomUser() { if ($this->users === null) { $this->users = User::all(); } return $this->users->random(); }
/** * @return Board * * @SuppressWarnings(PHPMD.StaticAccess) */ private function getRandomBoard() { if ($this->boards === null) { $this->boards = Board::all(); } return $this->boards->random(); }