<?php
declare(strict_types=1);
namespace GitList\SCM;
class Blob extends Item
{
protected ?string $mode = null;
protected ?string $name = null;
protected ?int $size = null;
protected ?string $contents = null;
public function getMode(): ?string
{
return $this->mode;
}
public function setMode(string $mode): void
{
$this->mode = $mode;
}
public function getName(): ?string
{
return $this->name;
}
public function getFileName(): ?string
{
return basename($this->name ?? '');
}
public function setName(string $name): void
{
$this->name = $name;
}
public function isReadme(): bool
{
$fileName = strtolower($this->getFileName());