Skip to content

Commit

Permalink
Added phpstan + cleanup unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
xy2z committed Feb 15, 2022
1 parent 648eea8 commit 8027dcc
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 12 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
"require": {
"twig/twig": "^3.0",
"symfony/yaml": "^5.0"
},
"require-dev": {
"phpstan/phpstan": "^1.4"
}
}
71 changes: 68 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
parameters:
level: 5
paths:
- public
- src
excludePaths:
- src/vendor
8 changes: 0 additions & 8 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
}

$index_data = 'Hello. No index file found.';
$index_found = false;
foreach ($indexes as $index) {
$path = PineDocs::$config->content_dir . $index;
if (file_exists($path)) {
Expand All @@ -78,13 +77,6 @@
}
}

if (!$index_found) {
// No index file added.
// Use the first file found?
$content = 'No index file found. Create a file called index.md in the content_dir.';
$content_path = '';
}


// Prepare template.
$loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/../src/templates');
Expand Down
1 change: 0 additions & 1 deletion src/PineDocsTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
class PineDocsTree {

private $tree;
private $files;


public function __construct() {
Expand Down

0 comments on commit 8027dcc

Please sign in to comment.