repo
stringlengths
7
63
file_url
stringlengths
81
284
file_path
stringlengths
5
200
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:02:33
2026-01-05 05:24:06
truncated
bool
2 classes
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/ZipExportReader.php
app/Exports/ZipExports/ZipExportReader.php
<?php namespace BookStack\Exports\ZipExports; use BookStack\Exceptions\ZipExportException; use BookStack\Exports\ZipExports\Models\ZipExportBook; use BookStack\Exports\ZipExports\Models\ZipExportChapter; use BookStack\Exports\ZipExports\Models\ZipExportPage; use BookStack\Util\WebSafeMimeSniffer; use ZipArchive; cla...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/ZipExportFiles.php
app/Exports/ZipExports/ZipExportFiles.php
<?php namespace BookStack\Exports\ZipExports; use BookStack\Uploads\Attachment; use BookStack\Uploads\AttachmentService; use BookStack\Uploads\Image; use BookStack\Uploads\ImageService; use Illuminate\Support\Str; class ZipExportFiles { /** * References for attachments by attachment ID. * @var array<in...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/ZipFileReferenceRule.php
app/Exports/ZipExports/ZipFileReferenceRule.php
<?php namespace BookStack\Exports\ZipExports; use Closure; use Illuminate\Contracts\Validation\ValidationRule; class ZipFileReferenceRule implements ValidationRule { public function __construct( protected ZipValidationHelper $context, protected array $acceptedMimes, ) { } /** * ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/ZipValidationHelper.php
app/Exports/ZipExports/ZipValidationHelper.php
<?php namespace BookStack\Exports\ZipExports; use BookStack\Exports\ZipExports\Models\ZipExportModel; use Illuminate\Validation\Factory; class ZipValidationHelper { protected Factory $validationFactory; /** * Local store of validated IDs (in format "<type>:<id>". Example: "book:2") * which we can ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/ZipUniqueIdRule.php
app/Exports/ZipExports/ZipUniqueIdRule.php
<?php namespace BookStack\Exports\ZipExports; use Closure; use Illuminate\Contracts\Validation\ValidationRule; class ZipUniqueIdRule implements ValidationRule { public function __construct( protected ZipValidationHelper $context, protected string $modelType, ) { } /** * @inheri...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/ZipExportBuilder.php
app/Exports/ZipExports/ZipExportBuilder.php
<?php namespace BookStack\Exports\ZipExports; use BookStack\App\AppVersion; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Page; use BookStack\Exceptions\ZipExportException; use BookStack\Exports\ZipExports\Models\ZipExportBook; use BookStack\Exports\ZipExport...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/ZipReferenceParser.php
app/Exports/ZipExports/ZipReferenceParser.php
<?php namespace BookStack\Exports\ZipExports; use BookStack\App\Model; use BookStack\Entities\Queries\EntityQueries; use BookStack\References\ModelResolvers\AttachmentModelResolver; use BookStack\References\ModelResolvers\BookLinkModelResolver; use BookStack\References\ModelResolvers\ChapterLinkModelResolver; use Boo...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/ZipImportRunner.php
app/Exports/ZipExports/ZipImportRunner.php
<?php namespace BookStack\Exports\ZipExports; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Entity; use BookStack\Entities\Models\Page; use BookStack\Entities\Repos\BookRepo; use BookStack\Entities\Repos\ChapterRepo; use BookStack\Entities\Repos\PageRepo; use...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/ZipImportReferences.php
app/Exports/ZipExports/ZipImportReferences.php
<?php namespace BookStack\Exports\ZipExports; use BookStack\App\Model; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Entity; use BookStack\Entities\Models\Page; use BookStack\Entities\Repos\BaseRepo; use BookStack\Entities\Repos\PageRepo; use BookStack\Export...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/Models/ZipExportBook.php
app/Exports/ZipExports/Models/ZipExportBook.php
<?php namespace BookStack\Exports\ZipExports\Models; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Page; use BookStack\Exports\ZipExports\ZipExportFiles; use BookStack\Exports\ZipExports\ZipValidationHelper; final class ZipExportBook extends ZipExportModel {...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/Models/ZipExportImage.php
app/Exports/ZipExports/Models/ZipExportImage.php
<?php namespace BookStack\Exports\ZipExports\Models; use BookStack\Exports\ZipExports\ZipExportFiles; use BookStack\Exports\ZipExports\ZipValidationHelper; use BookStack\Uploads\Image; use Illuminate\Validation\Rule; final class ZipExportImage extends ZipExportModel { public ?int $id = null; public string $n...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/Models/ZipExportPage.php
app/Exports/ZipExports/Models/ZipExportPage.php
<?php namespace BookStack\Exports\ZipExports\Models; use BookStack\Entities\Models\Page; use BookStack\Entities\Tools\PageContent; use BookStack\Exports\ZipExports\ZipExportFiles; use BookStack\Exports\ZipExports\ZipValidationHelper; final class ZipExportPage extends ZipExportModel { public ?int $id = null; ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/Models/ZipExportAttachment.php
app/Exports/ZipExports/Models/ZipExportAttachment.php
<?php namespace BookStack\Exports\ZipExports\Models; use BookStack\Exports\ZipExports\ZipExportFiles; use BookStack\Exports\ZipExports\ZipValidationHelper; use BookStack\Uploads\Attachment; final class ZipExportAttachment extends ZipExportModel { public ?int $id = null; public string $name; public ?strin...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/Models/ZipExportChapter.php
app/Exports/ZipExports/Models/ZipExportChapter.php
<?php namespace BookStack\Exports\ZipExports\Models; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Page; use BookStack\Exports\ZipExports\ZipExportFiles; use BookStack\Exports\ZipExports\ZipValidationHelper; final class ZipExportChapter extends ZipExportModel { public ?int $id = null; ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/Models/ZipExportModel.php
app/Exports/ZipExports/Models/ZipExportModel.php
<?php namespace BookStack\Exports\ZipExports\Models; use BookStack\Exports\ZipExports\ZipValidationHelper; use JsonSerializable; abstract class ZipExportModel implements JsonSerializable { /** * Handle the serialization to JSON. * For these exports, we filter out optional (represented as nullable) fiel...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Exports/ZipExports/Models/ZipExportTag.php
app/Exports/ZipExports/Models/ZipExportTag.php
<?php namespace BookStack\Exports\ZipExports\Models; use BookStack\Activity\Models\Tag; use BookStack\Exports\ZipExports\ZipValidationHelper; final class ZipExportTag extends ZipExportModel { public string $name; public ?string $value = null; public function metadataOnly(): void { $this->val...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ReferenceChangeContext.php
app/References/ReferenceChangeContext.php
<?php namespace BookStack\References; use BookStack\Entities\Models\Entity; class ReferenceChangeContext { /** * Entity pairs where the first is the old entity and the second is the new entity. * @var array<array{0: Entity, 1: Entity}> */ protected array $changes = []; public function add...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ReferenceStore.php
app/References/ReferenceStore.php
<?php namespace BookStack\References; use BookStack\Entities\EntityProvider; use BookStack\Entities\Models\Entity; use Illuminate\Database\Eloquent\Collection; class ReferenceStore { public function __construct( protected EntityProvider $entityProvider ) { } /** * Update the outgoing re...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ReferenceUpdater.php
app/References/ReferenceUpdater.php
<?php namespace BookStack\References; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\HasDescriptionInterface; use BookStack\Entities\Models\Entity; use BookStack\Entities\Models\Page; use BookStack\Entities\Repos\RevisionRepo; use BookStack\Util\HtmlDocument; class ReferenceUpdater { public fu...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/Reference.php
app/References/Reference.php
<?php namespace BookStack\References; use BookStack\Permissions\Models\JointPermission; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\MorphTo; /** * @property int $from_id * @property string $from_type * @property int $...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ReferenceFetcher.php
app/References/ReferenceFetcher.php
<?php namespace BookStack\References; use BookStack\Entities\Models\Entity; use BookStack\Entities\Tools\MixedEntityListLoader; use BookStack\Permissions\PermissionApplicator; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; class ReferenceFetcher { public function __constru...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/CrossLinkParser.php
app/References/CrossLinkParser.php
<?php namespace BookStack\References; use BookStack\App\Model; use BookStack\Entities\Queries\EntityQueries; use BookStack\References\ModelResolvers\BookLinkModelResolver; use BookStack\References\ModelResolvers\BookshelfLinkModelResolver; use BookStack\References\ModelResolvers\ChapterLinkModelResolver; use BookStac...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ReferenceController.php
app/References/ReferenceController.php
<?php namespace BookStack\References; use BookStack\Entities\Queries\EntityQueries; use BookStack\Http\Controller; class ReferenceController extends Controller { public function __construct( protected ReferenceFetcher $referenceFetcher, protected EntityQueries $queries, ) { } /** ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ModelResolvers/PagePermalinkModelResolver.php
app/References/ModelResolvers/PagePermalinkModelResolver.php
<?php namespace BookStack\References\ModelResolvers; use BookStack\App\Model; use BookStack\Entities\Models\Page; use BookStack\Entities\Queries\PageQueries; class PagePermalinkModelResolver implements CrossLinkModelResolver { public function __construct( protected PageQueries $queries ) { } ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ModelResolvers/CrossLinkModelResolver.php
app/References/ModelResolvers/CrossLinkModelResolver.php
<?php namespace BookStack\References\ModelResolvers; use BookStack\App\Model; interface CrossLinkModelResolver { /** * Resolve the given href link value to a model. */ public function resolve(string $link): ?Model; }
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ModelResolvers/BookLinkModelResolver.php
app/References/ModelResolvers/BookLinkModelResolver.php
<?php namespace BookStack\References\ModelResolvers; use BookStack\App\Model; use BookStack\Entities\Models\Book; use BookStack\Entities\Queries\BookQueries; class BookLinkModelResolver implements CrossLinkModelResolver { public function __construct( protected BookQueries $queries ) { } publ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ModelResolvers/PageLinkModelResolver.php
app/References/ModelResolvers/PageLinkModelResolver.php
<?php namespace BookStack\References\ModelResolvers; use BookStack\App\Model; use BookStack\Entities\Models\Page; use BookStack\Entities\Queries\PageQueries; class PageLinkModelResolver implements CrossLinkModelResolver { public function __construct( protected PageQueries $queries ) { } publ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ModelResolvers/AttachmentModelResolver.php
app/References/ModelResolvers/AttachmentModelResolver.php
<?php namespace BookStack\References\ModelResolvers; use BookStack\Uploads\Attachment; class AttachmentModelResolver implements CrossLinkModelResolver { public function resolve(string $link): ?Attachment { $pattern = '/^' . preg_quote(url('/attachments'), '/') . '\/(\d+)/'; $matches = []; ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ModelResolvers/ImageModelResolver.php
app/References/ModelResolvers/ImageModelResolver.php
<?php namespace BookStack\References\ModelResolvers; use BookStack\Uploads\Image; use BookStack\Uploads\ImageStorage; class ImageModelResolver implements CrossLinkModelResolver { protected ?string $pattern = null; public function resolve(string $link): ?Image { $pattern = $this->getUrlPattern();...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ModelResolvers/ChapterLinkModelResolver.php
app/References/ModelResolvers/ChapterLinkModelResolver.php
<?php namespace BookStack\References\ModelResolvers; use BookStack\App\Model; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Queries\ChapterQueries; class ChapterLinkModelResolver implements CrossLinkModelResolver { public function __construct( protected ChapterQueries $queries ) { ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/References/ModelResolvers/BookshelfLinkModelResolver.php
app/References/ModelResolvers/BookshelfLinkModelResolver.php
<?php namespace BookStack\References\ModelResolvers; use BookStack\App\Model; use BookStack\Entities\Models\Bookshelf; use BookStack\Entities\Queries\BookshelfQueries; class BookshelfLinkModelResolver implements CrossLinkModelResolver { public function __construct( protected BookshelfQueries $queries ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/PwaManifestBuilder.php
app/App/PwaManifestBuilder.php
<?php namespace BookStack\App; class PwaManifestBuilder { public function build(): array { // Note, while we attempt to use the user's preference here, the request to the manifest // does not start a session, so we won't have current user context. // This was attempted but removed sinc...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/SluggableInterface.php
app/App/SluggableInterface.php
<?php namespace BookStack\App; /** * Assigned to models that can have slugs. * Must have the below properties. * * @property string $slug */ interface SluggableInterface { }
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/MailNotification.php
app/App/MailNotification.php
<?php namespace BookStack\App; use BookStack\Translation\LocaleDefinition; use BookStack\Users\Models\User; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; abstract class MailNotification extends N...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/Application.php
app/App/Application.php
<?php namespace BookStack\App; class Application extends \Illuminate\Foundation\Application { /** * Get the path to the application configuration files. * * @param string $path Optionally, a path to append to the config path * * @return string */ public function configPath($path ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/helpers.php
app/App/helpers.php
<?php use BookStack\App\AppVersion; use BookStack\App\Model; use BookStack\Facades\Theme; use BookStack\Permissions\Permission; use BookStack\Permissions\PermissionApplicator; use BookStack\Settings\SettingService; use BookStack\Users\Models\User; /** * Get the path to a versioned file. * * @throws Exception */ f...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/SystemApiController.php
app/App/SystemApiController.php
<?php namespace BookStack\App; use BookStack\Http\ApiController; use Illuminate\Http\JsonResponse; class SystemApiController extends ApiController { /** * Read details regarding the BookStack instance. * Some details may be null where not set, like the app logo for example. */ public function ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/HomeController.php
app/App/HomeController.php
<?php namespace BookStack\App; use BookStack\Activity\ActivityQueries; use BookStack\Entities\Models\Page; use BookStack\Entities\Queries\EntityQueries; use BookStack\Entities\Queries\QueryRecentlyViewed; use BookStack\Entities\Queries\QueryTopFavourites; use BookStack\Entities\Tools\PageContent; use BookStack\Http\C...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/MetaController.php
app/App/MetaController.php
<?php namespace BookStack\App; use BookStack\Http\Controller; use BookStack\Uploads\FaviconHandler; class MetaController extends Controller { /** * Show the view for /robots.txt. */ public function robots() { $sitePublic = setting('app-public', false); $allowRobots = config('app...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/Model.php
app/App/Model.php
<?php namespace BookStack\App; use Illuminate\Database\Eloquent\Model as EloquentModel; class Model extends EloquentModel { /** * Provides public access to get the raw attribute value from the model. * Used in areas where no mutations are required, but performance is critical. * * @return mix...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/AppVersion.php
app/App/AppVersion.php
<?php namespace BookStack\App; class AppVersion { protected static string $version = ''; /** * Get the application's version number from its top-level `version` text file. */ public static function get(): string { if (!empty(static::$version)) { return static::$version; ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/Providers/TranslationServiceProvider.php
app/App/Providers/TranslationServiceProvider.php
<?php namespace BookStack\App\Providers; use BookStack\Translation\FileLoader; use BookStack\Translation\MessageSelector; use Illuminate\Translation\TranslationServiceProvider as BaseProvider; use Illuminate\Translation\Translator; class TranslationServiceProvider extends BaseProvider { /** * Register the s...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/Providers/ViewTweaksServiceProvider.php
app/App/Providers/ViewTweaksServiceProvider.php
<?php namespace BookStack\App\Providers; use BookStack\Entities\BreadcrumbsViewComposer; use BookStack\Util\DateFormatter; use Illuminate\Pagination\Paginator; use Illuminate\Support\Facades\Blade; use Illuminate\Support\Facades\View; use Illuminate\Support\ServiceProvider; class ViewTweaksServiceProvider extends Se...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/Providers/ThemeServiceProvider.php
app/App/Providers/ThemeServiceProvider.php
<?php namespace BookStack\App\Providers; use BookStack\Theming\ThemeEvents; use BookStack\Theming\ThemeService; use Illuminate\Support\ServiceProvider; class ThemeServiceProvider extends ServiceProvider { /** * Register services. */ public function register(): void { // Register the The...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/Providers/RouteServiceProvider.php
app/App/Providers/RouteServiceProvider.php
<?php namespace BookStack\App\Providers; use BookStack\Facades\Theme; use BookStack\Theming\ThemeEvents; use Illuminate\Cache\RateLimiting\Limit; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Http\Request; use Illuminate\Routing\Router; use Illuminate\Support\Faca...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/Providers/EventServiceProvider.php
app/App/Providers/EventServiceProvider.php
<?php namespace BookStack\App\Providers; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use SocialiteProviders\Azure\AzureExtendSocialite; use SocialiteProviders\Discord\DiscordExtendSocialite; use SocialiteProviders\GitLab\GitLabExtendSocialite; use SocialiteProviders\Manager\So...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/Providers/ValidationRuleServiceProvider.php
app/App/Providers/ValidationRuleServiceProvider.php
<?php namespace BookStack\App\Providers; use BookStack\Uploads\ImageService; use Illuminate\Support\Facades\Validator; use Illuminate\Support\ServiceProvider; class ValidationRuleServiceProvider extends ServiceProvider { /** * Register our custom validation rules when the application boots. */ publ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/Providers/AppServiceProvider.php
app/App/Providers/AppServiceProvider.php
<?php namespace BookStack\App\Providers; use BookStack\Access\SocialDriverManager; use BookStack\Activity\Models\Comment; use BookStack\Activity\Tools\ActivityLogger; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\Bookshelf; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Page;...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/App/Providers/AuthServiceProvider.php
app/App/Providers/AuthServiceProvider.php
<?php namespace BookStack\App\Providers; use BookStack\Access\ExternalBaseUserProvider; use BookStack\Access\Guards\AsyncExternalBaseSessionGuard; use BookStack\Access\Guards\LdapSessionGuard; use BookStack\Access\LdapService; use BookStack\Access\LoginService; use BookStack\Access\RegistrationService; use BookStack\...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Sorting/BookSorter.php
app/Sorting/BookSorter.php
<?php namespace BookStack\Sorting; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\BookChild; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Entity; use BookStack\Entities\Models\Page; use BookStack\Entities\Queries\EntityQueries; use BookStack\Entities\Tools\ParentChanger; use...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Sorting/BookSortController.php
app/Sorting/BookSortController.php
<?php namespace BookStack\Sorting; use BookStack\Activity\ActivityType; use BookStack\Entities\Queries\BookQueries; use BookStack\Entities\Tools\BookContents; use BookStack\Facades\Activity; use BookStack\Http\Controller; use BookStack\Permissions\Permission; use BookStack\Util\DatabaseTransaction; use Illuminate\Htt...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Sorting/SortUrl.php
app/Sorting/SortUrl.php
<?php namespace BookStack\Sorting; /** * Generate a URL with multiple parameters for sorting purposes. * Works out the logic to set the correct sorting direction * Discards empty parameters and allows overriding. */ class SortUrl { public function __construct( protected string $path, protected...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Sorting/SortRuleController.php
app/Sorting/SortRuleController.php
<?php namespace BookStack\Sorting; use BookStack\Activity\ActivityType; use BookStack\Entities\Models\EntityContainerData; use BookStack\Http\Controller; use BookStack\Permissions\Permission; use Illuminate\Http\Request; class SortRuleController extends Controller { public function __construct() { $t...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Sorting/SortRuleOperation.php
app/Sorting/SortRuleOperation.php
<?php namespace BookStack\Sorting; use Closure; use Illuminate\Support\Str; enum SortRuleOperation: string { case NameAsc = 'name_asc'; case NameDesc = 'name_desc'; case NameNumericAsc = 'name_numeric_asc'; case NameNumericDesc = 'name_numeric_desc'; case CreatedDateAsc = 'created_date_asc'; ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Sorting/SortSetOperationComparisons.php
app/Sorting/SortSetOperationComparisons.php
<?php namespace BookStack\Sorting; use voku\helper\ASCII; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Entity; /** * Sort comparison function for each of the possible SortSetOperation values. * Method names should be camelCase names for the SortSetOperation enum value. */ class SortSetOper...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Sorting/BookSortMapItem.php
app/Sorting/BookSortMapItem.php
<?php namespace BookStack\Sorting; class BookSortMapItem { /** * @var int */ public $id; /** * @var int */ public $sort; /** * @var ?int */ public $parentChapterId; /** * @var string */ public $type; /** * @var int */ public...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Sorting/SortRule.php
app/Sorting/SortRule.php
<?php namespace BookStack\Sorting; use BookStack\Activity\Models\Loggable; use BookStack\Entities\Models\Book; use Carbon\Carbon; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMa...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Sorting/BookSortMap.php
app/Sorting/BookSortMap.php
<?php namespace BookStack\Sorting; class BookSortMap { /** * @var BookSortMapItem[] */ protected $mapData = []; public function addItem(BookSortMapItem $mapItem): void { $this->mapData[] = $mapItem; } /** * @return BookSortMapItem[] */ public function all(): a...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Settings/MaintenanceController.php
app/Settings/MaintenanceController.php
<?php namespace BookStack\Settings; use BookStack\Activity\ActivityType; use BookStack\App\AppVersion; use BookStack\Entities\Tools\TrashCan; use BookStack\Http\Controller; use BookStack\Permissions\Permission; use BookStack\References\ReferenceStore; use BookStack\Uploads\ImageService; use Illuminate\Http\Request; ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Settings/UserNotificationPreferences.php
app/Settings/UserNotificationPreferences.php
<?php namespace BookStack\Settings; use BookStack\Users\Models\User; class UserNotificationPreferences { public function __construct( protected User $user ) { } public function notifyOnOwnPageChanges(): bool { return $this->getNotificationSetting('own-page-changes'); } p...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Settings/StatusController.php
app/Settings/StatusController.php
<?php namespace BookStack\Settings; use BookStack\Http\Controller; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Session; use Illuminate\Support\Str; class StatusController extends Controller { /** * Show the system status as a simple json page. ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Settings/SettingController.php
app/Settings/SettingController.php
<?php namespace BookStack\Settings; use BookStack\Activity\ActivityType; use BookStack\App\AppVersion; use BookStack\Http\Controller; use BookStack\Permissions\Permission; use BookStack\Users\Models\User; use Illuminate\Http\Request; class SettingController extends Controller { /** * Handle requests to the ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Settings/UserShortcutMap.php
app/Settings/UserShortcutMap.php
<?php namespace BookStack\Settings; class UserShortcutMap { protected const DEFAULTS = [ // Header actions "home_view" => "1", "shelves_view" => "2", "books_view" => "3", "settings_view" => "4", "favourites_view" => "5", "profile_view" => "6", "globa...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Settings/SettingService.php
app/Settings/SettingService.php
<?php namespace BookStack\Settings; use BookStack\Users\Models\User; /** * Class SettingService * The settings are a simple key-value database store. * For non-authenticated users, user settings are stored via the session instead. * A local array-based cache is used to for setting accesses across a request. */ ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Settings/AppSettingsStore.php
app/Settings/AppSettingsStore.php
<?php namespace BookStack\Settings; use BookStack\Uploads\FaviconHandler; use BookStack\Uploads\ImageRepo; use Illuminate\Http\Request; class AppSettingsStore { public function __construct( protected ImageRepo $imageRepo, protected FaviconHandler $faviconHandler, ) { } public functio...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Settings/TestEmailNotification.php
app/Settings/TestEmailNotification.php
<?php namespace BookStack\Settings; use BookStack\App\MailNotification; use BookStack\Users\Models\User; use Illuminate\Notifications\Messages\MailMessage; class TestEmailNotification extends MailNotification { public function toMail(User $notifiable): MailMessage { return $this->newMailMessage() ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/app/Settings/Setting.php
app/Settings/Setting.php
<?php namespace BookStack\Settings; use BookStack\App\Model; class Setting extends Model { protected $fillable = ['setting_key', 'value']; protected $primaryKey = 'setting_key'; }
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/dev/licensing/gen-licenses-shared.php
dev/licensing/gen-licenses-shared.php
<?php declare(strict_types=1); $warnings = []; function findLicenseFile(string $packageName, string $packagePath): string { $licenseNameOptions = [ 'license', 'LICENSE', 'License', 'license.*', 'LICENSE.*', 'License.*', 'license-*.*', 'LICENSE-*.*', 'License-*.*', ]; $packageDir =...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/bootstrap/app.php
bootstrap/app.php
<?php /* |-------------------------------------------------------------------------- | Create The Application |-------------------------------------------------------------------------- | | The first thing we will do is create a new Laravel application instance | which serves as the "glue" for all the components of La...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/bootstrap/phpstan.php
bootstrap/phpstan.php
<?php // Overwrite configuration that can interfere with the phpstan/larastan scanning. config()->set([ 'filesystems.default' => 'local', ]);
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/ErrorTest.php
tests/ErrorTest.php
<?php namespace Tests; use Illuminate\Foundation\Http\Middleware\ValidatePostSize; use Illuminate\Support\Facades\Log; class ErrorTest extends TestCase { public function test_404_page_does_not_show_login() { // Due to middleware being handled differently this will not fail // if our custom, m...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/DebugViewTest.php
tests/DebugViewTest.php
<?php namespace Tests; use BookStack\Access\SocialDriverManager; use Illuminate\Testing\TestResponse; class DebugViewTest extends TestCase { public function test_debug_view_shows_expected_details() { config()->set('app.debug', true); $resp = $this->getDebugViewForException(new \InvalidArgumen...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/SessionTest.php
tests/SessionTest.php
<?php namespace Tests; class SessionTest extends TestCase { public function test_secure_images_not_tracked_in_session_history() { config()->set('filesystems.images', 'local_secure'); $this->asEditor(); $page = $this->entities->page(); $result = $this->files->uploadGalleryImageT...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/LanguageTest.php
tests/LanguageTest.php
<?php namespace Tests; use BookStack\Activity\ActivityType; use BookStack\Translation\LocaleManager; class LanguageTest extends TestCase { protected array $langs; /** * LanguageTest constructor. */ protected function setUp(): void { parent::setUp(); $this->langs = array_dif...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/HomepageTest.php
tests/HomepageTest.php
<?php namespace Tests; use BookStack\Users\Models\Role; use BookStack\Users\Models\User; class HomepageTest extends TestCase { public function test_default_homepage_visible() { $this->asEditor(); $homeVisit = $this->get('/'); $homeVisit->assertSee('My Recently Viewed'); $homeV...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/TestCase.php
tests/TestCase.php
<?php namespace Tests; use BookStack\Entities\Models\Entity; use BookStack\Http\HttpClientHistory; use BookStack\Http\HttpRequestService; use BookStack\Settings\SettingService; use Exception; use Illuminate\Contracts\Console\Kernel; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Tes...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/CreatesApplication.php
tests/CreatesApplication.php
<?php namespace Tests; use Illuminate\Contracts\Console\Kernel; use Illuminate\Foundation\Application; trait CreatesApplication { /** * Creates the application. */ public function createApplication(): Application { $app = require __DIR__ . '/../bootstrap/app.php'; $app->make(Ker...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/FavouriteTest.php
tests/FavouriteTest.php
<?php namespace Tests; use BookStack\Activity\Models\Favourite; use BookStack\Users\Models\User; class FavouriteTest extends TestCase { public function test_page_add_favourite_flow() { $page = $this->entities->page(); $editor = $this->users->editor(); $resp = $this->actingAs($editor)...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/StatusTest.php
tests/StatusTest.php
<?php namespace Tests; use Exception; use Illuminate\Cache\ArrayStore; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Session; use Mockery; class StatusTest extends TestCase { public function test_returns_json_with_expected_results() { $resp = ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/UrlTest.php
tests/UrlTest.php
<?php namespace Tests; use BookStack\Http\Request; class UrlTest extends TestCase { public function test_url_helper_takes_custom_url_into_account() { $this->runWithEnv(['APP_URL' => 'http://example.com/bookstack'], function () { $this->assertEquals('http://example.com/bookstack/books', ur...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/ThemeTest.php
tests/ThemeTest.php
<?php namespace Tests; use BookStack\Activity\ActivityType; use BookStack\Activity\DispatchWebhookJob; use BookStack\Activity\Models\Webhook; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\Page; use BookStack\Entities\Tools\PageContent; use BookStack\Exceptions\ThemeException; use BookStack\Facades...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/PublicActionTest.php
tests/PublicActionTest.php
<?php namespace Tests; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\Chapter; use BookStack\Permissions\Models\RolePermission; use BookStack\Users\Models\Role; use BookStack\Users\Models\User; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\View; class PublicActionTest extends...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/SecurityHeaderTest.php
tests/SecurityHeaderTest.php
<?php namespace Tests; use BookStack\Util\CspService; use Illuminate\Testing\TestResponse; class SecurityHeaderTest extends TestCase { public function test_cookies_samesite_lax_by_default() { $resp = $this->get('/'); foreach ($resp->headers->getCookies() as $cookie) { $this->asser...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Meta/RobotsTest.php
tests/Meta/RobotsTest.php
<?php namespace Tests\Meta; use Tests\TestCase; class RobotsTest extends TestCase { public function test_robots_effected_by_public_status() { $this->get('/robots.txt')->assertSee("User-agent: *\nDisallow: /"); $this->setSettings(['app-public' => 'true']); $resp = $this->get('/robots...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Meta/OpensearchTest.php
tests/Meta/OpensearchTest.php
<?php namespace Tests\Meta; use Tests\TestCase; class OpensearchTest extends TestCase { public function test_opensearch_endpoint() { $appName = 'MyAppNameThatsReallyLongLikeThis'; setting()->put('app-name', $appName); $resultUrl = url('/search') . '?term={searchTerms}'; $selfU...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Meta/PwaManifestTest.php
tests/Meta/PwaManifestTest.php
<?php namespace Tests\Meta; use Tests\TestCase; class PwaManifestTest extends TestCase { public function test_manifest_access_and_format() { $this->setSettings(['app-color' => '#00ACED']); $resp = $this->get('/manifest.json'); $resp->assertOk(); $resp->assertJson([ ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Meta/HelpTest.php
tests/Meta/HelpTest.php
<?php namespace Tests\Meta; use Tests\TestCase; class HelpTest extends TestCase { public function test_tinymce_help_shows_tiny_and_tiny_license_link() { $resp = $this->get('/help/tinymce'); $resp->assertOk(); $this->withHtml($resp)->assertElementExists('a[href="https://www.tiny.cloud/...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Meta/OpenGraphTest.php
tests/Meta/OpenGraphTest.php
<?php namespace Tests\Meta; use BookStack\Entities\Repos\BaseRepo; use BookStack\Entities\Repos\BookRepo; use Illuminate\Support\Str; use Illuminate\Testing\TestResponse; use Tests\TestCase; class OpenGraphTest extends TestCase { public function test_page_tags() { $page = $this->entities->page(); ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Meta/LicensesTest.php
tests/Meta/LicensesTest.php
<?php namespace Tests\Meta; use Tests\TestCase; class LicensesTest extends TestCase { public function test_licenses_endpoint() { $resp = $this->get('/licenses'); $resp->assertOk(); $resp->assertSee('Licenses'); $resp->assertSee('PHP Library Licenses'); $resp->assertSee...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Helpers/EntityProvider.php
tests/Helpers/EntityProvider.php
<?php namespace Tests\Helpers; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\Bookshelf; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Entity; use BookStack\Entities\Models\Page; use BookStack\Entities\Repos\BookRepo; use BookStack\Entities\Repos\BookshelfRepo; use BookStack\...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Helpers/OidcJwtHelper.php
tests/Helpers/OidcJwtHelper.php
<?php namespace Tests\Helpers; use phpseclib3\Crypt\RSA; /** * A collection of functions to help with OIDC JWT testing. * By default, unless overridden, content is provided in a correct working state. */ class OidcJwtHelper { public static function defaultIssuer(): string { return 'https://auth.ex...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Helpers/TestServiceProvider.php
tests/Helpers/TestServiceProvider.php
<?php namespace Tests\Helpers; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\ParallelTesting; use Illuminate\Support\ServiceProvider; class TestServiceProvider extends ServiceProvider { /** * Bootstrap services. * * @return void */ public function boot() { ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Helpers/PermissionsProvider.php
tests/Helpers/PermissionsProvider.php
<?php namespace Tests\Helpers; use BookStack\Entities\Models\Entity; use BookStack\Permissions\Models\EntityPermission; use BookStack\Permissions\Models\RolePermission; use BookStack\Permissions\Permission; use BookStack\Settings\SettingService; use BookStack\Users\Models\Role; use BookStack\Users\Models\User; class...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Helpers/UserRoleProvider.php
tests/Helpers/UserRoleProvider.php
<?php namespace Tests\Helpers; use BookStack\Permissions\PermissionsRepo; use BookStack\Users\Models\Role; use BookStack\Users\Models\User; class UserRoleProvider { protected ?User $admin = null; protected ?User $editor = null; /** * Get a typical "Admin" user. */ public function admin(): ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Helpers/FileProvider.php
tests/Helpers/FileProvider.php
<?php namespace Tests\Helpers; use BookStack\Entities\Models\Page; use BookStack\Uploads\Attachment; use BookStack\Uploads\AttachmentService; use Illuminate\Http\UploadedFile; use Illuminate\Testing\TestResponse; use stdClass; use Tests\TestCase; class FileProvider { /** * Get the path to a file in the test...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Entity/TagTest.php
tests/Entity/TagTest.php
<?php namespace Tests\Entity; use BookStack\Activity\Models\Tag; use BookStack\Entities\Models\Entity; use BookStack\Entities\Models\Page; use Tests\TestCase; class TagTest extends TestCase { protected int $defaultTagCount = 20; /** * Get an instance of a page that has many tags. */ protected ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Entity/ChapterTest.php
tests/Entity/ChapterTest.php
<?php namespace Tests\Entity; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Page; use Tests\TestCase; class ChapterTest extends TestCase { public function test_create() { $book = $this->entities->book(); $chapter = Chapter::factory()...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Entity/PageTemplateTest.php
tests/Entity/PageTemplateTest.php
<?php namespace Tests\Entity; use BookStack\Entities\Models\Page; use Tests\TestCase; class PageTemplateTest extends TestCase { public function test_active_templates_visible_on_page_view() { $page = $this->entities->page(); $this->asEditor(); $templateView = $this->get($page->getUrl(...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Entity/PageDraftTest.php
tests/Entity/PageDraftTest.php
<?php namespace Tests\Entity; use BookStack\Entities\Models\Page; use BookStack\Entities\Models\PageRevision; use BookStack\Entities\Repos\PageRepo; use Tests\TestCase; class PageDraftTest extends TestCase { protected Page $page; protected PageRepo $pageRepo; protected function setUp(): void { ...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false
BookStackApp/BookStack
https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Entity/SlugTest.php
tests/Entity/SlugTest.php
<?php namespace Tests\Entity; use BookStack\Entities\Models\SlugHistory; use Tests\TestCase; class SlugTest extends TestCase { public function test_slug_multi_byte_url_safe() { $book = $this->entities->newBook([ 'name' => 'информация', ]); $this->assertEquals('informaciia...
php
MIT
e6b754fad029d6c35e139b907d04e6510775997b
2026-01-04T15:02:34.418809Z
false