Skip to content

Commit 0827e10

Browse files
committed
Resolve config
1 parent 354d5a5 commit 0827e10

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

examples/resolve_config.php

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php declare(strict_types=1);
2+
3+
$configFile = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'config.php';
4+
5+
if (!file_exists($configFile)) {
6+
echo 'No config file found, copy config.sample.php to config.php and your Twitter OAuth details.', PHP_EOL;
7+
exit(1);
8+
}
9+
10+
return require $configFile;

0 commit comments

Comments
 (0)