Skip to content

Commit c2211b6

Browse files
authored
Merge pull request #999 from albe/scalar-typehints-utility-lock
!!!TASK: Add PHP 7.0 scalar type hints to method arguments and return types This is only breaking for classes implementing `LockStrategyInterface`, whose signature now requires scalar typehints.
2 parents 0885d3e + 0f99a35 commit c2211b6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Neos.Utility.Lock/Classes/FlockLockStrategy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function __construct(array $options = [])
6767
* @return void
6868
* @throws LockNotAcquiredException
6969
*/
70-
public function acquire($subject, $exclusiveLock)
70+
public function acquire(string $subject, bool $exclusiveLock)
7171
{
7272
$this->lockFileName = Utility\Files::concatenatePaths([$this->temporaryDirectory, md5($subject)]);
7373
$aquiredLock = false;

Neos.Utility.Lock/Classes/LockStrategyInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ interface LockStrategyInterface
2323
* @param boolean $exclusiveLock TRUE to, acquire an exclusive (write) lock, FALSE for a shared (read) lock.
2424
* @return void
2525
*/
26-
public function acquire($subject, $exclusiveLock);
26+
public function acquire(string $subject, bool $exclusiveLock);
2727

2828
/**
2929
* @return boolean TRUE on success, FALSE otherwise
3030
*/
31-
public function release();
31+
public function release(): bool;
3232
}

0 commit comments

Comments
 (0)