Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name":"typearea/hyphenator",
"name":"pw6/hyphenator",
"type":"library",
"description":"Hyphenator is a cache-enabled PHP port of the JavaScript Hyphenator.js by Mathias Nater, and this is a bugfix fork of github.com/webrocker/hyphenator",
"keywords":["hyphenator", "hyphenation", "hyphenate"],
"homepage":"https://github.com/typearea/hyphenator",
"license":"New BSD",
"license":"BSD-3-Clause",
"authors":[
{
"name":"Marco Fischer",
Expand Down
4 changes: 2 additions & 2 deletions src/Hyphenator/Cache/MemcachedCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MemcachedCache implements CacheInterface
*/
protected $connection = null;

public function __construct(\Memcache $connection = null)
public function __construct(?\Memcache $connection = null)
{
if (!extension_loaded('memcache')) {
throw new MissingExtensionException('PHP extension memcache ist not loaded. You cannot use this cache.');
Expand All @@ -61,4 +61,4 @@ public function store($cacheKey, $data)
{
return $this->connection->set($cacheKey, $data);
}
}
}
2 changes: 1 addition & 1 deletion src/Hyphenator/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class Core
* @param null $patternsPath
* @param Cache\CacheInterface $cache
*/
public function __construct($patternsPath = null, CacheInterface $cache = null)
public function __construct($patternsPath = null, ?CacheInterface $cache = null)
{
if ($patternsPath) {
$this->patternsPath = realpath($patternsPath);
Expand Down