@@ -32,6 +32,6 @@ |
||
32 | 32 | */ |
33 | 33 | public function getUri(): string |
34 | 34 | { |
35 | - return "/file/Applications.Attachment/" . $this->id . "/" .urlencode($this->getMetadata()->getName()); |
|
35 | + return "/file/Applications.Attachment/".$this->id."/".urlencode($this->getMetadata()->getName()); |
|
36 | 36 | } |
37 | 37 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * |
29 | 29 | * @var String |
30 | 30 | */ |
31 | - protected $repositoryName="Applications/Application"; |
|
31 | + protected $repositoryName = "Applications/Application"; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Sortable fields |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $searchPatterns = array(); |
81 | 81 | |
82 | 82 | foreach (explode(' ', $search) as $searchItem) { |
83 | - $searchPatterns[] = new Regex('/^' . $searchItem . '/'); |
|
83 | + $searchPatterns[] = new Regex('/^'.$searchItem.'/'); |
|
84 | 84 | } |
85 | 85 | $queryBuilder->field('keywords')->all($searchPatterns); |
86 | 86 | } |
@@ -106,9 +106,9 @@ discard block |
||
106 | 106 | { |
107 | 107 | $qb = $this->getPaginationQueryBuilder($params); |
108 | 108 | $cursor = $qb->hydrate(false) |
109 | - ->select('_id') |
|
110 | - ->getQuery() |
|
111 | - ->execute(); |
|
109 | + ->select('_id') |
|
110 | + ->getQuery() |
|
111 | + ->execute(); |
|
112 | 112 | |
113 | 113 | $list = new PaginationList(array_keys(ArrayUtils::iteratorToArray($cursor))); |
114 | 114 | return $list; |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | { |
138 | 138 | $auth=$this->getService('AuthenticationService'); |
139 | 139 | $qb=$this->createQueryBuilder() |
140 | - ->field("readBy")->notIn(array($auth->getUser()->getId())) |
|
141 | - ->field("job")->equals(new ObjectId($job->getId())); |
|
140 | + ->field("readBy")->notIn(array($auth->getUser()->getId())) |
|
141 | + ->field("job")->equals(new ObjectId($job->getId())); |
|
142 | 142 | return $qb->getQuery()->execute(); |
143 | 143 | } |
144 | 144 |
@@ -135,8 +135,8 @@ |
||
135 | 135 | */ |
136 | 136 | public function loadUnreadApplicationsForJob($job) |
137 | 137 | { |
138 | - $auth=$this->getService('AuthenticationService'); |
|
139 | - $qb=$this->createQueryBuilder() |
|
138 | + $auth = $this->getService('AuthenticationService'); |
|
139 | + $qb = $this->createQueryBuilder() |
|
140 | 140 | ->field("readBy")->notIn(array($auth->getUser()->getId())) |
141 | 141 | ->field("job")->equals(new ObjectId($job->getId())); |
142 | 142 | return $qb->getQuery()->execute(); |
@@ -34,8 +34,8 @@ |
||
34 | 34 | $file = __FILE__; |
35 | 35 | |
36 | 36 | $specs = [ |
37 | - ImageSetInterface::ORIGINAL => [100,100], |
|
38 | - ImageSetInterface::THUMBNAIL => [100,100], |
|
37 | + ImageSetInterface::ORIGINAL => [100, 100], |
|
38 | + ImageSetInterface::THUMBNAIL => [100, 100], |
|
39 | 39 | ]; |
40 | 40 | $imageData = [ |
41 | 41 | 'tmp_name' => $file, |
@@ -84,17 +84,17 @@ discard block |
||
84 | 84 | $plugins->expects($this->any()) |
85 | 85 | ->method('get') |
86 | 86 | ->willReturnMap([ |
87 | - ['acl',null,$this->aclPlugin], |
|
88 | - ['params',null,$this->paramsPlugin] |
|
87 | + ['acl', null, $this->aclPlugin], |
|
88 | + ['params', null, $this->paramsPlugin] |
|
89 | 89 | ]) |
90 | 90 | ; |
91 | 91 | |
92 | 92 | $this->paramsPlugin->expects($this->any()) |
93 | 93 | ->method('__invoke') |
94 | 94 | ->willReturnMap([ |
95 | - [null,null,$this->paramsPlugin], |
|
96 | - ['filestore',null,'store.entity'], |
|
97 | - ['fileId',0,'dir/file.ext'] |
|
95 | + [null, null, $this->paramsPlugin], |
|
96 | + ['filestore', null, 'store.entity'], |
|
97 | + ['fileId', 0, 'dir/file.ext'] |
|
98 | 98 | ]) |
99 | 99 | ; |
100 | 100 | $this->paramsPlugin->expects($this->any()) |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | $this->fileManager->expects($this->any()) |
114 | 114 | ->method('findByID') |
115 | - ->with('store\Entity\entity','dir/file') |
|
115 | + ->with('store\Entity\entity', 'dir/file') |
|
116 | 116 | ->willReturn(null) |
117 | 117 | ; |
118 | 118 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $container->expects($this->exactly(2)) |
37 | 37 | ->method('get') |
38 | 38 | ->willReturnMap([ |
39 | - ['Core/File/Events',$coreFileEvents], |
|
39 | + ['Core/File/Events', $coreFileEvents], |
|
40 | 40 | [FileManager::class, $fileManager] |
41 | 41 | ]) |
42 | 42 | ; |
@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | public function serviceNamesProvider() |
45 | 45 | { |
46 | 46 | return [ |
47 | - [ 'Repository/Core/File', true ], |
|
48 | - [ 'Core/File', true ], |
|
49 | - [ 'Repository/NoModuleWillBeEverCalledThat/SomeEntity', false ], |
|
50 | - [ 'ThisIsAHighlyUnCommonModuleName/ObscureEntity', false ], |
|
47 | + ['Repository/Core/File', true], |
|
48 | + ['Core/File', true], |
|
49 | + ['Repository/NoModuleWillBeEverCalledThat/SomeEntity', false], |
|
50 | + ['ThisIsAHighlyUnCommonModuleName/ObscureEntity', false], |
|
51 | 51 | ]; |
52 | 52 | } |
53 | 53 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | ->disableOriginalConstructor() |
66 | 66 | ->getMock() |
67 | 67 | ; |
68 | - $method = "assert" . ($expected ? 'True' : 'False'); |
|
68 | + $method = "assert".($expected ? 'True' : 'False'); |
|
69 | 69 | |
70 | 70 | $this->{$method}($this->target->canCreate($sm, $serviceName)); |
71 | 71 | } |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | public function servicesProvider() |
74 | 74 | { |
75 | 75 | return [ |
76 | - [ 'Repository/Core/TestEntity', '\Core\Entity\TestEntity', [], false ], |
|
77 | - [ 'Core/TestEntity', '\Core\Entity\TestEntity', [ 'testOption' => 'testValue' ], true ] |
|
76 | + ['Repository/Core/TestEntity', '\Core\Entity\TestEntity', [], false], |
|
77 | + ['Core/TestEntity', '\Core\Entity\TestEntity', ['testOption' => 'testValue'], true] |
|
78 | 78 | ]; |
79 | 79 | } |
80 | 80 |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | $container->expects($this->any()) |
59 | 59 | ->method('get') |
60 | 60 | ->willReturnMap([ |
61 | - ['config',$config], |
|
62 | - ['ModuleManager',$moduleManager], |
|
63 | - ['repositories',$repositories], |
|
64 | - ['Core/EventManager',$eventManager], |
|
61 | + ['config', $config], |
|
62 | + ['ModuleManager', $moduleManager], |
|
63 | + ['repositories', $repositories], |
|
64 | + ['Core/EventManager', $eventManager], |
|
65 | 65 | [FileManager::class, $fileManager] |
66 | 66 | ]) |
67 | 67 | ; |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | public function invokeTestProvider() |
77 | 77 | { |
78 | 78 | return [ |
79 | - ['Core/Index',IndexController::class], |
|
80 | - ['Core/File',FileController::class], |
|
81 | - ['Core/Content',ContentController::class], |
|
79 | + ['Core/Index', IndexController::class], |
|
80 | + ['Core/File', FileController::class], |
|
81 | + ['Core/Content', ContentController::class], |
|
82 | 82 | ]; |
83 | 83 | } |
84 | 84 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | '@testInheritance' => ['as_reflection' => true], |
54 | 54 | ]; |
55 | 55 | |
56 | - private $inheritance = [ HydratorInterface::class ]; |
|
56 | + private $inheritance = [HydratorInterface::class]; |
|
57 | 57 | |
58 | 58 | /** |
59 | 59 | * @var MockObject|ImagineInterface |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | ]; |
145 | 145 | |
146 | 146 | $imageSpecs = [ |
147 | - ImageSetInterface::THUMBNAIL => [100,100], |
|
148 | - 'large' => [10000,10000], |
|
149 | - 'small' => [600,600], |
|
147 | + ImageSetInterface::THUMBNAIL => [100, 100], |
|
148 | + 'large' => [10000, 10000], |
|
149 | + 'small' => [600, 600], |
|
150 | 150 | ]; |
151 | 151 | $metadata = $this->getMockBuilder(ImageMetadata::class) |
152 | 152 | ->setMethods(['setContentType', 'setBelongsTo', 'setKey']) |