Skip to content

Commit

Permalink
Merge pull request #999 from albe/scalar-typehints-utility-lock
Browse files Browse the repository at this point in the history
!!!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.
  • Loading branch information
kitsunet committed Dec 27, 2017
2 parents 0885d3e + 0f99a35 commit c2211b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Neos.Utility.Lock/Classes/FlockLockStrategy.php
Expand Up @@ -67,7 +67,7 @@ public function __construct(array $options = [])
* @return void
* @throws LockNotAcquiredException
*/
public function acquire($subject, $exclusiveLock)
public function acquire(string $subject, bool $exclusiveLock)
{
$this->lockFileName = Utility\Files::concatenatePaths([$this->temporaryDirectory, md5($subject)]);
$aquiredLock = false;
Expand Down
4 changes: 2 additions & 2 deletions Neos.Utility.Lock/Classes/LockStrategyInterface.php
Expand Up @@ -23,10 +23,10 @@ interface LockStrategyInterface
* @param boolean $exclusiveLock TRUE to, acquire an exclusive (write) lock, FALSE for a shared (read) lock.
* @return void
*/
public function acquire($subject, $exclusiveLock);
public function acquire(string $subject, bool $exclusiveLock);

/**
* @return boolean TRUE on success, FALSE otherwise
*/
public function release();
public function release(): bool;
}

0 comments on commit c2211b6

Please sign in to comment.