.phpunit.result.cache
.DS_Store
phpstan.neon
-esbuild-meta.json
\ No newline at end of file
+esbuild-meta.json
+.phpactor.json
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\MorphTo;
+use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
/**
// Get all img elements with image data blobs
$imageNodes = $doc->queryXPath('//img[contains(@src, \'data:image\')]');
+ /** @var DOMElement $imageNode */
foreach ($imageNodes as $imageNode) {
$imageSrc = $imageNode->getAttribute('src');
$newUrl = $this->base64ImageUriToUploadedImageUrl($imageSrc, $updater);
$includeTags = [];
/** @var DOMNode $node */
- /** @var DOMNode $childNode */
foreach ($includeHosts as $node) {
+ /** @var DOMNode $childNode */
foreach ($node->childNodes as $childNode) {
if ($childNode->nodeName === '#text') {
array_push($includeTags, ...$this->splitTextNodesAtTags($childNode));
$parentNode->parentNode->insertBefore($parentClone, $parentNode);
$parentClone->removeAttribute('id');
- /** @var DOMNode $child */
for ($i = 0; $i < $splitPos; $i++) {
+ /** @var DOMNode $child */
$child = $children[$i];
$parentClone->appendChild($child);
}
use Illuminate\Http\Exceptions\PostTooLargeException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
+use Illuminate\Http\Response;
use Illuminate\Validation\ValidationException;
use Symfony\Component\ErrorHandler\Error\FatalError;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
* If it returns a response, that will be provided back to the request
* upon an out of memory event.
*
- * @var ?callable<?\Illuminate\Http\Response>
+ * @var ?callable(): ?Response
*/
protected $onOutOfMemory = null;
/**
* Checks if an entity has a restriction set upon it.
*
- * @param HasCreatorAndUpdater|HasOwner $ownable
+ * @param Model&(HasCreatorAndUpdater|HasOwner) $ownable
*/
public function checkOwnableUserAccess(Model $ownable, string $permission): bool
{
$joinQuery = function ($query) use ($entityProvider) {
$first = true;
- /** @var Builder $query */
foreach ($entityProvider->all() as $entity) {
+ /** @var Builder $query */
$entityQuery = function ($query) use ($entity) {
- /** @var Builder $query */
$query->select(['id', 'deleted_at'])
->selectRaw("'{$entity->getMorphClass()}' as type")
->from($entity->getTable())
$chapters = $entity->chapters()->get(['id']);
$children = $pages->concat($chapters);
foreach ($children as $bookChild) {
+ /** @var Reference[] $childRefs */
$childRefs = $this->referenceFetcher->getPageReferencesToEntity($bookChild)->values()->all();
array_push($references, ...$childRefs);
}
* Called when standard web (browser/non-api) app routes are registered.
* Provides an app router, so you can register your own web routes.
*
- * @param \Illuminate\Routing\Router
+ * @param \Illuminate\Routing\Router $router
*/
const ROUTES_REGISTER_WEB = 'routes_register_web';
* These are routes that typically require login to access (unless the instance is made public).
* Provides an app router, so you can register your own web routes.
*
- * @param \Illuminate\Routing\Router
+ * @param \Illuminate\Routing\Router $router
*/
const ROUTES_REGISTER_WEB_AUTH = 'routes_register_web_auth';
includes:
- - ./vendor/nunomaduro/larastan/extension.neon
+ - ./vendor/larastan/larastan/extension.neon
parameters: